diff options
| author | Luke Kanies <luke@madstop.com> | 2007-09-04 16:59:30 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-09-04 16:59:30 -0500 |
| commit | b0a947589ea6c7abf5658d9e5038eb7d96a11339 (patch) | |
| tree | 484b6a7ac6f33b23cc022e3b972bde6982e1ff3f /lib/puppet/parser | |
| parent | 11b127bd6708a18b512ca5b3018ccff1200cc47a (diff) | |
| download | puppet-b0a947589ea6c7abf5658d9e5038eb7d96a11339.tar.gz puppet-b0a947589ea6c7abf5658d9e5038eb7d96a11339.tar.xz puppet-b0a947589ea6c7abf5658d9e5038eb7d96a11339.zip | |
Flipped the switch so that compiles now return a Configuration instance instead of pre-extracting the configuration.
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/compile.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/parser/compile.rb b/lib/puppet/parser/compile.rb index 841e58d4d..cc9938e50 100644 --- a/lib/puppet/parser/compile.rb +++ b/lib/puppet/parser/compile.rb @@ -82,7 +82,7 @@ class Puppet::Parser::Compile store() end - return @configuration.extract + return @configuration end # FIXME There are no tests for this. @@ -117,13 +117,13 @@ class Puppet::Parser::Compile # creates resource objects that point back to the classes, and then the # resources are themselves evaluated later in the process. def evaluate_classes(classes, scope) + unless scope.source + raise Puppet::DevError, "No source for scope passed to evaluate_classes" + end found = [] classes.each do |name| # If we can find the class, then make a resource that will evaluate it. if klass = scope.findclass(name) - unless scope.source - raise Puppet::DevError, "No source for %s" % scope.to_s - end # Create a resource to model this class, and then add it to the list # of resources. resource = Puppet::Parser::Resource.new(:type => "class", :title => klass.classname, :scope => scope, :source => scope.source) @@ -406,6 +406,7 @@ class Puppet::Parser::Compile # For maintaining the relationship between scopes and their resources. @configuration = Puppet::Node::Configuration.new(@node.name) + @configuration.version = @parser.version end # Set the node's parameters into the top-scope as variables. |
