web47command 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/lib/app/models/command_job.rb +12 -1
- data/lib/web47command/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4265d833318b6297e0ac77b126602c7fe90a32f9a840c92c1029795502bd0fdd
|
|
4
|
+
data.tar.gz: 608abfe1fe0fe4984383174154a8be71f8d4949c173650c2652717126c0c8270
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6a5f1c5cb1d0370ee03360f736d71f5c837beeb9eebcc44753266075b50a6eb97c3d91b862383862ce2b8c227c63e3aa7e1ea430b6faf1c818ab2b5b34ec74d
|
|
7
|
+
data.tar.gz: 795a1a37742073f7e4f9663853e27e19b7972a4c83d07a94040e109060dbe128800ca1a3308410e12bfd7fc87f1195a3bdfe5055b3cd52a929a28c64129ab2f9
|
|
@@ -162,6 +162,13 @@ class CommandJob
|
|
|
162
162
|
finished_at: nil,
|
|
163
163
|
error_message: nil,
|
|
164
164
|
result: nil
|
|
165
|
+
when STATE_FAIL
|
|
166
|
+
set retries: 0,
|
|
167
|
+
started_at: Time.now.utc,
|
|
168
|
+
finished_at: nil,
|
|
169
|
+
error_message: nil,
|
|
170
|
+
state: STATE_RETRYING,
|
|
171
|
+
result: nil
|
|
165
172
|
else
|
|
166
173
|
set retries: 0, started_at: Time.now.utc, finished_at: nil, result: nil
|
|
167
174
|
end
|
|
@@ -308,7 +315,11 @@ class CommandJob
|
|
|
308
315
|
end
|
|
309
316
|
output = 'Success' if output.blank?
|
|
310
317
|
command = mask_keywords(command, options[:mask_texts])
|
|
311
|
-
|
|
318
|
+
if block_given?
|
|
319
|
+
yield output
|
|
320
|
+
else
|
|
321
|
+
logs.create!(dir: dir, command: command, message: output)
|
|
322
|
+
end
|
|
312
323
|
check_for_text(output, options[:error_texts], true)
|
|
313
324
|
check_for_text(output, options[:required_texts], false)
|
|
314
325
|
output
|
data/lib/web47command/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web47command
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Schroeder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|