Permalink
Browse files

Merge branch 'CHEF-3099'

  • Loading branch information...
schisamo committed May 17, 2012
2 parents e27cb99 + 6357cf4 commit 536bc2c2c358f8005197890f4ce3be81ce2d3452
Showing with 1 addition and 3 deletions.
  1. +1 −3 chef/lib/chef/resource_platform_map.rb
@@ -43,16 +43,13 @@ def filter(platform, version)
if map.has_key?(platform_sym)
if map[platform_sym].has_key?(version)
- Chef::Log.debug("Platform #{platform_sym} version #{version} found")
if map[platform_sym].has_key?(:default)
resource_map.merge!(map[platform_sym][:default])
end
resource_map.merge!(map[platform_sym][version])
elsif map[platform_sym].has_key?(:default)
resource_map.merge!(map[platform_sym][:default])
end
- else
- Chef::Log.debug("Platform #{platform} not found, using all defaults. (Unsupported platform?)")
end
resource_map
end
@@ -136,6 +133,7 @@ def get(short_name, platform=nil, version=nil)
def platform_resource(short_name, platform, version)
pmap = filter(platform, version)
rtkey = short_name.kind_of?(Chef::Resource) ? short_name.resource_name.to_sym : short_name
+
pmap.has_key?(rtkey) ? pmap[rtkey] : nil
end

0 comments on commit 536bc2c

Please sign in to comment.