sensu-plugins / sensu-plugins-windows

Sensu Windows Plugins
http://sensu-plugins.io
MIT License
22 stars 46 forks source link

Feat/check disk only label #53

Closed absolutejam closed 6 years ago

absolutejam commented 6 years ago

This allows the plugin to (o)nly check specific mount points.

Pull Request Checklist

This is not in reference to an existing issue, but a feature I needed. This lets me create specific checks for certain, high priority disks.

General

majormoses commented 6 years ago

Can I also get a testing artifact?

absolutejam commented 6 years ago

Are there any example plugins that have tests? Ruby, and rspec especially, is alien to me, so I'm not doing a great job at making my test work, nevermind pass 🤦‍♂️

majormoses commented 6 years ago

check out any of the ones checked off here: https://github.com/sensu-plugins/community/issues/41

dcos was the initial one and probably has the most coverage.

absolutejam commented 6 years ago

@majormoses Changes taken into consideration.

Hope you don't mind the .rubocop.yml tweaks too, but they didn't make sense for rspec files.

absolutejam commented 6 years ago

Oops, thanks for spotting that.

Added tests to check both long and short flags, tweaking original tests to better emulate CLI args (Using parse_options instead of directly setting the values) 👍

absolutejam commented 6 years ago

Do you want the commits squashing for tidiness?

majormoses commented 6 years ago

Before githb offered it I often requested people to. Now I generally use the squash and rebase option to accept a contribution when there are a lot of commits with messages with little overall value. If the commits paint a story of how we got there and it is valuable I do a rebase and merge. I never use the actual "Merge" option as it pollutes the history.

majormoses commented 6 years ago

If, you'd like to tidy up your commits I can certainly wait for you to accept this.

absolutejam commented 6 years ago

I didn't even know GitHub could do that...

majormoses commented 6 years ago

It is a somewhat new feature and one that I have been requesting for years (mostly because merge with out fast farwarding is a terrible idea), you can read about the different functions here: https://help.github.com/articles/about-merge-methods-on-github in my orgs I actually disable the normal merge option as merging without fast farwarding is a terrible idea.

majormoses commented 6 years ago

released: https://rubygems.org/gems/sensu-plugins-windows/versions/2.4.0