Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Readme section for creating new Guard is unclear #261

Merged
merged 2 commits into from

2 participants

@spadin

I'm confused by the use of the term guard-name in the README section for creating a new guard. It's unclear whether you should be using the actual word "guard" or the name of your Guard.

spadin added some commits
@spadin spadin Removes the usage of the term `guard-name`. `guard-name` was used wit…
…h different meanings in the same context making this section very difficult to understand.
54ae028
@spadin spadin Didn't finish updating the section correctly. a49181b
@rymai
Owner

Very good catch!!

Thanks very much for clarifying all that! :)

@rymai rymai merged commit 9e36762 into guard:master
@rymai
Owner

And you're in the CHANGELOG now! :clap:

@spadin

Nice. Thanks! :smile:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2012
  1. @spadin

    Removes the usage of the term `guard-name`. `guard-name` was used wit…

    spadin authored
    …h different meanings in the same context making this section very difficult to understand.
  2. @spadin
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 11 deletions.
  1. +10 −11 README.md
View
21 README.md
@@ -760,13 +760,12 @@ You may also need to pay attention to the values of `max_queued_events` and `max
Create a Guard
--------------
-Creating a new Guard is very easy, just create a new gem by running `bundle gem guard-name`, where `name` is
-the name of your Guard. Please make your Guard start with `guard-`, so that it can easily be found on RubyGems.
+Creating a new Guard is very easy. For example, to create a Guard named `yoyo` just create a new gem by running `bundle gem guard-yoyo`. Please make your Guard start with `guard-`, so that it can easily be found on RubyGems.
```bash
-$ mkdir guard-name
-$ cd guard-name
-$ bundle gem guard-name
+$ mkdir guard-yoyo
+$ cd guard-yoyo
+$ bundle gem guard-yoyo
```
Now extend the project structure to have an initial Guard:
@@ -775,31 +774,31 @@ Now extend the project structure to have an initial Guard:
.travis.yml # bonus point!
CHANGELOG.md # bonus point!
Gemfile
-guard-name.gemspec
+guard-yoyo.gemspec
Guardfile
lib/
guard/
- guard-name/
+ yoyo/
templates/
Guardfile # needed for `guard init <guard-name>`
version.rb
- guard-name.rb
+ yoyo.rb
test/ # or spec/
README.md
```
-Your Guard main class `Guard::GuardName` in `lib/guard/guard-name.rb` must inherit from
+Your Guard main class `Guard::Yoyo` in `lib/guard/guard-yoyo.rb` must inherit from
[Guard::Guard](http://rubydoc.info/github/guard/guard/master/Guard/Guard) and should overwrite at least the
`#run_on_change` task methods.
-Here is an example scaffold for `lib/guard/guard-name.rb`:
+Here is an example scaffold for `lib/guard/yoyo.rb`:
```ruby
require 'guard'
require 'guard/guard'
module Guard
- class GuardName < Guard
+ class Yoyo < Guard
# Initialize a Guard.
# @param [Array<Guard::Watcher>] watchers the Guard file watchers
Something went wrong with that request. Please try again.