berkshelf / ridley

A reliable Chef API client with a clean syntax
Other
231 stars 85 forks source link

chef_version setting in cookbook metadata #338

Closed jonathanmorley closed 8 years ago

jonathanmorley commented 8 years ago

If I set chef_version in metadata.rb, then I get the following error

An error occurred while reading the Berksfile:

  Could not parse `~/cookbooks/test/metadata.rb': undefined method `chef_version' for #<Ridley::Chef::Cookbook::Metadata:0x007fc55a4f24d8>```

https://github.com/berkshelf/berkshelf/issues/1499

lamont-granquist commented 8 years ago

The fix to this should really involve silently ignoring any unknown cookbook metadata.

There is another bug about to hit where the gem keyword in cookbook metadata also needs to be ignored (that one is slightly more complicated since Kernel#gem is defined by rubygems, so Ridley::Chef::Cookbook::Metadata needs to override that method).