guard-sidekiq 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +13 -0
- data/README.markdown +8 -0
- data/guard-sidekiq.gemspec +1 -1
- data/lib/guard/sidekiq.rb +2 -3
- data/lib/guard/sidekiq/version.rb +2 -2
- data/spec/guard/sidekiq_spec.rb +10 -10
- metadata +28 -51
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 51857290b9b6d67b9572573c5dffd6329c8c58a3
|
4
|
+
data.tar.gz: 8db0f9dc155cd36398e2912aa93fd0e7736b8a20
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 20fba084a90661357fd6ad91cf4fe72c8e6422b48029e8e8ffa8a198e344c83720da434266fee3b3c6d0c90bb3b15a98dfbe38f17d8d891bf6299c807dd2e5ba
|
7
|
+
data.tar.gz: 3e8ea784643b0d4051927e48473aada8610d54dc6d9cc1c6e4a71dd4f63c555e2456771d2584c0d95e36d5b7e74520ae4d428d790a12a74ea2cb99176db82ba9
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2013 Uken Games
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/README.markdown
CHANGED
@@ -47,6 +47,7 @@ You can customize the sidekiq task via the following options:
|
|
47
47
|
* `verbose`: whether to use verbose logging (defaults to `nil`)
|
48
48
|
* `stop_signal`: how to kill the process when restarting (defaults to `TERM`)
|
49
49
|
* `require`: location of rails application with workers or file to require (defaults to `nil`)
|
50
|
+
* `config`: can specify a config file to load queue settings
|
50
51
|
|
51
52
|
|
52
53
|
## Development
|
@@ -93,3 +94,10 @@ Pitr Vernigorov
|
|
93
94
|
[David Parry](https://github.com/suranyami)
|
94
95
|
|
95
96
|
Replaces "rescue" with "sidekiq"
|
97
|
+
|
98
|
+
## Copyright
|
99
|
+
|
100
|
+
* Copyright
|
101
|
+
* Copyright 2013 Uken Games
|
102
|
+
* License
|
103
|
+
* Apache License, Version 2.0
|
data/guard-sidekiq.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{guard gem for sidekiq}
|
13
13
|
s.description = %q{Guard::Sidekiq automatically starts/stops/restarts sidekiq worker}
|
14
14
|
|
15
|
-
s.add_dependency 'guard', '>=
|
15
|
+
s.add_dependency 'guard', '>= 2'
|
16
16
|
s.add_dependency 'sidekiq'
|
17
17
|
|
18
18
|
s.add_development_dependency 'bundler'
|
data/lib/guard/sidekiq.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
require 'guard'
|
2
|
-
require 'guard/guard'
|
3
2
|
require 'timeout'
|
4
3
|
|
5
4
|
module Guard
|
6
|
-
class Sidekiq <
|
5
|
+
class Sidekiq < Plugin
|
7
6
|
|
8
7
|
DEFAULT_SIGNAL = :TERM
|
9
8
|
DEFAULT_CONCURRENCY = 1
|
@@ -18,7 +17,7 @@ module Guard
|
|
18
17
|
# - :stop_signal e.g. :TERM, :QUIT or :SIGQUIT
|
19
18
|
# - :logfile e.g. log/sidekiq.log (defaults to STDOUT)
|
20
19
|
# - :require e.g. ./sidekiq_helper.rb
|
21
|
-
def initialize(
|
20
|
+
def initialize(options = {})
|
22
21
|
@options = options
|
23
22
|
@pid = nil
|
24
23
|
@stop_signal = options[:stop_signal] || DEFAULT_SIGNAL
|
data/spec/guard/sidekiq_spec.rb
CHANGED
@@ -6,13 +6,13 @@ describe Guard::Sidekiq do
|
|
6
6
|
it 'accepts :environment option' do
|
7
7
|
environment = :foo
|
8
8
|
|
9
|
-
obj = Guard::Sidekiq.new
|
9
|
+
obj = Guard::Sidekiq.new :environment => environment
|
10
10
|
obj.send(:cmd).should include "--environment #{environment}"
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'accepts :logfile option' do
|
14
14
|
logfile = 'log/sidekiq.log'
|
15
|
-
obj = Guard::Sidekiq.new
|
15
|
+
obj = Guard::Sidekiq.new :logfile => logfile
|
16
16
|
obj.send(:cmd).should include "--logfile #{logfile}"
|
17
17
|
end
|
18
18
|
|
@@ -20,14 +20,14 @@ describe Guard::Sidekiq do
|
|
20
20
|
it 'accepts one queue' do
|
21
21
|
queue = :foo
|
22
22
|
|
23
|
-
obj = Guard::Sidekiq.new
|
23
|
+
obj = Guard::Sidekiq.new :queue => queue
|
24
24
|
obj.send(:cmd).should include "--queue #{queue}"
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'accepts array of :queue options' do
|
28
28
|
queue = ['foo,4', 'default']
|
29
29
|
|
30
|
-
obj = Guard::Sidekiq.new
|
30
|
+
obj = Guard::Sidekiq.new :queue => queue
|
31
31
|
obj.send(:cmd).should include "--queue #{queue.first} --queue #{queue.last}"
|
32
32
|
end
|
33
33
|
end
|
@@ -35,37 +35,37 @@ describe Guard::Sidekiq do
|
|
35
35
|
it 'should accept :timeout option' do
|
36
36
|
timeout = 2
|
37
37
|
|
38
|
-
obj = Guard::Sidekiq.new
|
38
|
+
obj = Guard::Sidekiq.new :timeout => timeout
|
39
39
|
obj.send(:cmd).should include "--timeout #{timeout}"
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'should accept :concurrency option' do
|
43
43
|
concurrency = 2
|
44
44
|
|
45
|
-
obj = Guard::Sidekiq.new
|
45
|
+
obj = Guard::Sidekiq.new :concurrency => concurrency
|
46
46
|
obj.send(:cmd).should include "--concurrency #{concurrency}"
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'should accept :config option' do
|
50
50
|
config = 'sidekiq.yml'
|
51
51
|
|
52
|
-
obj = Guard::Sidekiq.new
|
52
|
+
obj = Guard::Sidekiq.new :config => config
|
53
53
|
obj.send(:cmd).should include "-C #{config}"
|
54
54
|
end
|
55
55
|
|
56
56
|
|
57
57
|
it 'should accept :verbose option' do
|
58
|
-
obj = Guard::Sidekiq.new
|
58
|
+
obj = Guard::Sidekiq.new :verbose => true
|
59
59
|
obj.send(:cmd).should include '--verbose'
|
60
60
|
end
|
61
61
|
|
62
62
|
it 'should accept :require option' do
|
63
|
-
obj = Guard::Sidekiq.new
|
63
|
+
obj = Guard::Sidekiq.new :require => './sidekiq_helper.rb'
|
64
64
|
obj.send(:cmd).should include '--require ./sidekiq_helper.rb'
|
65
65
|
end
|
66
66
|
|
67
67
|
it 'should provide default options' do
|
68
|
-
obj = Guard::Sidekiq.new
|
68
|
+
obj = Guard::Sidekiq.new
|
69
69
|
obj.send(:cmd).should include "--concurrency #{Guard::Sidekiq::DEFAULT_CONCURRENCY}"
|
70
70
|
obj.send(:cmd).should include '--verbose'
|
71
71
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mark Bolusmjak
|
@@ -10,134 +9,118 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: guard
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
20
|
+
version: '2'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
27
|
+
version: '2'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: sidekiq
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - ">="
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '0'
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - ">="
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '0'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: bundler
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - ">="
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - ">="
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: rb-fsevent
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - ">="
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '0'
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - ">="
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '0'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: rake
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - ">="
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '0'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - ">="
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '0'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: rspec
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- - ~>
|
88
|
+
- - "~>"
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: 2.5.0
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- - ~>
|
95
|
+
- - "~>"
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: 2.5.0
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: guard-rspec
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- -
|
102
|
+
- - ">="
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 0.2.0
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- -
|
109
|
+
- - ">="
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 0.2.0
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: guard-bundler
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- -
|
116
|
+
- - ">="
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: 0.1.1
|
135
119
|
type: :development
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- -
|
123
|
+
- - ">="
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: 0.1.1
|
143
126
|
description: Guard::Sidekiq automatically starts/stops/restarts sidekiq worker
|
@@ -147,11 +130,12 @@ executables: []
|
|
147
130
|
extensions: []
|
148
131
|
extra_rdoc_files: []
|
149
132
|
files:
|
150
|
-
- .gitignore
|
151
|
-
- .travis.yml
|
133
|
+
- ".gitignore"
|
134
|
+
- ".travis.yml"
|
152
135
|
- CHANGELOG.md
|
153
136
|
- Gemfile
|
154
137
|
- Guardfile
|
138
|
+
- LICENSE.txt
|
155
139
|
- README.markdown
|
156
140
|
- Rakefile
|
157
141
|
- guard-sidekiq.gemspec
|
@@ -163,33 +147,26 @@ files:
|
|
163
147
|
- spec/spec_helper.rb
|
164
148
|
homepage: http://github.com/uken/guard-sidekiq
|
165
149
|
licenses: []
|
150
|
+
metadata: {}
|
166
151
|
post_install_message:
|
167
152
|
rdoc_options: []
|
168
153
|
require_paths:
|
169
154
|
- lib
|
170
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
-
none: false
|
172
156
|
requirements:
|
173
|
-
- -
|
157
|
+
- - ">="
|
174
158
|
- !ruby/object:Gem::Version
|
175
159
|
version: '0'
|
176
|
-
segments:
|
177
|
-
- 0
|
178
|
-
hash: 3362156540621315414
|
179
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
-
none: false
|
181
161
|
requirements:
|
182
|
-
- -
|
162
|
+
- - ">="
|
183
163
|
- !ruby/object:Gem::Version
|
184
164
|
version: '0'
|
185
|
-
segments:
|
186
|
-
- 0
|
187
|
-
hash: 3362156540621315414
|
188
165
|
requirements: []
|
189
166
|
rubyforge_project:
|
190
|
-
rubygems_version:
|
167
|
+
rubygems_version: 2.2.2
|
191
168
|
signing_key:
|
192
|
-
specification_version:
|
169
|
+
specification_version: 4
|
193
170
|
summary: guard gem for sidekiq
|
194
171
|
test_files:
|
195
172
|
- spec/guard/sidekiq_spec.rb
|