-
Notifications
You must be signed in to change notification settings - Fork 487
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
Show Guards in Guardfile #91
Conversation
Awesome, thanks. Can you just add some info about this great feature in the README, inside man pages give more bonus points ;-) |
@@ -127,6 +127,9 @@ describe Guard::Dsl do | |||
lambda { subject.evaluate_guardfile(:guardfile_contents => invalid_guardfile_string ) }.should raise_error | |||
end | |||
|
|||
it "should generate a displayable structure from the Guardfile data" do |
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.
nice empty spec :)
can you complete or remove it ?
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.
Oops, leftover from trying to figure out the best place for that. Removed.
@thibaudgg, what tool do I use to generate the actual man page so I know I'm doing it right? |
I used ronn like this BTW, I've mostly followed the instructions here: http://shairosenfeld.com/blog/index.php/2011/04/ruby-gems-and-man-pages and here: http://rtomayko.github.com/ronn/ronn-format.7 |
OK I think I build the manpage right. I cleaned it up a bit more, and added a few of the other commands. |
Awesome! Thanks for completing the manpage! |
This addition adds a new CLI method,
show
(aliased to-T
to work like Rake/Capistrano), which concisely lists what's in the Guardfile and in what group:It does it by creating a new DSL introspection class based on
Guard::Dsl
which prepares a subset of Guardfile structure for display. Individualwatch
es are not shown, since showing those would be a little too much like actually opening the Guardfile.Written 'cause I was getting lazy about cracking open Guardfiles on all my projects to see what projects had what groups available for running. :) Hopefully should also help new people on Guard-using projects get up to speed with Guard usage faster.