diff options
| author | Luke Kanies <luke@reductivelabs.com> | 2010-01-30 23:36:32 -0600 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 9c867e6d79dcc56cd34683c9a339dc729ad2d291 (patch) | |
| tree | 27ee2a51648d11891a5168db1e63e064244eeef5 /lib/puppet/parser | |
| parent | 274d1c5e78250640b8d2c40201ca2586c0088f32 (diff) | |
| download | puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.tar.gz puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.tar.xz puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.zip | |
Fixing most of the broken tests in test/
This involves a bit of refactoring in the rest
of the code to make it all work, but most of the
changes are fixing or removing old tests.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/collector.rb | 6 | ||||
| -rw-r--r-- | lib/puppet/parser/resource.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb index 044518793..67bd336bb 100644 --- a/lib/puppet/parser/collector.rb +++ b/lib/puppet/parser/collector.rb @@ -41,9 +41,7 @@ class Puppet::Parser::Collector # overrided those resources objects.each do |res| unless @collected.include?(res.ref) - res = Puppet::Parser::Resource.new( - :type => res.type, - :title => res.title, + newres = Puppet::Parser::Resource.new(res.type, res.title, :params => overrides[:params], :file => overrides[:file], :line => overrides[:line], @@ -51,7 +49,7 @@ class Puppet::Parser::Collector :scope => overrides[:scope] ) - scope.compiler.add_override(res) + scope.compiler.add_override(newres) end end end diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 36f1fbe93..3f6d73df3 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -108,7 +108,9 @@ class Puppet::Parser::Resource < Puppet::Resource end def initialize(type, title, options) - self.type = type + @scope = options[:scope] + + self.relative_type = type self.title = title @params = {} |
