-
Notifications
You must be signed in to change notification settings - Fork 0
List of Guard Commands
Just launch Guard through Bundler inside your Ruby or Rails project with:
$ bundle exec guardAdditional commands can be appended to the end of the Guard command.
$ bundle exec guard <command>- Init - setup a new Guardfile with default plugin config templates
- Help - show detailed help for other commands
- List - show available and used plugins
- Show - show configuration options for each used plugin
- Notifiers - show list of available notifiers and which ones are used
You can generate a Guardfile and have all installed plugins be automatically added into
it by running the init task without any option:
$ bundle exec guard initYou can also specify the name of an installed plugin to only get that plugin template in the generated Guardfile:
$ bundle exec guard init <guard-name>You can also specify the names of multiple plugins to only get those plugin templates in the generated Guardfile:
$ bundle exec guard init <guard1-name> <guard2-name>You can also define your own templates in ~/.guard/templates/ which can be appended in the same way to your existing
Guardfile:
$ bundle exec guard init <template-name>Note: If you already have a Guardfile in the current directory, the init task can be used
to append a supplied template from an installed plugin to your existing Guardfile.
You also can generate an empty Guardfile by running the init task with the bare
option: (-b/--bare)
$ bundle exec guard init --bare
$ bundle exec guard init -b # shortcutYou can always get help on the available tasks with the help task:
$ bundle exec guard helpRequesting more detailed help on a specific task is simple: just append the task name to the help task.
For example, to get help for the start task, simply run:
$ bundle exec guard help startYou can list the available plugins with the list task:
$ bundle exec guard list
+----------+--------------+
| Plugin | In Guardfile |
+----------+--------------+
| Compass | ✘ |
| Cucumber | ✘ |
| Jammit | ✘ |
| Ronn | ✔ |
| Rspec | ✔ |
| Spork | ✘ |
| Yard | ✘ |
+----------+--------------+You can show the structure of the groups and their plugins with the show task:
$ bundle exec guard show
+---------+--------+-----------------+----------------------------+
| Group | Plugin | Option | Value |
+---------+--------+-----------------+----------------------------+
| Specs | Rspec | all_after_pass | true |
| | | all_on_start | true |
| | | cli | "--fail-fast --format doc" |
| | | focus_on_failed | false |
| | | keep_failed | true |
| | | run_all | {} |
| | | spec_paths | ["spec"] |
+---------+--------+-----------------+----------------------------+
| Docs | Ronn | | |
+---------+--------+-----------------+----------------------------+This shows the internal structure of the evaluated Guardfile or .Guardfile, with the .guard.rb file. You can
read more about these files in the shared configuration section.
You can show the notifiers, their availablity and options with the notifier task:
$ bundle exec guard notifiers
+-------------------+-----------+------+------------------------+-------------------+
| Name | Available | Used | Option | Value |
+-------------------+-----------+------+------------------------+-------------------+
| gntp | ✔ | ✘ | sticky | false |
+-------------------+-----------+------+------------------------+-------------------+
| growl | ✘ | ✘ | sticky | false |
| | | | priority | 0 |
+-------------------+-----------+------+------------------------+-------------------+This shows if a notifier is available on the current system, if it's being used and the current options (which reflects your custom options merged into the default options).
This wiki and the Guard README document contains a lot of information, please take your time and read these instructions carefully.
If you run into any trouble, you may start by understanding how Guard works.
We provide detailed changes for each Guard release.
Be sure to read the CONTRIBUTING guidelines before reporting a new Guard issue or open a pull request.
If you have any questions about the Guard usage or want to share some information with the Guard community, please go to one of the following places:
- Google+ community
- Google group
- StackOverflow
- IRC channel
#guard(irc.freenode.net) for chatting
Intro
Installation
- System Notifications
- Terminal Colors on Windows
- Add Readline support to Ruby on Mac OS X
- Which Growl library should I use
- Efficient Filesystem Handling
Getting Started
- List of Guard Commands
- Command Line Options for Guard
- List of available Guards
- Guardfile examples
- Run Guard within RubyMine
- Guardfile-DSL / Configuring-Guard
- Configuration Files
- Interacting with Guard
- Guard Signals
Troubleshooting
Advanced use of Guard
Cookbooks
Development