guard-rake 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  .rvmrc
2
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2011 Scott Barron
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # Guard::Rake
2
+
3
+ Guard::Rake allows you to automatically run a Rake task when files are
4
+ modified.
5
+
6
+ ## Install
7
+
8
+ Please be sure to have [Guard](https://github.com/guard/guard) installed
9
+ before continuing.
10
+
11
+ Install the gem:
12
+ ```bash
13
+ $ gem install guard-rake```
14
+
15
+ Add it to your `Gemfile`
16
+
17
+ ```ruby
18
+ gem 'guard-rake'
19
+ ```
20
+
21
+ Add the default Guard::Rake template to your `Guardfile` by running this
22
+ command:
23
+
24
+ ```bash
25
+ $ guard init rake
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ Please read the [Guard usage documentation](https://github.com/guard/guard#readme).
31
+
32
+ ## Guardfile
33
+
34
+ Guard::Rake comes with a default template that looks like this:
35
+
36
+ ```ruby
37
+ guard 'rake', :task => 'doit' do
38
+ watch(%r{^some_files/.+$})
39
+ end
40
+ ```
41
+
42
+ This will run the rake task `doit` from your `Rakefile` whenever any of
43
+ the watched files change.
44
+
45
+ ### List of available options:
46
+
47
+ ``` ruby
48
+ :task => 'doit' # name of the task to be executed, required
49
+ :run_on_all => false # runs when the 'run_all' signal is received from Guard (enter is pressed), default: true
50
+ ```
51
+
52
+ ## Development
53
+
54
+ - Source hosted at [GitHub](https://github.com/rubyist/guard-rake)
55
+ - Report issues and feature requests to [GitHub Issues](https://github.com/rubyist/guard-rake/issues)
56
+
57
+ Pull requests welcome!
58
+
59
+ ## License
60
+
61
+ (The MIT License)
62
+
63
+ Copyright (c) 2011 Scott Barron
64
+
65
+ Permission is hereby granted, free of charge, to any person obtaining
66
+ a copy of this software and associated documentation files (the
67
+ 'Software'), to deal in the Software without restriction, including
68
+ without limitation the rights to use, copy, modify, merge, publish,
69
+ distribute, sublicense, and/or sell copies of the Software, and to
70
+ permit persons to whom the Software is furnished to do so, subject to
71
+ the following conditions:
72
+
73
+ The above copyright notice and this permission notice shall be
74
+ included in all copies or substantial portions of the Software.
75
+
76
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
77
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
79
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
80
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
81
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
82
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
83
+
data/guard-rake.gemspec CHANGED
@@ -4,7 +4,7 @@ require 'guard/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'guard-rake'
7
- s.version = Guard::Rake::VERSION
7
+ s.version = Guard::RakeVersion::VERSION
8
8
  s.authors = ['Scott Barron']
9
9
  s.email = ['scott@elitists.net']
10
10
  s.homepage = 'http://github.com/rubyist/guard-rake'
data/lib/guard/rake.rb CHANGED
@@ -7,8 +7,11 @@ module Guard
7
7
  include ::Rake::DSL
8
8
 
9
9
  def initialize(watchers=[], options={})
10
- @task = options[:task]
11
10
  super
11
+ @options = {
12
+ run_on_all: true
13
+ }.update(options)
14
+ @task = @options[:task]
12
15
  end
13
16
 
14
17
  def start
@@ -28,7 +31,7 @@ module Guard
28
31
  end
29
32
 
30
33
  def run_all
31
- run_rake_task
34
+ run_rake_task if @options[:run_on_all]
32
35
  end
33
36
 
34
37
  def run_on_change(paths)
data/lib/guard/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Guard
2
- module Rake
3
- VERSION = "0.0.1"
2
+ module RakeVersion
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-rake
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Barron
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-01 00:00:00 -04:00
14
- default_executable:
13
+ date: 2012-01-04 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: guard
@@ -48,12 +47,13 @@ files:
48
47
  - .gitignore
49
48
  - Gemfile
50
49
  - Gemfile.lock
50
+ - LICENSE
51
+ - README.md
51
52
  - Rakefile
52
53
  - guard-rake.gemspec
53
54
  - lib/guard/rake.rb
54
55
  - lib/guard/rake/templates/Guardfile
55
56
  - lib/guard/version.rb
56
- has_rdoc: true
57
57
  homepage: http://github.com/rubyist/guard-rake
58
58
  licenses: []
59
59
 
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements: []
78
78
 
79
79
  rubyforge_project:
80
- rubygems_version: 1.6.2
80
+ rubygems_version: 1.8.13
81
81
  signing_key:
82
82
  specification_version: 3
83
83
  summary: Guard for running rake tasks