lyber-core 7.4.2 → 7.6.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
2
  SHA256:
3
- metadata.gz: ec486e6f8b80154f3af46f6a85c0cd902237cd2a5dba74a92885626ab86e14b5
4
- data.tar.gz: 79cd8e7fe23eb7a96b7c7661c045898350314b9239fae5415340d5b1a462f109
3
+ metadata.gz: b9ed0c812c1f67354df3b5a866533d133505b97a009fd564a28bd7b66fda7e4f
4
+ data.tar.gz: 2fd1a9458a2cb649c28ec0b9c7fe3f32486aa9ad55212be9dbd470fd06096f8c
5
5
  SHA512:
6
- metadata.gz: 50e8533b28a2d02ab3e445cd6891150c77da736a20fb572989696989fd5214416ef24cd4d90966331376900d325f22843081b11528a91ddfbdd7e3a826fd0e7f
7
- data.tar.gz: 461f29e4eb548881f0460f37d580de9b5c5c041bfdf516475625b9d719b58af7d0a476519ae36bf83fc5e62ca9f0c01f0506d8152b31b9b3f435e4a71c8c862f
6
+ metadata.gz: a18f87bf3bdd09a609698b64e27f3e1093d90c0f8d1bb81ae94a4576002c0a14cc669c606c841a32061796a309610c0242f07173c58c50518565477c9af2959d
7
+ data.tar.gz: 10e08bd6f4804d7caa15fdf24adbc2fe73b6752f626458bebaeb42a5c2258e3205cf6a2038e2b6ffaaafd43c93f10cd1ee2af094f139785573d881d9a70c7c7e
@@ -19,7 +19,7 @@ module LyberCore
19
19
  end
20
20
 
21
21
  def workflow_service
22
- @workflow_service ||= WorkflowClientFactory.build(logger: logger)
22
+ @workflow_service ||= WorkflowClientFactory.build(logger:)
23
23
  end
24
24
 
25
25
  def object_client
@@ -40,7 +40,7 @@ module LyberCore
40
40
  # rubocop:disable Metrics/MethodLength
41
41
  def perform(druid)
42
42
  @druid = druid
43
- Honeybadger.context(druid: druid, process: process, workflow_name: workflow_name)
43
+ Honeybadger.context(druid:, process:, workflow_name:)
44
44
 
45
45
  logger.info "#{druid} processing #{process} (#{workflow_name})"
46
46
  return unless check_item_queued?
@@ -103,10 +103,10 @@ module LyberCore
103
103
  # rubocop:enable Metrics/AbcSize
104
104
 
105
105
  def workflow
106
- @workflow ||= Workflow.new(workflow_service: workflow_service,
107
- druid: druid,
108
- workflow_name: workflow_name,
109
- process: process)
106
+ @workflow ||= Workflow.new(workflow_service:,
107
+ druid:,
108
+ workflow_name:,
109
+ process:)
110
110
  end
111
111
 
112
112
  def check_item_queued?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LyberCore
4
- VERSION = '7.4.2'
4
+ VERSION = '7.6.0'
5
5
  end
@@ -11,39 +11,46 @@ module LyberCore
11
11
  end
12
12
 
13
13
  def start!(note)
14
- workflow_service.update_status(druid: druid,
14
+ workflow_service.update_status(druid:,
15
15
  workflow: workflow_name,
16
- process: process,
16
+ process:,
17
17
  status: 'started',
18
18
  elapsed: 1.0,
19
- note: note)
19
+ note:)
20
20
  end
21
21
 
22
22
  def complete!(status, elapsed, note)
23
- workflow_service.update_status(druid: druid,
23
+ workflow_service.update_status(druid:,
24
24
  workflow: workflow_name,
25
- process: process,
26
- status: status,
27
- elapsed: elapsed,
28
- note: note)
25
+ process:,
26
+ status:,
27
+ elapsed:,
28
+ note:)
29
29
  end
30
30
 
31
31
  def error!(error_msg, error_text)
32
- workflow_service.update_error_status(druid: druid,
32
+ workflow_service.update_error_status(druid:,
33
33
  workflow: workflow_name,
34
- process: process,
35
- error_msg: error_msg,
36
- error_text: error_text)
34
+ process:,
35
+ error_msg:,
36
+ error_text:)
37
+ end
38
+
39
+ # @return [Hash] any workflow context associated with the workflow
40
+ def context
41
+ @context ||= workflow_service.process(pid: druid,
42
+ workflow_name:,
43
+ process:).context
37
44
  end
38
45
 
39
46
  def status
40
- @status ||= workflow_service.workflow_status(druid: druid,
47
+ @status ||= workflow_service.workflow_status(druid:,
41
48
  workflow: workflow_name,
42
- process: process)
49
+ process:)
43
50
  end
44
51
 
45
52
  def lane_id
46
- @lane_id ||= workflow_service.process(pid: druid, workflow_name: workflow_name, process: process).lane_id
53
+ @lane_id ||= workflow_service.process(pid: druid, workflow_name:, process:).lane_id
47
54
  end
48
55
 
49
56
  private
@@ -4,7 +4,7 @@ module LyberCore
4
4
  # Factory for creating a workflow client
5
5
  class WorkflowClientFactory
6
6
  def self.build(logger:)
7
- Dor::Workflow::Client.new(url: Settings.workflow.url, logger: logger, timeout: Settings.workflow.timeout)
7
+ Dor::Workflow::Client.new(url: Settings.workflow.url, logger:, timeout: Settings.workflow.timeout)
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lyber-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.2
4
+ version: 7.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alpana Pande
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2024-01-31 00:00:00.000000000 Z
19
+ date: 2024-10-07 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: activesupport
@@ -52,28 +52,28 @@ dependencies:
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '14.0'
55
+ version: '15.0'
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '14.0'
62
+ version: '15.0'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: dor-workflow-client
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: '7.4'
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: '7.4'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: druid-tools
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +172,34 @@ dependencies:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
174
  version: '1.24'
175
+ - !ruby/object:Gem::Dependency
176
+ name: rubocop-capybara
177
+ requirement: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ - !ruby/object:Gem::Dependency
190
+ name: rubocop-factory_bot
191
+ requirement: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ type: :development
197
+ prerelease: false
198
+ version_requirements: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
175
203
  - !ruby/object:Gem::Dependency
176
204
  name: rubocop-rspec
177
205
  requirement: !ruby/object:Gem::Requirement
@@ -186,6 +214,20 @@ dependencies:
186
214
  - - ">="
187
215
  - !ruby/object:Gem::Version
188
216
  version: '0'
217
+ - !ruby/object:Gem::Dependency
218
+ name: rubocop-rspec_rails
219
+ requirement: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ type: :development
225
+ prerelease: false
226
+ version_requirements: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
189
231
  - !ruby/object:Gem::Dependency
190
232
  name: simplecov
191
233
  requirement: !ruby/object:Gem::Requirement
@@ -232,14 +274,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
274
  requirements:
233
275
  - - ">="
234
276
  - !ruby/object:Gem::Version
235
- version: '3.0'
277
+ version: '3.2'
236
278
  required_rubygems_version: !ruby/object:Gem::Requirement
237
279
  requirements:
238
280
  - - ">="
239
281
  - !ruby/object:Gem::Version
240
282
  version: 1.3.6
241
283
  requirements: []
242
- rubygems_version: 3.5.5
284
+ rubygems_version: 3.5.15
243
285
  signing_key:
244
286
  specification_version: 4
245
287
  summary: Core services used by the SUL Digital Library