web47command 0.0.8 → 0.0.9

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
2
  SHA256:
3
- metadata.gz: e4c9af98c7b86e879a9885c598141652ba58bf95a2c356067d55e3af5e8178c3
4
- data.tar.gz: cc1fcf8e729041d1273908c1da76bbd9810af5206d234335aab5b56fd7ff0587
3
+ metadata.gz: 4265d833318b6297e0ac77b126602c7fe90a32f9a840c92c1029795502bd0fdd
4
+ data.tar.gz: 608abfe1fe0fe4984383174154a8be71f8d4949c173650c2652717126c0c8270
5
5
  SHA512:
6
- metadata.gz: d36c06edcaf174da4ff360a2842e86c6bd1c6c47ced6cb60567fa0623c279bbffda43bee966f479226b1928434aa62309964f5b7214d27236d232a86adb570c0
7
- data.tar.gz: d4a92dd44cd66e1f352dcdc64bd076c32453c09989ef693d15601710584eec3d8f2b7e690ec4f636d0b2404013428c89510157f00597b3093a41374769c59b12
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
- logs.create!(dir: dir, command: command, message: output)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47command
4
- VERSION = '0.0.8'
4
+ VERSION = '0.0.9'
5
5
  end
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.8
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-04-13 00:00:00.000000000 Z
11
+ date: 2020-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport