[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5
James Turnbull
james at lovedthanlost.net
Wed Apr 8 21:48:15 UTC 2009
The following commit has been merged in the master branch:
commit 24d48e6c07ef634971fcb8ed5b27258db161a018
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date: Sat Feb 14 19:28:10 2009 +0100
Fix #1972 - ActiveRecord fixes resulted in broken tests
Fix #1930 was not complete, with some typos and misuse of
unused code paths in the regular puppetmaster use case.
Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index bd2739d..c3d287a 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -1,5 +1,6 @@
require 'puppet'
require 'puppet/rails/param_name'
+require 'puppet/rails/param_value'
require 'puppet/rails/puppet_tag'
require 'puppet/util/rails/collection_merger'
@@ -57,7 +58,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
# returns a hash of param_names.name => [param_values]
def get_params_hash(values = nil)
- values ||= @params_hash || Puppet::Rails::ParamValues.find_all_params_from_resource(id)
+ values ||= @params_hash || Puppet::Rails::ParamValue.find_all_params_from_resource(self)
if values.size == 0
return {}
end
@@ -69,7 +70,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
end
def get_tag_hash(tags = nil)
- tags ||= @tags_hash || Puppet::Rails::ResourceTag.find_all_tags_from_resource(id)
+ tags ||= @tags_hash || Puppet::Rails::ResourceTag.find_all_tags_from_resource(self)
return tags.inject({}) do |hash, tag|
# We have to store the tag object, not just the tag name.
hash[tag['name']] = tag
@@ -99,7 +100,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
result = get_params_hash
result.each do |param, value|
if value.is_a?(Array)
- result[param] = value.collect { |v| v.value }
+ result[param] = value.collect { |v| v['value'] }
else
result[param] = value.value
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list