diff options
author | PrajaktaPurohit <prajakta@opscode.com> | 2012-12-05 12:07:57 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2012-12-19 15:56:09 -0800 |
commit | 3b30120ac8144b361a14d26271e1910af5dcdff8 (patch) | |
tree | 780a8afebf40bca7b782928f9633d11a3b1bbb28 /lib/chef/resource | |
parent | 54c19e58606fccafb1368c3c887cc7239b4c5d72 (diff) | |
download | chef-3b30120ac8144b361a14d26271e1910af5dcdff8.tar.gz |
Making the resource registry values check stricter
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/registry_key.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/resource/registry_key.rb b/lib/chef/resource/registry_key.rb index dc9fc1496c..9c36753a99 100644 --- a/lib/chef/resource/registry_key.rb +++ b/lib/chef/resource/registry_key.rb @@ -61,6 +61,8 @@ class Chef v.each_key do |key| raise ArgumentError, "Bad key #{key} in RegistryKey values hash" unless [:name,:type,:data].include?(key) end + raise ArgumentError, "Type of name => #{v[:name]} should be string" unless v[:name].is_a?(String) + raise Argument Error "Type of type => #{v[:name]} should be symbol" unless v[:type].is_a?(Symbol) end elsif self.instance_variable_defined?(:@values) == true @values |