dronejob 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b555f9cdada7c8119f84414446fbf616e38e8ffe
4
- data.tar.gz: a3fdb6dc20761e396025ccb884b4f0164c425758
2
+ SHA256:
3
+ metadata.gz: 46b1fcd8a4a999b8e3e8746ae67b74653254941148fd4bce945607033f1aab05
4
+ data.tar.gz: ed771927f58b0bd6b53ab86fbf5d7dcb7b36b6b1e93fb9b1b1cebde3d81e24db
5
5
  SHA512:
6
- metadata.gz: 56345d732edfb887ab2eb8429898cec48bb28d9cd9a6da3da4b9ff17b7ef8c20549867d3b88dedee7a5756510f13b8d8b989d292425177d6953f39917d47be81
7
- data.tar.gz: ce4181b1692c3f9c754b874e0c235ed6655eb5d1a0f63307ae781483cd0d86b465e2a68ce0974d96337b60795ab6aae0e5cec4fa8ea8cd94a92158ed21248201
6
+ metadata.gz: 5743f27ad219c81f592e070174f4bdd796ae6530b9d5d4f0118e9ffd9667ad8abe4e31f01fe56d60560bac398d4e3e689681a0adc7b05fa20409af2bc4855b0a
7
+ data.tar.gz: bad015b82d5575fd5b7769d00262d6c6fd575ed744831362def620747ef3ba5d26f0b6c2d83a4aa9e06b427ad0f57c13edfcc2719a8008d104d2765261397922
@@ -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/IndentFirstHashElement:
19
+ Layout/FirstHashElementIndentation:
24
20
  Enabled: false
25
21
 
26
- Layout/AlignHash:
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/HandleExceptions:
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: 5
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.3.3"
260
+ TargetRubyVersion: "2.4.0"
190
261
  Exclude:
262
+ - './vendor/**/*'
263
+ - './db/**/*'
191
264
  - './tmp/**/*'
265
+ - './log/**/*'
266
+ - './public/**/*'
267
+ - './bin/**/*'
192
268
  - './Gemfile'
@@ -1,211 +1,229 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dronejob (2.0.1)
5
- actionpack (>= 4.0.2)
6
- activejob (>= 4.0.2)
7
- activejob-google_cloud_pubsub (>= 0.7)
4
+ dronejob (3.0.0)
5
+ actionpack (>= 4.0.2, < 5.0.0)
6
+ activejob (>= 4.0.2, < 5.0.0)
7
+ activejob-google-cloud-pubsub (>= 0.7)
8
8
  bundler (>= 1.12.0, < 3.0.0)
9
9
  git (>= 1.3)
10
10
  google-cloud-logging (>= 1.2)
11
11
  pusher (>= 1.3)
12
12
  thor (>= 0.19)
13
- workspace (>= 1.0)
14
- workspace-archive (>= 1.0)
15
- workspace-media (>= 1.0)
16
- workspace-net (>= 1.0)
17
- workspace-parse (>= 1.0)
13
+ workspace (>= 2.0)
14
+ workspace-archive (>= 2.0)
15
+ workspace-media (>= 2.0)
16
+ workspace-net (>= 2.0)
17
+ workspace-parse (>= 2.0)
18
18
 
19
19
  GEM
20
20
  remote: http://rubygems.org/
21
21
  specs:
22
- actionpack (5.2.3)
23
- actionview (= 5.2.3)
24
- activesupport (= 5.2.3)
25
- rack (~> 2.0)
26
- rack-test (>= 0.6.3)
27
- rails-dom-testing (~> 2.0)
22
+ actionpack (4.2.11.3)
23
+ actionview (= 4.2.11.3)
24
+ activesupport (= 4.2.11.3)
25
+ rack (~> 1.6)
26
+ rack-test (~> 0.6.2)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
28
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.3)
30
- activesupport (= 5.2.3)
29
+ actionview (4.2.11.3)
30
+ activesupport (= 4.2.11.3)
31
31
  builder (~> 3.1)
32
- erubi (~> 1.4)
33
- rails-dom-testing (~> 2.0)
32
+ erubis (~> 2.7.0)
33
+ rails-dom-testing (~> 1.0, >= 1.0.5)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.3)
36
- activesupport (= 5.2.3)
37
- globalid (>= 0.3.6)
38
- activejob-google_cloud_pubsub (0.7.1)
35
+ activejob (4.2.11.3)
36
+ activesupport (= 4.2.11.3)
37
+ globalid (>= 0.3.0)
38
+ activejob-google-cloud-pubsub (0.7.3)
39
39
  activejob
40
40
  activesupport
41
41
  concurrent-ruby
42
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)
43
+ activesupport (4.2.11.3)
44
+ i18n (~> 0.7)
46
45
  minitest (~> 5.1)
46
+ thread_safe (~> 0.3, >= 0.3.4)
47
47
  tzinfo (~> 1.1)
48
- addressable (2.6.0)
49
- public_suffix (>= 2.0.2, < 4.0)
50
- ast (2.4.0)
51
- builder (3.2.3)
52
- coderay (1.1.2)
53
- concurrent-ruby (1.1.5)
54
- crass (1.0.4)
55
- diff-lcs (1.3)
56
- erubi (1.8.0)
48
+ addressable (2.7.0)
49
+ public_suffix (>= 2.0.2, < 5.0)
50
+ ast (2.4.1)
51
+ builder (3.2.4)
52
+ coderay (1.1.3)
53
+ concurrent-ruby (1.1.6)
54
+ crass (1.0.6)
55
+ diff-lcs (1.4.4)
56
+ erubis (2.7.0)
57
57
  ethon (0.12.0)
58
58
  ffi (>= 1.3.0)
59
- faraday (0.15.4)
59
+ faraday (1.0.1)
60
60
  multipart-post (>= 1.2, < 3)
61
- ffi (1.11.0)
62
- git (1.5.0)
61
+ ffi (1.13.1)
62
+ git (1.7.0)
63
+ rchardet (~> 1.8)
63
64
  globalid (0.4.2)
64
65
  activesupport (>= 4.2.0)
65
- google-cloud-core (1.3.0)
66
+ google-cloud-core (1.5.0)
66
67
  google-cloud-env (~> 1.0)
67
- google-cloud-env (1.0.5)
68
- faraday (~> 0.11)
69
- google-cloud-logging (1.6.3)
68
+ google-cloud-errors (~> 1.0)
69
+ google-cloud-env (1.3.3)
70
+ faraday (>= 0.17.3, < 2.0)
71
+ google-cloud-errors (1.0.1)
72
+ google-cloud-logging (1.10.9)
70
73
  concurrent-ruby (~> 1.1)
71
74
  google-cloud-core (~> 1.2)
72
- google-gax (~> 1.3)
73
- googleapis-common-protos-types (>= 1.0.2)
75
+ google-gax (~> 1.8)
76
+ googleapis-common-protos (>= 1.3.9, < 2.0)
77
+ googleapis-common-protos-types (>= 1.0.4, < 2.0)
74
78
  stackdriver-core (~> 1.3)
75
- google-cloud-pubsub (0.35.0)
76
- concurrent-ruby (~> 1.0)
79
+ google-cloud-pubsub (1.8.0)
80
+ concurrent-ruby (~> 1.1)
77
81
  google-cloud-core (~> 1.2)
78
- google-gax (~> 1.3)
82
+ google-gax (~> 1.8)
83
+ googleapis-common-protos (>= 1.3.9, < 2.0)
84
+ googleapis-common-protos-types (>= 1.0.4, < 2.0)
79
85
  grpc-google-iam-v1 (~> 0.6.9)
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)
86
+ google-gax (1.8.1)
87
+ google-protobuf (~> 3.9)
88
+ googleapis-common-protos (>= 1.3.9, < 2.0)
89
+ googleauth (~> 0.9)
90
+ grpc (~> 1.24)
85
91
  rly (~> 0.2.3)
86
- google-protobuf (3.7.1-universal-darwin)
87
- googleapis-common-protos (1.3.9)
88
- google-protobuf (~> 3.0)
89
- googleapis-common-protos-types (~> 1.0)
90
- grpc (~> 1.0)
91
- googleapis-common-protos-types (1.0.4)
92
- google-protobuf (~> 3.0)
93
- googleauth (0.8.1)
94
- faraday (~> 0.12)
92
+ google-protobuf (3.12.2-universal-darwin)
93
+ googleapis-common-protos (1.3.10)
94
+ google-protobuf (~> 3.11)
95
+ googleapis-common-protos-types (>= 1.0.5, < 2.0)
96
+ grpc (~> 1.27)
97
+ googleapis-common-protos-types (1.0.5)
98
+ google-protobuf (~> 3.11)
99
+ googleauth (0.13.0)
100
+ faraday (>= 0.17.3, < 2.0)
95
101
  jwt (>= 1.4, < 3.0)
96
102
  memoist (~> 0.16)
97
103
  multi_json (~> 1.11)
98
104
  os (>= 0.9, < 2.0)
99
- signet (~> 0.7)
100
- grpc (1.20.0-universal-darwin)
101
- google-protobuf (~> 3.7)
102
- googleapis-common-protos-types (~> 1.0.0)
103
- grpc-google-iam-v1 (0.6.9)
104
- googleapis-common-protos (>= 1.3.1, < 2.0)
105
- grpc (~> 1.0)
106
- haml (5.1.0)
105
+ signet (~> 0.14)
106
+ grpc (1.30.1-universal-darwin)
107
+ google-protobuf (~> 3.12)
108
+ googleapis-common-protos-types (~> 1.0)
109
+ grpc-google-iam-v1 (0.6.10)
110
+ google-protobuf (~> 3.11)
111
+ googleapis-common-protos (>= 1.3.10, < 2.0)
112
+ grpc (~> 1.27)
113
+ haml (5.1.2)
107
114
  temple (>= 0.8.0)
108
115
  tilt
109
116
  httpclient (2.8.3)
110
- i18n (1.6.0)
117
+ i18n (0.9.5)
111
118
  concurrent-ruby (~> 1.0)
112
- jaro_winkler (1.5.2)
113
- jwt (2.1.0)
114
- loofah (2.2.3)
119
+ jwt (2.2.1)
120
+ loofah (2.6.0)
115
121
  crass (~> 1.0.2)
116
122
  nokogiri (>= 1.5.9)
117
- memoist (0.16.0)
118
- method_source (0.9.2)
119
- mime-types (3.2.2)
123
+ memoist (0.16.2)
124
+ method_source (1.0.0)
125
+ mime-types (3.3.1)
120
126
  mime-types-data (~> 3.2015)
121
- mime-types-data (3.2019.0331)
127
+ mime-types-data (3.2020.0512)
122
128
  mini_portile2 (2.4.0)
123
- minitest (5.11.3)
124
- multi_json (1.13.1)
129
+ minitest (5.14.1)
130
+ multi_json (1.15.0)
125
131
  multipart-post (2.1.1)
126
- nokogiri (1.10.3)
132
+ nokogiri (1.10.10)
127
133
  mini_portile2 (~> 2.4.0)
128
- os (1.0.1)
129
- parallel (1.17.0)
130
- parser (2.6.3.0)
131
- ast (~> 2.4.0)
134
+ os (1.1.0)
135
+ parallel (1.19.2)
136
+ parser (2.7.1.4)
137
+ ast (~> 2.4.1)
132
138
  piet (0.2.6)
133
139
  png_quantizator
134
140
  png_quantizator (0.2.1)
135
- pry (0.12.2)
136
- coderay (~> 1.1.0)
137
- method_source (~> 0.9.0)
138
- public_suffix (3.0.3)
139
- pusher (1.3.2)
141
+ pry (0.13.1)
142
+ coderay (~> 1.1)
143
+ method_source (~> 1.0)
144
+ psych (3.2.0)
145
+ public_suffix (4.0.5)
146
+ pusher (1.3.3)
140
147
  httpclient (~> 2.7)
141
148
  multi_json (~> 1.0)
142
149
  pusher-signature (~> 0.1.8)
143
150
  pusher-signature (0.1.8)
144
- rack (2.0.7)
145
- rack-test (1.1.0)
146
- rack (>= 1.0, < 3)
147
- rails-dom-testing (2.0.3)
148
- activesupport (>= 4.2.0)
149
- nokogiri (>= 1.6)
150
- rails-html-sanitizer (1.0.4)
151
- loofah (~> 2.2, >= 2.2.2)
151
+ rack (1.6.13)
152
+ rack-test (0.6.3)
153
+ rack (>= 1.0)
154
+ rails-deprecated_sanitizer (1.0.3)
155
+ activesupport (>= 4.2.0.alpha)
156
+ rails-dom-testing (1.0.9)
157
+ activesupport (>= 4.2.0, < 5.0)
158
+ nokogiri (~> 1.6)
159
+ rails-deprecated_sanitizer (>= 1.0.1)
160
+ rails-html-sanitizer (1.3.0)
161
+ loofah (~> 2.3)
152
162
  rainbow (3.0.0)
163
+ rchardet (1.8.0)
164
+ regexp_parser (1.7.1)
165
+ rexml (3.2.4)
153
166
  rly (0.2.3)
154
- rmagick (3.1.0)
155
- rspec (3.8.0)
156
- rspec-core (~> 3.8.0)
157
- rspec-expectations (~> 3.8.0)
158
- rspec-mocks (~> 3.8.0)
159
- rspec-core (3.8.0)
160
- rspec-support (~> 3.8.0)
161
- rspec-expectations (3.8.3)
167
+ rmagick (3.2.0)
168
+ rspec (3.9.0)
169
+ rspec-core (~> 3.9.0)
170
+ rspec-expectations (~> 3.9.0)
171
+ rspec-mocks (~> 3.9.0)
172
+ rspec-core (3.9.2)
173
+ rspec-support (~> 3.9.3)
174
+ rspec-expectations (3.9.2)
162
175
  diff-lcs (>= 1.2.0, < 2.0)
163
- rspec-support (~> 3.8.0)
164
- rspec-mocks (3.8.0)
176
+ rspec-support (~> 3.9.0)
177
+ rspec-mocks (3.9.1)
165
178
  diff-lcs (>= 1.2.0, < 2.0)
166
- rspec-support (~> 3.8.0)
167
- rspec-support (3.8.0)
168
- rubocop (0.69.0)
169
- jaro_winkler (~> 1.5.1)
179
+ rspec-support (~> 3.9.0)
180
+ rspec-support (3.9.3)
181
+ rubocop (0.88.0)
170
182
  parallel (~> 1.10)
171
- parser (>= 2.6)
183
+ parser (>= 2.7.1.1)
172
184
  rainbow (>= 2.2.2, < 4.0)
185
+ regexp_parser (>= 1.7)
186
+ rexml
187
+ rubocop-ast (>= 0.1.0, < 1.0)
173
188
  ruby-progressbar (~> 1.7)
174
- unicode-display_width (>= 1.4.0, < 1.7)
175
- ruby-progressbar (1.10.0)
176
- rubyzip (1.2.2)
177
- signet (0.11.0)
189
+ unicode-display_width (>= 1.4.0, < 2.0)
190
+ rubocop-ast (0.2.0)
191
+ parser (>= 2.7.0.1)
192
+ ruby-progressbar (1.10.1)
193
+ rubyzip (2.3.0)
194
+ signet (0.14.0)
178
195
  addressable (~> 2.3)
179
- faraday (~> 0.9)
196
+ faraday (>= 0.17.3, < 2.0)
180
197
  jwt (>= 1.5, < 3.0)
181
198
  multi_json (~> 1.10)
182
- stackdriver-core (1.3.3)
199
+ stackdriver-core (1.4.0)
183
200
  google-cloud-core (~> 1.2)
184
- temple (0.8.1)
185
- thor (0.20.3)
201
+ temple (0.8.2)
202
+ thor (1.0.1)
186
203
  thread_safe (0.3.6)
187
- tilt (2.0.9)
188
- typhoeus (1.3.1)
204
+ tilt (2.0.10)
205
+ typhoeus (1.4.0)
189
206
  ethon (>= 0.9.0)
190
- tzinfo (1.2.5)
207
+ tzinfo (1.2.7)
191
208
  thread_safe (~> 0.1)
192
- unicode-display_width (1.6.0)
193
- workspace (1.0.16)
209
+ unicode-display_width (1.7.0)
210
+ workspace (2.0.2)
194
211
  bundler (>= 1.12.0, < 3.0.0)
195
212
  mime-types (~> 3.2)
196
- workspace-archive (1.0.16)
197
- rubyzip (~> 1.2)
198
- workspace (~> 1.0)
199
- workspace-media (1.0.16)
213
+ workspace-archive (2.0.2)
214
+ rubyzip (>= 2.0.0, < 3.0.0)
215
+ workspace (~> 2.0)
216
+ workspace-media (2.0.2)
200
217
  piet (~> 0.2)
201
218
  rmagick (~> 3.1)
202
- workspace (~> 1.0)
203
- workspace-net (1.0.16)
219
+ workspace (~> 2.0)
220
+ workspace-net (2.0.2)
204
221
  typhoeus (~> 1.3)
205
- workspace (~> 1.0)
206
- workspace-parse (1.0.16)
222
+ workspace (~> 2.0)
223
+ workspace-parse (2.0.2)
207
224
  haml (~> 5.0)
208
- workspace (~> 1.0)
225
+ psych (~> 3.2)
226
+ workspace (~> 2.0)
209
227
 
210
228
  PLATFORMS
211
229
  ruby
@@ -217,4 +235,4 @@ DEPENDENCIES
217
235
  rubocop (>= 0.50)
218
236
 
219
237
  BUNDLED WITH
220
- 1.16.3
238
+ 2.1.4
@@ -12,21 +12,20 @@ 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 = '~> 2.3'
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 "activejob-google_cloud_pubsub", ">= 0.7"
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 "activejob-google-cloud-pubsub", ">= 0.7"
21
20
  s.add_runtime_dependency "git", ">= 1.3"
22
21
  s.add_runtime_dependency "google-cloud-logging", ">= 1.2"
23
22
  s.add_runtime_dependency "pusher", ">= 1.3"
24
23
  s.add_runtime_dependency "thor", ">= 0.19"
25
- s.add_runtime_dependency "workspace", ">= 1.0"
26
- s.add_runtime_dependency "workspace-archive", ">= 1.0"
27
- s.add_runtime_dependency "workspace-media", ">= 1.0"
28
- s.add_runtime_dependency "workspace-net", ">= 1.0"
29
- s.add_runtime_dependency "workspace-parse", ">= 1.0"
24
+ s.add_runtime_dependency "workspace", ">= 2.0"
25
+ s.add_runtime_dependency "workspace-archive", ">= 2.0"
26
+ s.add_runtime_dependency "workspace-media", ">= 2.0"
27
+ s.add_runtime_dependency "workspace-net", ">= 2.0"
28
+ s.add_runtime_dependency "workspace-parse", ">= 2.0"
30
29
  s.add_development_dependency "pry", ">= 0.10"
31
30
  s.add_development_dependency "rspec", ">= 3.3"
32
31
  s.add_development_dependency "rubocop", ">= 0.50"
@@ -1,4 +1,4 @@
1
- require 'activejob-google_cloud_pubsub'
1
+ require 'activejob_google_cloud_pubsub'
2
2
  require "google/cloud/logging"
3
3
  require "active_support"
4
4
  require 'active_support/rails'
@@ -7,6 +7,7 @@ module Dronejob
7
7
 
8
8
  included do
9
9
  attr_reader :git, :commits
10
+
10
11
  set_callback :job, :before, :git_init_job, if: :stateful?
11
12
  set_callback(:phase, :after, if: :stateful?) { git_commit(@phase) }
12
13
  end
@@ -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
- if dronejob_log == "STDOUT"
19
+ case dronejob_log
20
+ when "STDOUT"
20
21
  custom_logger = ActiveSupport::Logger.new(STDOUT)
21
- elsif dronejob_log == "google"
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)
@@ -6,6 +6,7 @@ module Dronejob
6
6
 
7
7
  included do
8
8
  attr_accessor :phase, :phase_config
9
+
9
10
  set_callback(:phase, :around) { |r, block| logger.tagged(@phase, &block) }
10
11
  end
11
12
 
@@ -23,7 +24,13 @@ module Dronejob
23
24
  def log_phase; end
24
25
 
25
26
  def run_phases
26
- self.class.phases.each do |phase, phase_config|
27
+ if self.respond_to?(:before)
28
+ phases = before(self.class.phases)
29
+ else
30
+ phases = self.class.phases
31
+ end
32
+
33
+ phases.each do |phase, phase_config|
27
34
  @phase = phase
28
35
  @phase_config = phase_config
29
36
 
@@ -1,3 +1,4 @@
1
+ require "pry"
1
2
  require "pusher"
2
3
 
3
4
  module Dronejob
@@ -13,7 +14,8 @@ module Dronejob
13
14
 
14
15
  class_methods do
15
16
  def pubsub
16
- @pubsub ||= Google::Cloud::Pubsub.new(project_id: option(:google_cloud_project_id), credentials: option(:google_cloud_service_account))
17
+ emulator_host = option(:google_cloud_pubsub_emulator_host)
18
+ @pubsub ||= Google::Cloud::Pubsub.new(project_id: option(:google_cloud_project_id), credentials: option(:google_cloud_service_account), timeout: 60, emulator_host: emulator_host)
17
19
  end
18
20
 
19
21
  def queue_adapter
@@ -1,15 +1,13 @@
1
1
  module Dronejob
2
2
  class Dronejob::Server
3
- attr_reader :worker, :queue, :min_threads, :max_threads
3
+ attr_reader :worker, :queue
4
4
 
5
5
  def initialize(options)
6
6
  @queue = options.dronejob_queue || "drone"
7
- @min_threads = options.min_threads || 1
8
- @max_threads = options.max_threads || 1
9
7
  end
10
8
 
11
9
  def start
12
- @worker = ActiveJob::GoogleCloudPubsub::Worker.new(queue: @queue, pubsub: Dronejob::Base.pubsub, min_threads: self.min_threads, max_threads: self.max_threads)
10
+ @worker = ActiveJob::GoogleCloudPubsub::Worker.new(queue: @queue, pubsub: Dronejob::Base.pubsub)
13
11
  Dronejob::Base.log("info", "Starting server for queue #{@queue} ...", nil)
14
12
  @worker.run
15
13
  end
@@ -1,3 +1,3 @@
1
1
  module Dronejob
2
- VERSION = "2.0.1"
2
+ VERSION = "3.0.0"
3
3
  end
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: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-18 00:00:00.000000000 Z
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,8 +67,11 @@ 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: activejob-google_cloud_pubsub
74
+ name: activejob-google-cloud-pubsub
63
75
  requirement: !ruby/object:Gem::Requirement
64
76
  requirements:
65
77
  - - ">="
@@ -134,70 +146,70 @@ dependencies:
134
146
  requirements:
135
147
  - - ">="
136
148
  - !ruby/object:Gem::Version
137
- version: '1.0'
149
+ version: '2.0'
138
150
  type: :runtime
139
151
  prerelease: false
140
152
  version_requirements: !ruby/object:Gem::Requirement
141
153
  requirements:
142
154
  - - ">="
143
155
  - !ruby/object:Gem::Version
144
- version: '1.0'
156
+ version: '2.0'
145
157
  - !ruby/object:Gem::Dependency
146
158
  name: workspace-archive
147
159
  requirement: !ruby/object:Gem::Requirement
148
160
  requirements:
149
161
  - - ">="
150
162
  - !ruby/object:Gem::Version
151
- version: '1.0'
163
+ version: '2.0'
152
164
  type: :runtime
153
165
  prerelease: false
154
166
  version_requirements: !ruby/object:Gem::Requirement
155
167
  requirements:
156
168
  - - ">="
157
169
  - !ruby/object:Gem::Version
158
- version: '1.0'
170
+ version: '2.0'
159
171
  - !ruby/object:Gem::Dependency
160
172
  name: workspace-media
161
173
  requirement: !ruby/object:Gem::Requirement
162
174
  requirements:
163
175
  - - ">="
164
176
  - !ruby/object:Gem::Version
165
- version: '1.0'
177
+ version: '2.0'
166
178
  type: :runtime
167
179
  prerelease: false
168
180
  version_requirements: !ruby/object:Gem::Requirement
169
181
  requirements:
170
182
  - - ">="
171
183
  - !ruby/object:Gem::Version
172
- version: '1.0'
184
+ version: '2.0'
173
185
  - !ruby/object:Gem::Dependency
174
186
  name: workspace-net
175
187
  requirement: !ruby/object:Gem::Requirement
176
188
  requirements:
177
189
  - - ">="
178
190
  - !ruby/object:Gem::Version
179
- version: '1.0'
191
+ version: '2.0'
180
192
  type: :runtime
181
193
  prerelease: false
182
194
  version_requirements: !ruby/object:Gem::Requirement
183
195
  requirements:
184
196
  - - ">="
185
197
  - !ruby/object:Gem::Version
186
- version: '1.0'
198
+ version: '2.0'
187
199
  - !ruby/object:Gem::Dependency
188
200
  name: workspace-parse
189
201
  requirement: !ruby/object:Gem::Requirement
190
202
  requirements:
191
203
  - - ">="
192
204
  - !ruby/object:Gem::Version
193
- version: '1.0'
205
+ version: '2.0'
194
206
  type: :runtime
195
207
  prerelease: false
196
208
  version_requirements: !ruby/object:Gem::Requirement
197
209
  requirements:
198
210
  - - ">="
199
211
  - !ruby/object:Gem::Version
200
- version: '1.0'
212
+ version: '2.0'
201
213
  - !ruby/object:Gem::Dependency
202
214
  name: pry
203
215
  requirement: !ruby/object:Gem::Requirement
@@ -283,17 +295,16 @@ require_paths:
283
295
  - lib
284
296
  required_ruby_version: !ruby/object:Gem::Requirement
285
297
  requirements:
286
- - - "~>"
298
+ - - ">="
287
299
  - !ruby/object:Gem::Version
288
- version: '2.3'
300
+ version: '2.4'
289
301
  required_rubygems_version: !ruby/object:Gem::Requirement
290
302
  requirements:
291
- - - "~>"
303
+ - - ">="
292
304
  - !ruby/object:Gem::Version
293
- version: '2.4'
305
+ version: '0'
294
306
  requirements: []
295
- rubyforge_project:
296
- rubygems_version: 2.5.2
307
+ rubygems_version: 3.1.2
297
308
  signing_key:
298
309
  specification_version: 4
299
310
  summary: DroneJob Drone Factory