From d319da41e46f0f3621180d09d3110f67003a7527 Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Thu, 15 Jul 2010 16:38:04 -0700 Subject: [#4247] storeconfigs was calling Puppet::Parser::Resource.new with the wrong arguments When the interface to Puppet::Resource changed, its subclass Puppet::Parser::Resource was also affected. One case of initializing those objects did not get updated when the code changed, causing storeconfigs to break. Also, this patch adds a error message that would have made it easier to catch this problem (as puppet could consume all memory and die trying to print the old error message) --- lib/puppet/rails/resource.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/puppet/rails') diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index a5cdd0c13..582cdd41a 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -212,16 +212,16 @@ class Puppet::Rails::Resource < ActiveRecord::Base end hash[:scope] = scope hash[:source] = scope.source - hash[:params] = [] + hash[:parameters] = [] names = [] self.param_names.each do |pname| # We can get the same name multiple times because of how the # db layout works. next if names.include?(pname.name) names << pname.name - hash[:params] << pname.to_resourceparam(self, scope.source) + hash[:parameters] << pname.to_resourceparam(self, scope.source) end - obj = Puppet::Parser::Resource.new(hash) + obj = Puppet::Parser::Resource.new(hash.delete("type"), hash.delete("title"), hash) # Store the ID, so we can check if we're re-collecting the same resource. obj.rails_id = self.id -- cgit