diff options
author | Luke Kanies <luke@reductivelabs.com> | 2010-02-06 11:34:16 -0800 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 0d704686b923c7827b9fe16f20d4f8722c125d88 (patch) | |
tree | bc410cb6b30e8f56b6a8abae93ee8e195febb485 /lib/puppet/parser/ast | |
parent | ad93d0e442d4e4eff69bb3f444b2eee70a95dfa8 (diff) | |
download | puppet-0d704686b923c7827b9fe16f20d4f8722c125d88.tar.gz puppet-0d704686b923c7827b9fe16f20d4f8722c125d88.tar.xz puppet-0d704686b923c7827b9fe16f20d4f8722c125d88.zip |
Finishing renaming :params to :parameters internally
I had only done this partway, because it seemed easier,
but not surprisingly, it ended up being more complex.
In addition to those renames, this commit includes fixes
to whatever tests I needed to fix to confirm that things
were again working. I think most of these broken
tests have been broken for a while.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r-- | lib/puppet/parser/ast/collection.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/ast/resource.rb | 10 | ||||
-rw-r--r-- | lib/puppet/parser/ast/resource_defaults.rb | 4 | ||||
-rw-r--r-- | lib/puppet/parser/ast/resource_override.rb | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/puppet/parser/ast/collection.rb b/lib/puppet/parser/ast/collection.rb index 55e99fc08..f3690c146 100644 --- a/lib/puppet/parser/ast/collection.rb +++ b/lib/puppet/parser/ast/collection.rb @@ -31,7 +31,7 @@ class Collection < AST::Branch end newcoll.add_override( - :params => params, + :parameters => params, :file => @file, :line => @line, :source => scope.source, diff --git a/lib/puppet/parser/ast/resource.rb b/lib/puppet/parser/ast/resource.rb index 095e097ca..5488724c8 100644 --- a/lib/puppet/parser/ast/resource.rb +++ b/lib/puppet/parser/ast/resource.rb @@ -8,13 +8,13 @@ class Resource < AST::ResourceReference associates_doc attr_accessor :title, :type, :exported, :virtual - attr_reader :params + attr_reader :parameters # Does not actually return an object; instead sets an object # in the current scope. def evaluate(scope) # Evaluate all of the specified params. - paramobjects = params.collect { |param| + paramobjects = parameters.collect { |param| param.safeevaluate(scope) } @@ -58,11 +58,11 @@ class Resource < AST::ResourceReference end # Set the parameters for our object. - def params=(params) + def parameters=(params) if params.is_a?(AST::ASTArray) - @params = params + @parameters = params else - @params = AST::ASTArray.new( + @parameters = AST::ASTArray.new( :line => params.line, :file => params.file, :children => [params] diff --git a/lib/puppet/parser/ast/resource_defaults.rb b/lib/puppet/parser/ast/resource_defaults.rb index f0746ecf1..aec86d02d 100644 --- a/lib/puppet/parser/ast/resource_defaults.rb +++ b/lib/puppet/parser/ast/resource_defaults.rb @@ -4,7 +4,7 @@ class Puppet::Parser::AST # A statement syntactically similar to an ResourceDef, but uses a # capitalized object type and cannot have a name. class ResourceDefaults < AST::Branch - attr_accessor :type, :params + attr_accessor :type, :parameters associates_doc @@ -14,7 +14,7 @@ class Puppet::Parser::AST # Use a resource reference to canonize the type ref = Puppet::Resource.new(@type, "whatever") type = ref.type - params = @params.safeevaluate(scope) + params = @parameters.safeevaluate(scope) parsewrap do scope.setdefaults(type, params) diff --git a/lib/puppet/parser/ast/resource_override.rb b/lib/puppet/parser/ast/resource_override.rb index 2d4f7a871..93ddf4dbe 100644 --- a/lib/puppet/parser/ast/resource_override.rb +++ b/lib/puppet/parser/ast/resource_override.rb @@ -8,11 +8,11 @@ class Puppet::Parser::AST associates_doc attr_accessor :object - attr_reader :params + attr_reader :parameters # Iterate across all of our children. def each - [@object,@params].flatten.each { |param| + [@object,@parameters].flatten.each { |param| #Puppet.debug("yielding param %s" % param) yield param } @@ -27,7 +27,7 @@ class Puppet::Parser::AST hash = {} # Evaluate all of the specified params. - params = @params.collect { |param| + params = @parameters.collect { |param| param.safeevaluate(scope) } @@ -37,7 +37,7 @@ class Puppet::Parser::AST resource = resource.collect do |r| res = Puppet::Parser::Resource.new(r.type, r.title, - :params => params, + :parameters => params, :file => file, :line => line, :source => scope.source, |