dronejob 2.0.2 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +88 -12
- data/Gemfile.lock +143 -147
- data/README.md +0 -4
- data/dronejob.gemspec +9 -11
- data/lib/dronejob.rb +0 -4
- data/lib/dronejob/base.rb +0 -3
- data/lib/dronejob/command.rb +3 -21
- data/lib/dronejob/modules/git.rb +1 -0
- data/lib/dronejob/modules/log.rb +3 -2
- data/lib/dronejob/modules/phases.rb +1 -0
- data/lib/dronejob/version.rb +1 -1
- metadata +34 -41
- data/lib/dronejob/modules/queue.rb +0 -76
- data/lib/dronejob/railtie.rb +0 -25
- data/lib/dronejob/railties/dronejob.rake +0 -5
- data/lib/dronejob/server.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2a63ea40c1eec60c227ff462f07e631976b3559434eee2ef791931823c7806cf
|
4
|
+
data.tar.gz: 8bf04ed23e899f5b65c3fa5f77d4cf9fffc1ccf8ef1428e82c51751ee26251bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5513d3f5cbb14d2e3f4d7cb53d10343f441567908dd7013152ca4efb7d640d7fc1e41cde665e55882345c2a9f6d01c56de21de4e1170daeee39fbd14293945fe
|
7
|
+
data.tar.gz: 51be755b012d8a2e847cb70b5dfb29d0bed271fc4038a14ff8a7065b077fb0548ad9086d063dfbd7959c683a03af2ad9d3b3fb80794503a58456f5ed3453dddb
|
data/.rubocop.yml
CHANGED
@@ -6,10 +6,6 @@ Style/SymbolArray:
|
|
6
6
|
Style/ClassCheck:
|
7
7
|
EnforcedStyle: kind_of?
|
8
8
|
|
9
|
-
# It's better to be more explicit about the type
|
10
|
-
Style/BracesAroundHashParameters:
|
11
|
-
Enabled: false
|
12
|
-
|
13
9
|
Style/TernaryParentheses:
|
14
10
|
Enabled: true
|
15
11
|
EnforcedStyle: require_parentheses_when_complex
|
@@ -20,10 +16,10 @@ Lint/UselessAssignment:
|
|
20
16
|
- '**/spec/**/*'
|
21
17
|
|
22
18
|
# We could potentially enable the 2 below:
|
23
|
-
Layout/
|
19
|
+
Layout/FirstHashElementIndentation:
|
24
20
|
Enabled: false
|
25
21
|
|
26
|
-
Layout/
|
22
|
+
Layout/HashAlignment:
|
27
23
|
Enabled: false
|
28
24
|
|
29
25
|
# HoundCI doesn't like this rule
|
@@ -38,10 +34,7 @@ Style/NumericPredicate:
|
|
38
34
|
Enabled: false
|
39
35
|
|
40
36
|
# Sometimes we allow a rescue block that doesn't contain code
|
41
|
-
Lint/
|
42
|
-
Enabled: false
|
43
|
-
|
44
|
-
Style/RescueStandardError:
|
37
|
+
Lint/SuppressedException:
|
45
38
|
Enabled: false
|
46
39
|
|
47
40
|
# Cop supports --auto-correct.
|
@@ -74,7 +67,7 @@ Metrics/CyclomaticComplexity:
|
|
74
67
|
Enabled: false
|
75
68
|
|
76
69
|
Metrics/BlockNesting:
|
77
|
-
Max:
|
70
|
+
Max: 4
|
78
71
|
|
79
72
|
Metrics/BlockLength:
|
80
73
|
Enabled: false
|
@@ -185,8 +178,91 @@ Style/ClassVars:
|
|
185
178
|
Style/FrozenStringLiteralComment:
|
186
179
|
Enabled: false
|
187
180
|
|
181
|
+
Naming/FileName:
|
182
|
+
Enabled: false
|
183
|
+
|
184
|
+
Naming/MethodParameterName:
|
185
|
+
Enabled: false
|
186
|
+
|
187
|
+
Naming/MemoizedInstanceVariableName:
|
188
|
+
Enabled: false
|
189
|
+
|
190
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
Layout/SpaceAroundMethodCallOperator:
|
194
|
+
Enabled: true
|
195
|
+
|
196
|
+
Lint/DeprecatedOpenSSLConstant:
|
197
|
+
Enabled: true
|
198
|
+
|
199
|
+
Lint/DuplicateElsifCondition:
|
200
|
+
Enabled: true
|
201
|
+
|
202
|
+
Lint/MixedRegexpCaptureTypes:
|
203
|
+
Enabled: true
|
204
|
+
|
205
|
+
Lint/RaiseException:
|
206
|
+
Enabled: true
|
207
|
+
|
208
|
+
Lint/StructNewOverride:
|
209
|
+
Enabled: true
|
210
|
+
|
211
|
+
Style/AccessorGrouping:
|
212
|
+
Enabled: true
|
213
|
+
|
214
|
+
Style/ArrayCoercion:
|
215
|
+
Enabled: true
|
216
|
+
|
217
|
+
Style/BisectedAttrAccessor:
|
218
|
+
Enabled: true
|
219
|
+
|
220
|
+
Style/CaseLikeIf:
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
Style/ExponentialNotation:
|
224
|
+
Enabled: true
|
225
|
+
|
226
|
+
Style/HashAsLastArrayItem:
|
227
|
+
Enabled: true
|
228
|
+
|
229
|
+
Style/HashEachMethods:
|
230
|
+
Enabled: true
|
231
|
+
|
232
|
+
Style/HashLikeCase:
|
233
|
+
Enabled: true
|
234
|
+
|
235
|
+
Style/HashTransformKeys:
|
236
|
+
Enabled: true
|
237
|
+
|
238
|
+
Style/HashTransformValues:
|
239
|
+
Enabled: true
|
240
|
+
|
241
|
+
Style/RedundantAssignment:
|
242
|
+
Enabled: true
|
243
|
+
|
244
|
+
Style/RedundantFetchBlock:
|
245
|
+
Enabled: true
|
246
|
+
|
247
|
+
Style/RedundantFileExtensionInRequire:
|
248
|
+
Enabled: true
|
249
|
+
|
250
|
+
Style/RedundantRegexpCharacterClass:
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Style/RedundantRegexpEscape:
|
254
|
+
Enabled: true
|
255
|
+
|
256
|
+
Style/SlicingWithRange:
|
257
|
+
Enabled: true
|
258
|
+
|
188
259
|
AllCops:
|
189
|
-
TargetRubyVersion: "2.
|
260
|
+
TargetRubyVersion: "2.4.0"
|
190
261
|
Exclude:
|
262
|
+
- './vendor/**/*'
|
263
|
+
- './db/**/*'
|
191
264
|
- './tmp/**/*'
|
265
|
+
- './log/**/*'
|
266
|
+
- './public/**/*'
|
267
|
+
- './bin/**/*'
|
192
268
|
- './Gemfile'
|
data/Gemfile.lock
CHANGED
@@ -1,211 +1,207 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dronejob (
|
5
|
-
actionpack (>= 4.0.2)
|
6
|
-
activejob (>= 4.0.2)
|
7
|
-
|
4
|
+
dronejob (3.0.1)
|
5
|
+
actionpack (>= 4.0.2, < 5.0.0)
|
6
|
+
activejob (>= 4.0.2, < 5.0.0)
|
7
|
+
bigdecimal (~> 1.4)
|
8
8
|
bundler (>= 1.12.0, < 3.0.0)
|
9
9
|
git (>= 1.3)
|
10
10
|
google-cloud-logging (>= 1.2)
|
11
|
-
pusher (>= 1.3)
|
12
11
|
thor (>= 0.19)
|
13
|
-
workspace (>=
|
14
|
-
workspace-archive (>=
|
15
|
-
workspace-media (>=
|
16
|
-
workspace-net (>=
|
17
|
-
workspace-parse (>=
|
12
|
+
workspace (>= 2.0)
|
13
|
+
workspace-archive (>= 2.0)
|
14
|
+
workspace-media (>= 2.0)
|
15
|
+
workspace-net (>= 2.0)
|
16
|
+
workspace-parse (>= 2.0)
|
18
17
|
|
19
18
|
GEM
|
20
19
|
remote: http://rubygems.org/
|
21
20
|
specs:
|
22
|
-
actionpack (
|
23
|
-
actionview (=
|
24
|
-
activesupport (=
|
25
|
-
rack (~>
|
26
|
-
rack-test (
|
27
|
-
rails-dom-testing (~>
|
21
|
+
actionpack (4.2.11.3)
|
22
|
+
actionview (= 4.2.11.3)
|
23
|
+
activesupport (= 4.2.11.3)
|
24
|
+
rack (~> 1.6)
|
25
|
+
rack-test (~> 0.6.2)
|
26
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
27
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (
|
30
|
-
activesupport (=
|
28
|
+
actionview (4.2.11.3)
|
29
|
+
activesupport (= 4.2.11.3)
|
31
30
|
builder (~> 3.1)
|
32
|
-
|
33
|
-
rails-dom-testing (~>
|
31
|
+
erubis (~> 2.7.0)
|
32
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
34
33
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (
|
36
|
-
activesupport (=
|
37
|
-
globalid (>= 0.3.
|
38
|
-
|
39
|
-
|
40
|
-
activesupport
|
41
|
-
concurrent-ruby
|
42
|
-
google-cloud-pubsub (>= 0.27.0)
|
43
|
-
activesupport (5.2.3)
|
44
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
-
i18n (>= 0.7, < 2)
|
34
|
+
activejob (4.2.11.3)
|
35
|
+
activesupport (= 4.2.11.3)
|
36
|
+
globalid (>= 0.3.0)
|
37
|
+
activesupport (4.2.11.3)
|
38
|
+
i18n (~> 0.7)
|
46
39
|
minitest (~> 5.1)
|
40
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
47
41
|
tzinfo (~> 1.1)
|
48
|
-
addressable (2.
|
49
|
-
public_suffix (>= 2.0.2, <
|
50
|
-
ast (2.4.
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
42
|
+
addressable (2.7.0)
|
43
|
+
public_suffix (>= 2.0.2, < 5.0)
|
44
|
+
ast (2.4.1)
|
45
|
+
bigdecimal (1.4.4)
|
46
|
+
builder (3.2.4)
|
47
|
+
coderay (1.1.3)
|
48
|
+
concurrent-ruby (1.1.6)
|
49
|
+
crass (1.0.6)
|
50
|
+
diff-lcs (1.4.4)
|
51
|
+
erubis (2.7.0)
|
57
52
|
ethon (0.12.0)
|
58
53
|
ffi (>= 1.3.0)
|
59
|
-
faraday (0.
|
54
|
+
faraday (1.0.1)
|
60
55
|
multipart-post (>= 1.2, < 3)
|
61
|
-
ffi (1.
|
62
|
-
git (1.
|
56
|
+
ffi (1.13.1)
|
57
|
+
git (1.7.0)
|
58
|
+
rchardet (~> 1.8)
|
63
59
|
globalid (0.4.2)
|
64
60
|
activesupport (>= 4.2.0)
|
65
|
-
google-cloud-core (1.
|
61
|
+
google-cloud-core (1.5.0)
|
66
62
|
google-cloud-env (~> 1.0)
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
google-cloud-errors (~> 1.0)
|
64
|
+
google-cloud-env (1.3.3)
|
65
|
+
faraday (>= 0.17.3, < 2.0)
|
66
|
+
google-cloud-errors (1.0.1)
|
67
|
+
google-cloud-logging (1.10.9)
|
70
68
|
concurrent-ruby (~> 1.1)
|
71
69
|
google-cloud-core (~> 1.2)
|
72
|
-
google-gax (~> 1.
|
73
|
-
googleapis-common-protos
|
70
|
+
google-gax (~> 1.8)
|
71
|
+
googleapis-common-protos (>= 1.3.9, < 2.0)
|
72
|
+
googleapis-common-protos-types (>= 1.0.4, < 2.0)
|
74
73
|
stackdriver-core (~> 1.3)
|
75
|
-
google-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
grpc
|
80
|
-
google-gax (1.5.0)
|
81
|
-
google-protobuf (~> 3.2)
|
82
|
-
googleapis-common-protos (>= 1.3.5, < 2.0)
|
83
|
-
googleauth (>= 0.6.2, < 0.10.0)
|
84
|
-
grpc (>= 1.7.2, < 2.0)
|
74
|
+
google-gax (1.8.1)
|
75
|
+
google-protobuf (~> 3.9)
|
76
|
+
googleapis-common-protos (>= 1.3.9, < 2.0)
|
77
|
+
googleauth (~> 0.9)
|
78
|
+
grpc (~> 1.24)
|
85
79
|
rly (~> 0.2.3)
|
86
|
-
google-protobuf (3.
|
87
|
-
googleapis-common-protos (1.3.
|
88
|
-
google-protobuf (~> 3.
|
89
|
-
googleapis-common-protos-types (
|
90
|
-
grpc (~> 1.
|
91
|
-
googleapis-common-protos-types (1.0.
|
92
|
-
google-protobuf (~> 3.
|
93
|
-
googleauth (0.
|
94
|
-
faraday (
|
80
|
+
google-protobuf (3.12.2-universal-darwin)
|
81
|
+
googleapis-common-protos (1.3.10)
|
82
|
+
google-protobuf (~> 3.11)
|
83
|
+
googleapis-common-protos-types (>= 1.0.5, < 2.0)
|
84
|
+
grpc (~> 1.27)
|
85
|
+
googleapis-common-protos-types (1.0.5)
|
86
|
+
google-protobuf (~> 3.11)
|
87
|
+
googleauth (0.13.0)
|
88
|
+
faraday (>= 0.17.3, < 2.0)
|
95
89
|
jwt (>= 1.4, < 3.0)
|
96
90
|
memoist (~> 0.16)
|
97
91
|
multi_json (~> 1.11)
|
98
92
|
os (>= 0.9, < 2.0)
|
99
|
-
signet (~> 0.
|
100
|
-
grpc (1.
|
101
|
-
google-protobuf (~> 3.
|
102
|
-
googleapis-common-protos-types (~> 1.0
|
103
|
-
|
104
|
-
googleapis-common-protos (>= 1.3.1, < 2.0)
|
105
|
-
grpc (~> 1.0)
|
106
|
-
haml (5.1.0)
|
93
|
+
signet (~> 0.14)
|
94
|
+
grpc (1.30.1-universal-darwin)
|
95
|
+
google-protobuf (~> 3.12)
|
96
|
+
googleapis-common-protos-types (~> 1.0)
|
97
|
+
haml (5.1.2)
|
107
98
|
temple (>= 0.8.0)
|
108
99
|
tilt
|
109
|
-
|
110
|
-
i18n (1.6.0)
|
100
|
+
i18n (0.9.5)
|
111
101
|
concurrent-ruby (~> 1.0)
|
112
|
-
|
113
|
-
|
114
|
-
loofah (2.2.3)
|
102
|
+
jwt (2.2.1)
|
103
|
+
loofah (2.6.0)
|
115
104
|
crass (~> 1.0.2)
|
116
105
|
nokogiri (>= 1.5.9)
|
117
|
-
memoist (0.16.
|
118
|
-
method_source (0.
|
119
|
-
mime-types (3.
|
106
|
+
memoist (0.16.2)
|
107
|
+
method_source (1.0.0)
|
108
|
+
mime-types (3.3.1)
|
120
109
|
mime-types-data (~> 3.2015)
|
121
|
-
mime-types-data (3.
|
110
|
+
mime-types-data (3.2020.0512)
|
122
111
|
mini_portile2 (2.4.0)
|
123
|
-
minitest (5.
|
124
|
-
multi_json (1.
|
112
|
+
minitest (5.14.1)
|
113
|
+
multi_json (1.15.0)
|
125
114
|
multipart-post (2.1.1)
|
126
|
-
nokogiri (1.10.
|
115
|
+
nokogiri (1.10.10)
|
127
116
|
mini_portile2 (~> 2.4.0)
|
128
|
-
os (1.0
|
129
|
-
parallel (1.
|
130
|
-
parser (2.
|
131
|
-
ast (~> 2.4.
|
117
|
+
os (1.1.0)
|
118
|
+
parallel (1.19.2)
|
119
|
+
parser (2.7.1.4)
|
120
|
+
ast (~> 2.4.1)
|
132
121
|
piet (0.2.6)
|
133
122
|
png_quantizator
|
134
123
|
png_quantizator (0.2.1)
|
135
|
-
pry (0.
|
136
|
-
coderay (~> 1.1
|
137
|
-
method_source (~>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
loofah (~> 2.2, >= 2.2.2)
|
124
|
+
pry (0.13.1)
|
125
|
+
coderay (~> 1.1)
|
126
|
+
method_source (~> 1.0)
|
127
|
+
psych (3.2.0)
|
128
|
+
public_suffix (4.0.5)
|
129
|
+
rack (1.6.13)
|
130
|
+
rack-test (0.6.3)
|
131
|
+
rack (>= 1.0)
|
132
|
+
rails-deprecated_sanitizer (1.0.3)
|
133
|
+
activesupport (>= 4.2.0.alpha)
|
134
|
+
rails-dom-testing (1.0.9)
|
135
|
+
activesupport (>= 4.2.0, < 5.0)
|
136
|
+
nokogiri (~> 1.6)
|
137
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
138
|
+
rails-html-sanitizer (1.3.0)
|
139
|
+
loofah (~> 2.3)
|
152
140
|
rainbow (3.0.0)
|
141
|
+
rchardet (1.8.0)
|
142
|
+
regexp_parser (1.7.1)
|
143
|
+
rexml (3.2.4)
|
153
144
|
rly (0.2.3)
|
154
|
-
rmagick (3.
|
155
|
-
rspec (3.
|
156
|
-
rspec-core (~> 3.
|
157
|
-
rspec-expectations (~> 3.
|
158
|
-
rspec-mocks (~> 3.
|
159
|
-
rspec-core (3.
|
160
|
-
rspec-support (~> 3.
|
161
|
-
rspec-expectations (3.
|
145
|
+
rmagick (3.2.0)
|
146
|
+
rspec (3.9.0)
|
147
|
+
rspec-core (~> 3.9.0)
|
148
|
+
rspec-expectations (~> 3.9.0)
|
149
|
+
rspec-mocks (~> 3.9.0)
|
150
|
+
rspec-core (3.9.2)
|
151
|
+
rspec-support (~> 3.9.3)
|
152
|
+
rspec-expectations (3.9.2)
|
162
153
|
diff-lcs (>= 1.2.0, < 2.0)
|
163
|
-
rspec-support (~> 3.
|
164
|
-
rspec-mocks (3.
|
154
|
+
rspec-support (~> 3.9.0)
|
155
|
+
rspec-mocks (3.9.1)
|
165
156
|
diff-lcs (>= 1.2.0, < 2.0)
|
166
|
-
rspec-support (~> 3.
|
167
|
-
rspec-support (3.
|
168
|
-
rubocop (0.
|
169
|
-
jaro_winkler (~> 1.5.1)
|
157
|
+
rspec-support (~> 3.9.0)
|
158
|
+
rspec-support (3.9.3)
|
159
|
+
rubocop (0.88.0)
|
170
160
|
parallel (~> 1.10)
|
171
|
-
parser (>= 2.
|
161
|
+
parser (>= 2.7.1.1)
|
172
162
|
rainbow (>= 2.2.2, < 4.0)
|
163
|
+
regexp_parser (>= 1.7)
|
164
|
+
rexml
|
165
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
173
166
|
ruby-progressbar (~> 1.7)
|
174
|
-
unicode-display_width (>= 1.4.0, <
|
175
|
-
|
176
|
-
|
177
|
-
|
167
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
168
|
+
rubocop-ast (0.2.0)
|
169
|
+
parser (>= 2.7.0.1)
|
170
|
+
ruby-progressbar (1.10.1)
|
171
|
+
rubyzip (2.3.0)
|
172
|
+
signet (0.14.0)
|
178
173
|
addressable (~> 2.3)
|
179
|
-
faraday (
|
174
|
+
faraday (>= 0.17.3, < 2.0)
|
180
175
|
jwt (>= 1.5, < 3.0)
|
181
176
|
multi_json (~> 1.10)
|
182
|
-
stackdriver-core (1.
|
177
|
+
stackdriver-core (1.4.0)
|
183
178
|
google-cloud-core (~> 1.2)
|
184
|
-
temple (0.8.
|
185
|
-
thor (0.
|
179
|
+
temple (0.8.2)
|
180
|
+
thor (1.0.1)
|
186
181
|
thread_safe (0.3.6)
|
187
|
-
tilt (2.0.
|
188
|
-
typhoeus (1.
|
182
|
+
tilt (2.0.10)
|
183
|
+
typhoeus (1.4.0)
|
189
184
|
ethon (>= 0.9.0)
|
190
|
-
tzinfo (1.2.
|
185
|
+
tzinfo (1.2.7)
|
191
186
|
thread_safe (~> 0.1)
|
192
|
-
unicode-display_width (1.
|
193
|
-
workspace (
|
187
|
+
unicode-display_width (1.7.0)
|
188
|
+
workspace (2.0.2)
|
194
189
|
bundler (>= 1.12.0, < 3.0.0)
|
195
190
|
mime-types (~> 3.2)
|
196
|
-
workspace-archive (
|
197
|
-
rubyzip (
|
198
|
-
workspace (~>
|
199
|
-
workspace-media (
|
191
|
+
workspace-archive (2.0.2)
|
192
|
+
rubyzip (>= 2.0.0, < 3.0.0)
|
193
|
+
workspace (~> 2.0)
|
194
|
+
workspace-media (2.0.2)
|
200
195
|
piet (~> 0.2)
|
201
196
|
rmagick (~> 3.1)
|
202
|
-
workspace (~>
|
203
|
-
workspace-net (
|
197
|
+
workspace (~> 2.0)
|
198
|
+
workspace-net (2.0.2)
|
204
199
|
typhoeus (~> 1.3)
|
205
|
-
workspace (~>
|
206
|
-
workspace-parse (
|
200
|
+
workspace (~> 2.0)
|
201
|
+
workspace-parse (2.0.2)
|
207
202
|
haml (~> 5.0)
|
208
|
-
|
203
|
+
psych (~> 3.2)
|
204
|
+
workspace (~> 2.0)
|
209
205
|
|
210
206
|
PLATFORMS
|
211
207
|
ruby
|
@@ -217,4 +213,4 @@ DEPENDENCIES
|
|
217
213
|
rubocop (>= 0.50)
|
218
214
|
|
219
215
|
BUNDLED WITH
|
220
|
-
1.
|
216
|
+
2.1.4
|
data/README.md
CHANGED
data/dronejob.gemspec
CHANGED
@@ -12,21 +12,19 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = "https://github.com/MagLoft/dronejob"
|
13
13
|
s.summary = "DroneJob Drone Factory"
|
14
14
|
s.description = "Scalable worker factory for ruby"
|
15
|
-
s.required_ruby_version = '
|
16
|
-
s.required_rubygems_version = '~> 2.4'
|
15
|
+
s.required_ruby_version = '>= 2.4'
|
17
16
|
s.add_dependency "bundler", "< 3.0.0", ">= 1.12.0"
|
18
|
-
s.add_runtime_dependency "actionpack", ">= 4.0.2"
|
19
|
-
s.add_runtime_dependency "activejob", ">= 4.0.2"
|
20
|
-
s.add_runtime_dependency "
|
17
|
+
s.add_runtime_dependency "actionpack", ">= 4.0.2", "< 5.0.0"
|
18
|
+
s.add_runtime_dependency "activejob", ">= 4.0.2", "< 5.0.0"
|
19
|
+
s.add_runtime_dependency "bigdecimal", "~> 1.4"
|
21
20
|
s.add_runtime_dependency "git", ">= 1.3"
|
22
21
|
s.add_runtime_dependency "google-cloud-logging", ">= 1.2"
|
23
|
-
s.add_runtime_dependency "pusher", ">= 1.3"
|
24
22
|
s.add_runtime_dependency "thor", ">= 0.19"
|
25
|
-
s.add_runtime_dependency "workspace", ">=
|
26
|
-
s.add_runtime_dependency "workspace-archive", ">=
|
27
|
-
s.add_runtime_dependency "workspace-media", ">=
|
28
|
-
s.add_runtime_dependency "workspace-net", ">=
|
29
|
-
s.add_runtime_dependency "workspace-parse", ">=
|
23
|
+
s.add_runtime_dependency "workspace", ">= 2.0"
|
24
|
+
s.add_runtime_dependency "workspace-archive", ">= 2.0"
|
25
|
+
s.add_runtime_dependency "workspace-media", ">= 2.0"
|
26
|
+
s.add_runtime_dependency "workspace-net", ">= 2.0"
|
27
|
+
s.add_runtime_dependency "workspace-parse", ">= 2.0"
|
30
28
|
s.add_development_dependency "pry", ">= 0.10"
|
31
29
|
s.add_development_dependency "rspec", ">= 3.3"
|
32
30
|
s.add_development_dependency "rubocop", ">= 0.50"
|
data/lib/dronejob.rb
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
require 'activejob-google_cloud_pubsub'
|
2
1
|
require "google/cloud/logging"
|
3
2
|
require "active_support"
|
4
3
|
require 'active_support/rails'
|
5
|
-
require "dronejob/server"
|
6
4
|
require "dronejob/version"
|
7
5
|
require "psych"
|
8
6
|
|
9
|
-
require 'dronejob/railtie' if defined?(Rails)
|
10
|
-
|
11
7
|
module Dronejob
|
12
8
|
extend ActiveSupport::Autoload
|
13
9
|
autoload :Base
|
data/lib/dronejob/base.rb
CHANGED
@@ -9,7 +9,6 @@ require 'dronejob/modules/callbacks'
|
|
9
9
|
require 'dronejob/modules/core'
|
10
10
|
require 'dronejob/modules/git'
|
11
11
|
require 'dronejob/modules/log'
|
12
|
-
require 'dronejob/modules/queue'
|
13
12
|
require 'dronejob/modules/options'
|
14
13
|
require 'dronejob/modules/params'
|
15
14
|
require 'dronejob/modules/phases'
|
@@ -23,7 +22,6 @@ module Dronejob
|
|
23
22
|
include Modules::Core
|
24
23
|
include Modules::Git
|
25
24
|
include Modules::Options
|
26
|
-
include Modules::Queue
|
27
25
|
include Modules::Params
|
28
26
|
include Modules::Phases
|
29
27
|
include Modules::Workspace
|
@@ -39,7 +37,6 @@ module Dronejob
|
|
39
37
|
|
40
38
|
rescue_from(Exception) do |exception|
|
41
39
|
error_rescue(exception) if respond_to?(:error_rescue)
|
42
|
-
publish_error(exception)
|
43
40
|
error(exception)
|
44
41
|
end
|
45
42
|
|
data/lib/dronejob/command.rb
CHANGED
@@ -4,14 +4,12 @@ require "active_job"
|
|
4
4
|
module Dronejob
|
5
5
|
class Command < Thor
|
6
6
|
Dronejob::Loader.workers(:base).each do |identifier, worker|
|
7
|
-
desc identifier, "
|
7
|
+
desc identifier, "Run #{identifier} worker"
|
8
8
|
|
9
9
|
# Worker options
|
10
|
-
method_option(:run, aliases: "-r", type: :boolean, default: false)
|
11
10
|
method_option(:break, aliases: "-b", type: :boolean, default: false)
|
12
11
|
method_option(:skip, aliases: "-s", type: :array, default: [])
|
13
12
|
method_option(:from, aliases: "-f", type: :string)
|
14
|
-
method_option(:notify, aliases: "-n", type: :boolean, default: true)
|
15
13
|
method_option(:jobs_path, type: :string)
|
16
14
|
method_option(:output_path, type: :string)
|
17
15
|
|
@@ -24,13 +22,8 @@ module Dronejob
|
|
24
22
|
Dronejob::Base.jobs_path = options.jobs_path if options.jobs_path
|
25
23
|
Dronejob::Base.output_path = options.output_path if options.output_path
|
26
24
|
|
27
|
-
# Execute
|
28
|
-
|
29
|
-
worker.perform_now(options)
|
30
|
-
else
|
31
|
-
job = worker.perform_later(options.to_hash)
|
32
|
-
Dronejob::Base.log("info", "Enqueued job #{job.job_id}")
|
33
|
-
end
|
25
|
+
# Execute job
|
26
|
+
worker.perform_now(options)
|
34
27
|
end
|
35
28
|
end
|
36
29
|
|
@@ -87,16 +80,5 @@ module Dronejob
|
|
87
80
|
job_params["from"] = options.from
|
88
81
|
worker.perform_now(job_params)
|
89
82
|
end
|
90
|
-
|
91
|
-
desc :server, "Start Dronejob Server"
|
92
|
-
def server
|
93
|
-
server = Server.new(Dronejob::Base.options)
|
94
|
-
begin
|
95
|
-
server.start
|
96
|
-
rescue Interrupt
|
97
|
-
server.stop
|
98
|
-
exit
|
99
|
-
end
|
100
|
-
end
|
101
83
|
end
|
102
84
|
end
|
data/lib/dronejob/modules/git.rb
CHANGED
data/lib/dronejob/modules/log.rb
CHANGED
@@ -16,9 +16,10 @@ module Dronejob
|
|
16
16
|
included do
|
17
17
|
cattr_accessor(:logger) do
|
18
18
|
dronejob_log = option(:dronejob_log) || "STDOUT"
|
19
|
-
|
19
|
+
case dronejob_log
|
20
|
+
when "STDOUT"
|
20
21
|
custom_logger = ActiveSupport::Logger.new(STDOUT)
|
21
|
-
|
22
|
+
when "google"
|
22
23
|
logging = Google::Cloud::Logging.new(project: option(:google_cloud_project_id))
|
23
24
|
resource = logging.resource("gce_instance", { zone: option(:google_cloud_zone), instance_id: option(:google_cloud_instance_id) })
|
24
25
|
custom_logger = logging.logger(option(:dronejob_queue), resource)
|
data/lib/dronejob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dronejob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Strebitzer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -37,6 +37,9 @@ dependencies:
|
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 4.0.2
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 5.0.0
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,6 +47,9 @@ dependencies:
|
|
44
47
|
- - ">="
|
45
48
|
- !ruby/object:Gem::Version
|
46
49
|
version: 4.0.2
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 5.0.0
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: activejob
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,6 +57,9 @@ dependencies:
|
|
51
57
|
- - ">="
|
52
58
|
- !ruby/object:Gem::Version
|
53
59
|
version: 4.0.2
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 5.0.0
|
54
63
|
type: :runtime
|
55
64
|
prerelease: false
|
56
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,20 +67,23 @@ dependencies:
|
|
58
67
|
- - ">="
|
59
68
|
- !ruby/object:Gem::Version
|
60
69
|
version: 4.0.2
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 5.0.0
|
61
73
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
74
|
+
name: bigdecimal
|
63
75
|
requirement: !ruby/object:Gem::Requirement
|
64
76
|
requirements:
|
65
|
-
- - "
|
77
|
+
- - "~>"
|
66
78
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
79
|
+
version: '1.4'
|
68
80
|
type: :runtime
|
69
81
|
prerelease: false
|
70
82
|
version_requirements: !ruby/object:Gem::Requirement
|
71
83
|
requirements:
|
72
|
-
- - "
|
84
|
+
- - "~>"
|
73
85
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
86
|
+
version: '1.4'
|
75
87
|
- !ruby/object:Gem::Dependency
|
76
88
|
name: git
|
77
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,20 +112,6 @@ dependencies:
|
|
100
112
|
- - ">="
|
101
113
|
- !ruby/object:Gem::Version
|
102
114
|
version: '1.2'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: pusher
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.3'
|
110
|
-
type: :runtime
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '1.3'
|
117
115
|
- !ruby/object:Gem::Dependency
|
118
116
|
name: thor
|
119
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,70 +132,70 @@ dependencies:
|
|
134
132
|
requirements:
|
135
133
|
- - ">="
|
136
134
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
135
|
+
version: '2.0'
|
138
136
|
type: :runtime
|
139
137
|
prerelease: false
|
140
138
|
version_requirements: !ruby/object:Gem::Requirement
|
141
139
|
requirements:
|
142
140
|
- - ">="
|
143
141
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
142
|
+
version: '2.0'
|
145
143
|
- !ruby/object:Gem::Dependency
|
146
144
|
name: workspace-archive
|
147
145
|
requirement: !ruby/object:Gem::Requirement
|
148
146
|
requirements:
|
149
147
|
- - ">="
|
150
148
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
149
|
+
version: '2.0'
|
152
150
|
type: :runtime
|
153
151
|
prerelease: false
|
154
152
|
version_requirements: !ruby/object:Gem::Requirement
|
155
153
|
requirements:
|
156
154
|
- - ">="
|
157
155
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
156
|
+
version: '2.0'
|
159
157
|
- !ruby/object:Gem::Dependency
|
160
158
|
name: workspace-media
|
161
159
|
requirement: !ruby/object:Gem::Requirement
|
162
160
|
requirements:
|
163
161
|
- - ">="
|
164
162
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
163
|
+
version: '2.0'
|
166
164
|
type: :runtime
|
167
165
|
prerelease: false
|
168
166
|
version_requirements: !ruby/object:Gem::Requirement
|
169
167
|
requirements:
|
170
168
|
- - ">="
|
171
169
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
170
|
+
version: '2.0'
|
173
171
|
- !ruby/object:Gem::Dependency
|
174
172
|
name: workspace-net
|
175
173
|
requirement: !ruby/object:Gem::Requirement
|
176
174
|
requirements:
|
177
175
|
- - ">="
|
178
176
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
177
|
+
version: '2.0'
|
180
178
|
type: :runtime
|
181
179
|
prerelease: false
|
182
180
|
version_requirements: !ruby/object:Gem::Requirement
|
183
181
|
requirements:
|
184
182
|
- - ">="
|
185
183
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
184
|
+
version: '2.0'
|
187
185
|
- !ruby/object:Gem::Dependency
|
188
186
|
name: workspace-parse
|
189
187
|
requirement: !ruby/object:Gem::Requirement
|
190
188
|
requirements:
|
191
189
|
- - ">="
|
192
190
|
- !ruby/object:Gem::Version
|
193
|
-
version: '
|
191
|
+
version: '2.0'
|
194
192
|
type: :runtime
|
195
193
|
prerelease: false
|
196
194
|
version_requirements: !ruby/object:Gem::Requirement
|
197
195
|
requirements:
|
198
196
|
- - ">="
|
199
197
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
198
|
+
version: '2.0'
|
201
199
|
- !ruby/object:Gem::Dependency
|
202
200
|
name: pry
|
203
201
|
requirement: !ruby/object:Gem::Requirement
|
@@ -267,11 +265,7 @@ files:
|
|
267
265
|
- lib/dronejob/modules/options.rb
|
268
266
|
- lib/dronejob/modules/params.rb
|
269
267
|
- lib/dronejob/modules/phases.rb
|
270
|
-
- lib/dronejob/modules/queue.rb
|
271
268
|
- lib/dronejob/modules/workspace.rb
|
272
|
-
- lib/dronejob/railtie.rb
|
273
|
-
- lib/dronejob/railties/dronejob.rake
|
274
|
-
- lib/dronejob/server.rb
|
275
269
|
- lib/dronejob/version.rb
|
276
270
|
homepage: https://github.com/MagLoft/dronejob
|
277
271
|
licenses:
|
@@ -283,17 +277,16 @@ require_paths:
|
|
283
277
|
- lib
|
284
278
|
required_ruby_version: !ruby/object:Gem::Requirement
|
285
279
|
requirements:
|
286
|
-
- - "
|
280
|
+
- - ">="
|
287
281
|
- !ruby/object:Gem::Version
|
288
|
-
version: '2.
|
282
|
+
version: '2.4'
|
289
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
284
|
requirements:
|
291
|
-
- - "
|
285
|
+
- - ">="
|
292
286
|
- !ruby/object:Gem::Version
|
293
|
-
version: '
|
287
|
+
version: '0'
|
294
288
|
requirements: []
|
295
|
-
|
296
|
-
rubygems_version: 2.5.2
|
289
|
+
rubygems_version: 3.1.2
|
297
290
|
signing_key:
|
298
291
|
specification_version: 4
|
299
292
|
summary: DroneJob Drone Factory
|
@@ -1,76 +0,0 @@
|
|
1
|
-
require "pusher"
|
2
|
-
|
3
|
-
module Dronejob
|
4
|
-
module Modules
|
5
|
-
module Queue
|
6
|
-
extend ActiveSupport::Concern
|
7
|
-
|
8
|
-
included do
|
9
|
-
queue_as option(:dronejob_queue) || :dronejob
|
10
|
-
set_callback :phase, :before, :notify_before_phase
|
11
|
-
set_callback :job, :after, :notify_after_job
|
12
|
-
end
|
13
|
-
|
14
|
-
class_methods do
|
15
|
-
def pubsub
|
16
|
-
@pubsub ||= Google::Cloud::Pubsub.new(project_id: option(:google_cloud_project_id), credentials: option(:google_cloud_service_account))
|
17
|
-
end
|
18
|
-
|
19
|
-
def queue_adapter
|
20
|
-
@queue_adapter ||= ActiveJob::GoogleCloudPubsub::Adapter.new(async: false, logger: logger, pubsub: pubsub)
|
21
|
-
end
|
22
|
-
|
23
|
-
def notify(value = true)
|
24
|
-
@notify = value
|
25
|
-
end
|
26
|
-
|
27
|
-
def notify?
|
28
|
-
!!@notify
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def pusher_client
|
33
|
-
@pusher_client ||= Pusher::Client.new(
|
34
|
-
app_id: option(:pusher_app_id),
|
35
|
-
key: option(:pusher_key),
|
36
|
-
secret: option(:pusher_secret),
|
37
|
-
cluster: option(:pusher_cluster),
|
38
|
-
encrypted: true
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
def publish_status(data = {}, status = "working")
|
43
|
-
data[:action] = "update_process"
|
44
|
-
data[:user_id] = param(:user_id)
|
45
|
-
data[:jid] = job_id
|
46
|
-
data[:worker] = Loader.identifier_for(self)
|
47
|
-
data[:timestamp] = Time.now.to_i
|
48
|
-
data[:status] = status
|
49
|
-
return false if data[:user_id].nil?
|
50
|
-
|
51
|
-
pusher_client.trigger("private-#{data[:user_id]}", "process", data)
|
52
|
-
end
|
53
|
-
|
54
|
-
def publish_error(event)
|
55
|
-
publish_status({ title: self.title, description: event.message, phase: @phase, progress: 100 }, "failed") if should_notify?
|
56
|
-
end
|
57
|
-
|
58
|
-
def notify_before_phase
|
59
|
-
publish_status({ title: self.title, description: @phase_config[:title], phase: @phase, progress: @phase_config[:progress] }, "working") if @phase_config[:notify] and should_notify?
|
60
|
-
end
|
61
|
-
|
62
|
-
def notify_after_job
|
63
|
-
publish_status({ title: self.title, description: "Job Completed!", phase: @phase, progress: 100 }, "complete") if should_notify?
|
64
|
-
end
|
65
|
-
|
66
|
-
def should_notify?
|
67
|
-
self.class.notify? and param(:notify) and !param(:run)
|
68
|
-
end
|
69
|
-
|
70
|
-
def publish_progress(progress, description = nil, details = {})
|
71
|
-
message = { title: self.title, description: description, phase: @phase, progress: progress, details: details }
|
72
|
-
publish_status(message, "working") if should_notify?
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
data/lib/dronejob/railtie.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'global_id/railtie'
|
2
|
-
require 'dronejob'
|
3
|
-
|
4
|
-
module Dronejob
|
5
|
-
# = Dronejob Railtie
|
6
|
-
class Railtie < Rails::Railtie
|
7
|
-
config.dronejob = ActiveSupport::OrderedOptions.new
|
8
|
-
|
9
|
-
initializer 'dronejob.logger' do
|
10
|
-
ActiveSupport.on_load(:dronejob) { self.logger = ::Rails.logger }
|
11
|
-
end
|
12
|
-
|
13
|
-
initializer "dronejob.set_configs" do |app|
|
14
|
-
options = app.config.dronejob
|
15
|
-
|
16
|
-
ActiveSupport.on_load(:dronejob) do
|
17
|
-
options.each { |k, v| send("#{k}=", v) }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
rake_tasks do
|
22
|
-
load "dronejob/railties/dronejob.rake"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/lib/dronejob/server.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module Dronejob
|
2
|
-
class Dronejob::Server
|
3
|
-
attr_reader :worker, :queue, :min_threads, :max_threads
|
4
|
-
|
5
|
-
def initialize(options)
|
6
|
-
@queue = options.dronejob_queue || "drone"
|
7
|
-
@min_threads = options.min_threads || 1
|
8
|
-
@max_threads = options.max_threads || 1
|
9
|
-
end
|
10
|
-
|
11
|
-
def start
|
12
|
-
@worker = ActiveJob::GoogleCloudPubsub::Worker.new(queue: @queue, pubsub: Dronejob::Base.pubsub, min_threads: self.min_threads, max_threads: self.max_threads)
|
13
|
-
Dronejob::Base.log("info", "Starting server for queue #{@queue} ...", nil)
|
14
|
-
@worker.run
|
15
|
-
end
|
16
|
-
|
17
|
-
def stop
|
18
|
-
Dronejob::Base.log("info", "Stopping server ...", nil)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|