tj / commander

The complete solution for Ruby command-line executables
http://visionmedia.github.com/commander
MIT License
1.09k stars 64 forks source link

Fixes #16 and #17 #65

Closed jamesrwhite closed 10 years ago

jamesrwhite commented 10 years ago

Firstly I know these are very old issues but I've just stumbled across this project and it seems pretty perfect for my needs aside from these two small things.

I looked at the two issues (https://github.com/visionmedia/commander/issues/16 and https://github.com/visionmedia/commander/issues/17) and put the solutions to them (all credit for those goes to @KieranP) into my own fork.

I also fixed a deprecation warning that RSpec moans about.

ggilder commented 10 years ago

Awesome, thanks for taking that on! It looks like the last two commits here could be squashed — would you mind doing that and also adding an example of usage to the readme? Then I will be happy to merge!

jamesrwhite commented 10 years ago

I've never 'squashed' commits before, I think I might have made a bit of a mess of it :( Not sure if that's fixable?

I've updated the README, added the two methods to the delegates.rb to make them easier to use and added two simple tests.

ggilder commented 10 years ago

Yeah, those commits got a bit weird — that's ok, I can take care of squashing them and merge manually.

I think I'm actually going to change the command names to always_trace and never_trace, because that seems more descriptive. Does that sound good to you?

jamesrwhite commented 10 years ago

Thanks for that.

Changing the names to those makes sense to me. I'm relatively new to ruby so correct me if I'm wrong here but should we also append ! to the method names as they modify the Commander::Runner instance?

ggilder commented 10 years ago

Cool, I made those changes and opened a new PR: https://github.com/visionmedia/commander/pull/67

Let me know what you think!