libis-workflow 2.0.35 → 2.0.36

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: 0b46fdc4d2608b06a7e65c8db3daa70d50ac1857cd75f91d367c06c9d1b7c2e8
4
- data.tar.gz: 400709db1adb4bce762d039c598b8a115d82e9128692fd431a101d27504d1f07
3
+ metadata.gz: 391021b367fd4a087777f80abc4cc98b7602ac012207155bec4bf0c2f1cd9f9f
4
+ data.tar.gz: 053a3ee71843fec6efcc98d0beb00dec6c5cd9c6a140b2e5f589384b9172e299
5
5
  SHA512:
6
- metadata.gz: 9df92947ec6cd02ae4fd282f067131abd0ab2d64ba7f109d18f3ecde9a03ea47a845f24bfc88abdd5f0a4fed226a3314a3fc05060d283784b7930aaa8f650e76
7
- data.tar.gz: ce09c65bb9ee2f870b6900d7c1510ae2fe5a31d54bf4184d7f48b0866ac303fd36a832b7ffcf7737f102197c5e001134ae0954df7524c0266b9dc1c428f3d8ec
6
+ metadata.gz: 6ca558020759c70cb7acd8e0b241f08e6b17b0f391a9616c726760c9ea1ecd89cc6782b8a4570b826c9daef03be984b17a36c15ae15aa047b599f433b6c10445
7
+ data.tar.gz: 7b426682ab3e15e292215fda755307028d9a5c6abc4ca3facad3f619f46f53a4394b67c607c6bd362eac67edbb31e7d184cf5271af780e7f965f52b0737c5c9e
data/README.md CHANGED
@@ -185,6 +185,10 @@ or if a custom storage implementation is desired, a number of data items and met
185
185
  self.status_log << info
186
186
  end
187
187
 
188
+ def save_log_entry(entry)
189
+ entry.save
190
+ end
191
+
188
192
  end
189
193
  ```
190
194
 
@@ -36,8 +36,7 @@ module Libis
36
36
  end
37
37
  log_entry['status'] = status
38
38
  log_entry['updated'] = DateTime.now
39
- log_entry.save rescue nil # required if log_entry is an external record
40
- self.save!
39
+ self.save_log_entry(log_entry)
41
40
  end
42
41
 
43
42
  # Get last known status symbol for a given task
@@ -94,8 +93,7 @@ module Libis
94
93
  log_entry['progress'] = progress ? progress : (log_entry['progress'] || 0) + 1
95
94
  log_entry['max'] = max if max
96
95
  log_entry['updated'] = DateTime.now
97
- log_entry.save rescue nil # required if log_entry is an external record
98
- self.save!
96
+ self.save_log_entry(log_entry)
99
97
  end
100
98
 
101
99
  protected
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Workflow
3
- VERSION = '2.0.35' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
+ VERSION = '2.0.36' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
4
4
  end
5
5
  end
@@ -37,6 +37,10 @@ module Libis
37
37
  self.status_log.last
38
38
  end
39
39
 
40
+ def save_log_entry(_log_entry)
41
+ self.save!
42
+ end
43
+
40
44
  end
41
45
 
42
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.35
4
+ version: 2.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler