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

Add gluster_volume_option custom resource #86

Merged
merged 1 commit into from
Dec 21, 2016
Merged

Add gluster_volume_option custom resource #86

merged 1 commit into from
Dec 21, 2016

Conversation

chewi
Copy link
Contributor

@chewi chewi commented Dec 19, 2016

No description provided.

Copy link
Owner

@shortdudey123 shortdudey123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add chefspec matchers for the new resource?

@chewi
Copy link
Contributor Author

chewi commented Dec 19, 2016

I've got work piling on top of me but I understand you want to maintain quality so I'll try to find the time. I've also got geo-replication/mountbroker stuff on the way.

@chewi
Copy link
Contributor Author

chewi commented Dec 20, 2016

Misunderstood you earlier, thought you wanted me to write some specs. I've never actually used ChefSpec (but I should…) so I've not tested these but seems simple enough. I would have thought this could automated but what do I know? 😁

@shortdudey123
Copy link
Owner

Take a look at libraries/matchers.rb and it should be fairly self explanatory to add them to that file

def name is <action>_<resource>
and parameters are (<resource>, <action>, resource_name)

@chewi
Copy link
Contributor Author

chewi commented Dec 20, 2016

Yep, I meant I've already done it, please see the amended commit.

@chewi
Copy link
Contributor Author

chewi commented Dec 20, 2016

Sorry, just realised I messed up the README ordering slightly. I'll fix it tomorrow as it's late now.

@@ -14,4 +14,12 @@ def enable_gluster_mount(resource_name)
def disable_gluster_mount(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:gluster_mount, :disable, resource_name)
end

def set_gluster_volume_option(resource_name) # rubocop:disable Style/AccessorMethodName
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you actually put the rubocop rule in .rubocop.yml as an excludes for this file?

@chewi
Copy link
Contributor Author

chewi commented Dec 21, 2016

Okay, all sorted.

@shortdudey123
Copy link
Owner

Awesome work!

@shortdudey123 shortdudey123 merged commit 0482e3b into shortdudey123:master Dec 21, 2016
@chewi chewi deleted the volume_option branch December 21, 2016 17:27
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.

2 participants