Group resource broken on CentOS 7
Closed this issue · 1 comments
Hi,
I just tried getting kitchen-wright a little further and stumbled upon a bug with groups on CentOS 7.
WARN: Could not find a provider for resource Group
ERROR: group 'ordinary_gentlemen': undefined method `create' for nil:NilClass
/usr/local/share/gems/gems/wright-0.3.2/lib/wright/resource/group.rb:39:in `block in create': undefined method `create' for nil:NilClass (NoMethodError)
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/resource.rb:107:in `might_update_resource'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/resource/group.rb:38:in `create'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/resource.rb:72:in `run_action'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/dsl.rb:60:in `yield_resource'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/dsl.rb:45:in `block in register_resource'
from /tmp/kitchen/lib/wright_include.rb:1:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /tmp/kitchen/wright.rb:9:in `<top (required)>'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/cli.rb:40:in `run_script'
from /usr/local/share/gems/gems/wright-0.3.2/lib/wright/cli.rb:23:in `run'
from /usr/local/share/gems/gems/wright-0.3.2/bin/wright:6:in `<top (required)>'
from /usr/local/bin/wright:23:in `load'
from /usr/local/bin/wright:23:in `<main>'
Where the code actually is a simple group 'ordinary_gentlemen'
. I hope I can get my work on kitchen-wright pushed soon so you could try my example.
EDIT: Almost forgot. This piece of code works find on Debian-8 and Ubuntu-15.04.
Thanks for the bug report. Support for RHEL-based distros is a new feature in wright 0.4.0, which I am going to release in the next few days. (Just for the record, the exact commit that added provider lookup for CentOS was f89fa13.)
If you want to test the most recent version you can add this line to your Gemfile:
gem 'wright', github: 'sometimesfood/wright'
If you need a gem to test the latest version, just let me know and I'll push a pre-release version.