-
-
Notifications
You must be signed in to change notification settings - Fork 599
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
Introduce user provider and resource #268
Conversation
0695427
to
6c57315
Compare
Force pushed a new commit message into my branch, to add the |
class Resource::ElasticsearchUser < Resource | ||
include Poise | ||
|
||
actions(:create, :remove) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does everybody think about getting rid of the ()
parentheses for these DSL-like notations? I guess it would look & feel cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend leaving them, since we're emulating a style that other users and chef community people will recognize. It seems like they are most often omitted in LWRPs and not omitted in HWRPs. I don't feel that strongly about it though, if everyone else feels differently. I just want to be sure what we write is approachable enough that we can get good contributions from the community.
When I run integration tests, I'm getting the following exception:
Full trace:
|
It seems like some Rspec-based gems are not depending properly on the
As soon as I add |
When I try to run the RSpec unit tests, I'm getting the following error:
|
3b28ecb
to
04d010a
Compare
I fixed the unit tests and rspec dependency (I guess chefspec doesn't depend on it correctly); I'd recommend clearing out any Gemfile.lock and running those again. Regarding the kitchen tests, I am running them with In short, try it again? :) Thanks! |
04d010a
to
1d17218
Compare
- Fixes #269, adds an `elasticsearch_user` resource with provider that creates a user, group, and removes the automatic homedir - Pins chef to 11.16.4 since chef 12 and many libraries like poise aren't compatible yet, explicit depends on rspec - Adds a unit test with chefspec matcher under `libraries/matchers.rb` for testing chef resources were created with correct data and actions - Adds an `elasticsearch_test` kitchenCI suite that tests edge cases, so the default test suite can test the expected way people use the cookbook - Tweak rubocop rules to avoid style complaints about methods that are too complex (controversial rule) and compact class styles (also controversial at the moment) - Updated `README.md` with an example of how to use the `elasticsearch_user` resource Closes #268
1d17218
to
d67badf
Compare
Pushed new version of this branch with Gemfile fixes. |
- Fixes sous-chefs#269, adds an `elasticsearch_user` resource with provider that creates a user, group, and removes the automatic homedir - Pins chef to 11.16.4 since chef 12 and many libraries like poise aren't compatible yet, explicit depends on rspec - Adds a unit test with chefspec matcher under `libraries/matchers.rb` for testing chef resources were created with correct data and actions - Adds an `elasticsearch_test` kitchenCI suite that tests edge cases, so the default test suite can test the expected way people use the cookbook - Tweak rubocop rules to avoid style complaints about methods that are too complex (controversial rule) and compact class styles (also controversial at the moment) - Updated `README.md` with an example of how to use the `elasticsearch_user` resource
d67badf
to
1440a9f
Compare
elasticsearch_user
resource with provider that creates a user, group, and removes the automatic homedirelasticsearch_test
kitchenCI suite that tests edge cases, so the default test suite can test the expected way people use the cookbookREADME.md
with an example of how to use theelasticsearch_user
resource