Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating for Chef / ChefSpec Deprecation Warnings #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eyespies
Copy link

I've been updating our company cookbooks to use ChefSpec / Test Kitchen and ran into some weird output that I've tracked down to Chef complaining the use of deprecated stuff in this cookbook. Specifically, I'm getting this:

platform
[2017-01-13T09:39:03-05:00] WARN: method access to node attributes (node.foo.bar) is deprecated and will be removed in Chef 13, please use bracket syntax (node["foo"]["bar"]) at /var/folders/9r/0jqr4hkd0hj6273zzwp38x4r0000gn/T/d20170113-56814-10e4it8/cookbooks/hostnames/attributes/default.rb:5:in `from_file' at /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/event_dispatch/dispatcher.rb:43:in `call'

The 'platform' output is the node attribute being accessed in method format and that is output by Chef (which is REALLY annoying because I can't stop it from happening).

I can't do much about the Chef side, but figured I could help here, so I posted some updates to fix that deprecation warning as well as fixing the unit tests in this cookbook (they didn't run locally for me.)

Hopefully this helps out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant