guard-resque 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,9 +30,13 @@ being active.
30
30
  ## Guardfile
31
31
 
32
32
  guard 'resque', :environment => 'development' do
33
- watch(%r{^app/(.+)\.rb})
33
+ watch(%r{^app/(.+)\.rb$})
34
+ watch(%r{^lib/(.+)\.rb$})
34
35
  end
35
36
 
37
+ Feel free to be more specific, for example watching only for `app/models` and `app/jobs`
38
+ to avoid reloading on a javascript file change.
39
+
36
40
  ## Options
37
41
 
38
42
  You can customize the resque task via the following options:
@@ -40,6 +44,7 @@ You can customize the resque task via the following options:
40
44
  * `environment`: the rails environment to run the workers in (defaults to `nil`)
41
45
  * `task`: the name of the rake task to use (defaults to `"resque:work"`)
42
46
  * `queue`: the resque queue to run (defaults to `"*"`)
47
+ * `interval`: the interval to use for checking for new resque jobs (defaults to `5`)
43
48
  * `count`: the number of workers to include (defaults to `1`)
44
49
  * `verbose`: whether to use verbose logging (defaults to `nil`)
45
50
  * `vverbose`: whether to use very verbose logging (defaults to `nil`)
@@ -86,4 +91,3 @@ Ideas for this gem came from [Guard::WEBrick](http://github.com/fnichol/guard-we
86
91
 
87
92
  I hacked this together from the `guard-delayed` gem for use with Resque. All credit go to the original authors though. I just search/replaced and tweaked a few things
88
93
 
89
-
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  s.name = "guard-resque"
7
7
  s.version = Guard::ResqueVersion::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Jacques Crocker", "Ryan Long", "David Parry"]
10
- s.email = ["railsjedi@gmail.com", 'ryan@rtlong.com']
9
+ s.authors = ["Jacques Crocker", "Ryan Long", "David Parry", "Jim Deville"]
10
+ s.email = ["railsjedi@gmail.com", 'ryan@rtlong.com', 'james.deville@gmail.com']
11
11
  s.homepage = 'http://github.com/railsjedi/guard-resque'
12
12
  s.summary = %q{guard gem for resque}
13
13
  s.description = %q{Guard::Resque automatically starts/stops/restarts resque worker}
@@ -1,5 +1,6 @@
1
1
  require 'guard'
2
2
  require 'guard/guard'
3
+ require 'timeout'
3
4
 
4
5
  module Guard
5
6
  class Resque < Guard
@@ -15,6 +16,7 @@ module Guard
15
16
  # - :task .e.g 'resque:work'
16
17
  # - :queue e.g. '*'
17
18
  # - :count e.g. 3
19
+ # - :interval e.g. 5
18
20
  # - :verbose e.g. true
19
21
  # - :vverbose e.g. true
20
22
  # - :trace e.g. true
@@ -94,6 +96,7 @@ module Guard
94
96
  def env
95
97
  var = Hash.new
96
98
 
99
+ var['INTERVAL'] = @options[:interval].to_s if @options[:interval]
97
100
  var['QUEUE'] = @options[:queue].to_s if @options[:queue]
98
101
  var['COUNT'] = @options[:count].to_s if @options[:count]
99
102
  var['RAILS_ENV'] = @options[:environment].to_s if @options[:environment]
@@ -105,3 +108,4 @@ module Guard
105
108
  end
106
109
  end
107
110
  end
111
+
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module ResqueVersion
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,21 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jacques Crocker
9
9
  - Ryan Long
10
10
  - David Parry
11
+ - Jim Deville
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2012-02-20 00:00:00.000000000 Z
15
+ date: 2012-05-10 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: guard
18
- requirement: &9480740 !ruby/object:Gem::Requirement
19
+ requirement: !ruby/object:Gem::Requirement
19
20
  none: false
20
21
  requirements:
21
22
  - - ! '>='
@@ -23,10 +24,15 @@ dependencies:
23
24
  version: '0.8'
24
25
  type: :runtime
25
26
  prerelease: false
26
- version_requirements: *9480740
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0.8'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: resque
29
- requirement: &9480060 !ruby/object:Gem::Requirement
35
+ requirement: !ruby/object:Gem::Requirement
30
36
  none: false
31
37
  requirements:
32
38
  - - ! '>='
@@ -34,10 +40,15 @@ dependencies:
34
40
  version: '0'
35
41
  type: :runtime
36
42
  prerelease: false
37
- version_requirements: *9480060
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
38
49
  - !ruby/object:Gem::Dependency
39
50
  name: bundler
40
- requirement: &9478340 !ruby/object:Gem::Requirement
51
+ requirement: !ruby/object:Gem::Requirement
41
52
  none: false
42
53
  requirements:
43
54
  - - ! '>='
@@ -45,10 +56,15 @@ dependencies:
45
56
  version: '0'
46
57
  type: :development
47
58
  prerelease: false
48
- version_requirements: *9478340
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
49
65
  - !ruby/object:Gem::Dependency
50
66
  name: rake
51
- requirement: &9477480 !ruby/object:Gem::Requirement
67
+ requirement: !ruby/object:Gem::Requirement
52
68
  none: false
53
69
  requirements:
54
70
  - - ! '>='
@@ -56,10 +72,15 @@ dependencies:
56
72
  version: '0'
57
73
  type: :development
58
74
  prerelease: false
59
- version_requirements: *9477480
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
60
81
  - !ruby/object:Gem::Dependency
61
82
  name: rspec
62
- requirement: &9493020 !ruby/object:Gem::Requirement
83
+ requirement: !ruby/object:Gem::Requirement
63
84
  none: false
64
85
  requirements:
65
86
  - - ~>
@@ -67,10 +88,15 @@ dependencies:
67
88
  version: 2.5.0
68
89
  type: :development
69
90
  prerelease: false
70
- version_requirements: *9493020
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 2.5.0
71
97
  - !ruby/object:Gem::Dependency
72
98
  name: guard-rspec
73
- requirement: &9492080 !ruby/object:Gem::Requirement
99
+ requirement: !ruby/object:Gem::Requirement
74
100
  none: false
75
101
  requirements:
76
102
  - - ! '>='
@@ -78,10 +104,15 @@ dependencies:
78
104
  version: 0.2.0
79
105
  type: :development
80
106
  prerelease: false
81
- version_requirements: *9492080
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: 0.2.0
82
113
  - !ruby/object:Gem::Dependency
83
114
  name: guard-bundler
84
- requirement: &9491100 !ruby/object:Gem::Requirement
115
+ requirement: !ruby/object:Gem::Requirement
85
116
  none: false
86
117
  requirements:
87
118
  - - ! '>='
@@ -89,11 +120,17 @@ dependencies:
89
120
  version: 0.1.1
90
121
  type: :development
91
122
  prerelease: false
92
- version_requirements: *9491100
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ! '>='
127
+ - !ruby/object:Gem::Version
128
+ version: 0.1.1
93
129
  description: Guard::Resque automatically starts/stops/restarts resque worker
94
130
  email:
95
131
  - railsjedi@gmail.com
96
132
  - ryan@rtlong.com
133
+ - james.deville@gmail.com
97
134
  executables: []
98
135
  extensions: []
99
136
  extra_rdoc_files: []
@@ -131,9 +168,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
168
  version: 1.3.6
132
169
  requirements: []
133
170
  rubyforge_project: guard-resque
134
- rubygems_version: 1.8.15
171
+ rubygems_version: 1.8.24
135
172
  signing_key:
136
173
  specification_version: 3
137
174
  summary: guard gem for resque
138
- test_files: []
139
- has_rdoc:
175
+ test_files:
176
+ - spec/guard/resque_spec.rb
177
+ - spec/spec_helper.rb