dor-workflow-client 7.7.0 → 7.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12fc3722da54e3e3e25ef9bae87ac0fa5e492076fb88a532450fef9adebe5e52
4
- data.tar.gz: 91113259c02396333c21190914fd79cdcfd66415dcf1b14e9859f2fe8e272084
3
+ metadata.gz: 50dc51fc726e0ea6b0e418046e8181c7abea3fed43875d23767cba2f98772a33
4
+ data.tar.gz: c6245d6c5ff95dad4b7fc12027b00200d04c870eda3787b1106de15db5f7ee57
5
5
  SHA512:
6
- metadata.gz: 3521c9c4b2e0156f1ee8a559a7a61786ec441da04695da184be35a261349c895e8f11132a4687d1ca7db7b98993251ac1475cd95da12cfbbf2f2762ed3a447f7
7
- data.tar.gz: ae4250842e3664aa3978f2ee405b8a217cd149aa5356b74c9a9b2dd0c164643505323271c07891b390f7358295ddc787fdfccc5beb7b361dff343a4573ffb748
6
+ metadata.gz: 63d208f7f80ef972b800bf4d621458ada930f14f9a1bb19f9e8e9340606a43913a48ad0f9fc077790e4c842116f2a48d938a1a324b0074ca2468ee1f0c05c1c5
7
+ data.tar.gz: 7fd2465ca4d9d3945b7c44bec02717913f8d5590241f376c893a8d728dbd78a0b9b31abcf9b6171648a76a97a15aadb659417d4fb6c15e0e88669acb2d26060e
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby-rails: sul-dlss/ruby-rails@4.2.3
3
+ ruby-rails: sul-dlss/ruby-rails@4.6.0
4
4
  workflows:
5
5
  build:
6
6
  jobs:
@@ -8,3 +8,5 @@ workflows:
8
8
  name: lint
9
9
  - ruby-rails/test-gem:
10
10
  name: test
11
+ context: dlss
12
+ use-codecov: true
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require:
3
+ plugins:
4
4
  - rubocop-rake
5
5
  - rubocop-rspec
6
6
 
@@ -213,29 +213,6 @@ Style/RedundantRegexpConstructor: # new in 1.52
213
213
  Enabled: true
214
214
  Style/RedundantStringEscape: # new in 1.37
215
215
  Enabled: true
216
-
217
- Capybara/MatchStyle: # new in 2.17
218
- Enabled: true
219
- Capybara/NegationMatcher: # new in 2.14
220
- Enabled: true
221
- Capybara/SpecificActions: # new in 2.14
222
- Enabled: true
223
- Capybara/SpecificFinders: # new in 2.13
224
- Enabled: true
225
- Capybara/SpecificMatcher: # new in 2.12
226
- Enabled: true
227
- FactoryBot/AssociationStyle: # new in 2.23
228
- Enabled: true
229
- FactoryBot/ConsistentParenthesesStyle: # new in 2.14
230
- Enabled: true
231
- FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
232
- Enabled: true
233
- FactoryBot/FactoryNameStyle: # new in 2.16
234
- Enabled: true
235
- FactoryBot/RedundantFactoryOption: # new in 2.23
236
- Enabled: true
237
- FactoryBot/SyntaxMethods: # new in 2.7
238
- Enabled: true
239
216
  RSpec/BeEmpty: # new in 2.20
240
217
  Enabled: true
241
218
  RSpec/BeEq: # new in 2.9.0
@@ -270,17 +247,6 @@ RSpec/SubjectDeclaration: # new in 2.5
270
247
  Enabled: true
271
248
  RSpec/VerifiedDoubleReference: # new in 2.10.0
272
249
  Enabled: true
273
- RSpec/Rails/AvoidSetupHook: # new in 2.4
274
- Enabled: true
275
- RSpec/Rails/HaveHttpStatus: # new in 2.12
276
- Enabled: true
277
- RSpec/Rails/InferredSpecType: # new in 2.14
278
- Enabled: true
279
- RSpec/Rails/MinitestAssertions: # new in 2.17
280
- Enabled: true
281
- RSpec/Rails/TravelAround: # new in 2.19
282
- Enabled: true
283
-
284
250
  Gemspec/DevelopmentDependencies: # new in 1.44
285
251
  Enabled: true
286
252
  Lint/MixedCaseRange: # new in 1.53
@@ -297,5 +263,69 @@ Style/YAMLFileRead: # new in 1.53
297
263
  Enabled: true
298
264
  RSpec/ReceiveMessages: # new in 2.23
299
265
  Enabled: true
300
- RSpec/Rails/NegationBeValid: # new in 2.23
266
+ Gemspec/AddRuntimeDependency: # new in 1.65
267
+ Enabled: true
268
+ Lint/ArrayLiteralInRegexp: # new in 1.71
269
+ Enabled: true
270
+ Lint/ConstantReassignment: # new in 1.70
271
+ Enabled: true
272
+ Lint/CopDirectiveSyntax: # new in 1.72
273
+ Enabled: true
274
+ Lint/DuplicateSetElement: # new in 1.67
275
+ Enabled: true
276
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
277
+ Enabled: true
278
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
279
+ Enabled: true
280
+ Lint/LiteralAssignmentInCondition: # new in 1.58
281
+ Enabled: true
282
+ Lint/NumericOperationWithConstantResult: # new in 1.69
283
+ Enabled: true
284
+ Lint/RedundantTypeConversion: # new in 1.72
285
+ Enabled: true
286
+ Lint/SharedMutableDefault: # new in 1.70
287
+ Enabled: true
288
+ Lint/SuppressedExceptionInNumberConversion: # new in 1.72
289
+ Enabled: true
290
+ Lint/UnescapedBracketInRegexp: # new in 1.68
291
+ Enabled: true
292
+ Lint/UselessConstantScoping: # new in 1.72
293
+ Enabled: true
294
+ Lint/UselessDefined: # new in 1.69
295
+ Enabled: true
296
+ Lint/UselessNumericOperation: # new in 1.66
297
+ Enabled: true
298
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
299
+ Enabled: true
300
+ Style/BitwisePredicate: # new in 1.68
301
+ Enabled: true
302
+ Style/CombinableDefined: # new in 1.68
303
+ Enabled: true
304
+ Style/DigChain: # new in 1.69
305
+ Enabled: true
306
+ Style/FileNull: # new in 1.69
307
+ Enabled: true
308
+ Style/FileTouch: # new in 1.69
309
+ Enabled: true
310
+ Style/HashSlice: # new in 1.71
311
+ Enabled: true
312
+ Style/ItAssignment: # new in 1.70
313
+ Enabled: true
314
+ Style/KeywordArgumentsMerging: # new in 1.68
315
+ Enabled: true
316
+ Style/MapIntoArray: # new in 1.63
317
+ Enabled: true
318
+ Style/RedundantFormat: # new in 1.72
319
+ Enabled: true
320
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
321
+ Enabled: true
322
+ Style/SafeNavigationChainLength: # new in 1.68
323
+ Enabled: true
324
+ Style/SendWithLiteralMethodName: # new in 1.64
325
+ Enabled: true
326
+ Style/SingleLineDoEndBlock: # new in 1.57
327
+ Enabled: true
328
+ Style/SuperArguments: # new in 1.64
329
+ Enabled: true
330
+ Style/SuperWithArgsParentheses: # new in 1.58
301
331
  Enabled: true
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,17 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --auto-gen-only-exclude`
3
- # on 2023-08-23 21:27:28 UTC using RuboCop version 1.56.1.
3
+ # on 2025-03-10 18:22:13 UTC using RuboCop version 1.73.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ Lint/RedundantCopDisableDirective:
12
+ Exclude:
13
+ - 'lib/dor/workflow/response/workflow.rb'
14
+
9
15
  # Offense count: 2
10
16
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
11
17
  Metrics/AbcSize:
@@ -26,13 +32,23 @@ Metrics/ParameterLists:
26
32
  Exclude:
27
33
  - 'lib/dor/workflow/client/workflow_routes.rb'
28
34
 
29
- # Offense count: 73
35
+ # Offense count: 9
36
+ # This cop supports safe autocorrection (--autocorrect).
37
+ # Configuration parameters: EnforcedStyle.
38
+ # SupportedStyles: be_a, be_kind_of
39
+ RSpec/ClassCheck:
40
+ Exclude:
41
+ - 'spec/dor/workflow/client/workflow_routes_spec.rb'
42
+ - 'spec/dor/workflow/response/workflow_spec.rb'
43
+ - 'spec/dor/workflow/response/workflows_spec.rb'
44
+
45
+ # Offense count: 66
30
46
  # Configuration parameters: AssignmentOnly.
31
47
  RSpec/InstanceVariable:
32
48
  Exclude:
33
49
  - 'spec/dor/workflow/client_spec.rb'
34
50
 
35
- # Offense count: 7
51
+ # Offense count: 8
36
52
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
37
53
  RSpec/VerifiedDoubles:
38
54
  Exclude:
data/Gemfile CHANGED
@@ -17,7 +17,7 @@ group :development do
17
17
  gem 'rspec', '~> 3.3'
18
18
  gem 'rubocop', '~> 1.24'
19
19
  gem 'rubocop-rake'
20
- gem 'rubocop-rspec', '~> 2.1'
20
+ gem 'rubocop-rspec'
21
21
  gem 'simplecov'
22
22
  gem 'webmock'
23
23
  gem 'yard'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-workflow-client (7.7.0)
4
+ dor-workflow-client (7.8.0)
5
5
  activesupport (>= 7.0.0)
6
6
  deprecation (>= 0.99.0)
7
7
  faraday (~> 2.0)
@@ -12,7 +12,7 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (8.0.0)
15
+ activesupport (8.0.2)
16
16
  base64
17
17
  benchmark (>= 0.3)
18
18
  bigdecimal
@@ -27,94 +27,91 @@ GEM
27
27
  uri (>= 0.13.1)
28
28
  addressable (2.8.7)
29
29
  public_suffix (>= 2.0.2, < 7.0)
30
- ast (2.4.2)
31
- base64 (0.2.0)
32
- benchmark (0.4.0)
33
- bigdecimal (3.1.8)
34
- byebug (11.1.3)
35
- concurrent-ruby (1.3.4)
36
- connection_pool (2.4.1)
30
+ ast (2.4.3)
31
+ base64 (0.3.0)
32
+ benchmark (0.4.1)
33
+ bigdecimal (3.2.2)
34
+ byebug (12.0.0)
35
+ concurrent-ruby (1.3.5)
36
+ connection_pool (2.5.3)
37
37
  crack (1.0.0)
38
38
  bigdecimal
39
39
  rexml
40
40
  deprecation (1.1.0)
41
41
  activesupport
42
- diff-lcs (1.5.1)
42
+ diff-lcs (1.6.2)
43
43
  docile (1.4.1)
44
- drb (2.2.1)
45
- faraday (2.12.2)
44
+ drb (2.2.3)
45
+ faraday (2.13.1)
46
46
  faraday-net_http (>= 2.0, < 3.5)
47
47
  json
48
48
  logger
49
- faraday-net_http (3.4.0)
49
+ faraday-net_http (3.4.1)
50
50
  net-http (>= 0.5.0)
51
- faraday-retry (2.2.1)
51
+ faraday-retry (2.3.2)
52
52
  faraday (~> 2.0)
53
- hashdiff (1.1.2)
54
- i18n (1.14.6)
53
+ hashdiff (1.2.0)
54
+ i18n (1.14.7)
55
55
  concurrent-ruby (~> 1.0)
56
- json (2.9.0)
57
- language_server-protocol (3.17.0.3)
58
- logger (1.6.2)
59
- mini_portile2 (2.8.8)
60
- minitest (5.25.4)
56
+ json (2.12.2)
57
+ language_server-protocol (3.17.0.5)
58
+ lint_roller (1.1.0)
59
+ logger (1.7.0)
60
+ mini_portile2 (2.8.9)
61
+ minitest (5.25.5)
61
62
  net-http (0.6.0)
62
63
  uri
63
- nokogiri (1.17.0)
64
+ nokogiri (1.18.8)
64
65
  mini_portile2 (~> 2.8.2)
65
66
  racc (~> 1.4)
66
- parallel (1.26.3)
67
- parser (3.3.6.0)
67
+ parallel (1.27.0)
68
+ parser (3.3.8.0)
68
69
  ast (~> 2.4.1)
69
70
  racc
70
- public_suffix (6.0.1)
71
+ prism (1.4.0)
72
+ public_suffix (6.0.2)
71
73
  racc (1.8.1)
72
74
  rainbow (3.1.1)
73
- rake (13.2.1)
74
- regexp_parser (2.9.3)
75
- rexml (3.3.9)
76
- rspec (3.13.0)
75
+ rake (13.3.0)
76
+ regexp_parser (2.10.0)
77
+ rexml (3.4.1)
78
+ rspec (3.13.1)
77
79
  rspec-core (~> 3.13.0)
78
80
  rspec-expectations (~> 3.13.0)
79
81
  rspec-mocks (~> 3.13.0)
80
- rspec-core (3.13.2)
82
+ rspec-core (3.13.4)
81
83
  rspec-support (~> 3.13.0)
82
- rspec-expectations (3.13.3)
84
+ rspec-expectations (3.13.5)
83
85
  diff-lcs (>= 1.2.0, < 2.0)
84
86
  rspec-support (~> 3.13.0)
85
- rspec-mocks (3.13.2)
87
+ rspec-mocks (3.13.5)
86
88
  diff-lcs (>= 1.2.0, < 2.0)
87
89
  rspec-support (~> 3.13.0)
88
- rspec-support (3.13.2)
90
+ rspec-support (3.13.4)
89
91
  rspec_junit_formatter (0.6.0)
90
92
  rspec-core (>= 2, < 4, != 2.12.0)
91
- rubocop (1.69.1)
93
+ rubocop (1.77.0)
92
94
  json (~> 2.3)
93
- language_server-protocol (>= 3.17.0)
95
+ language_server-protocol (~> 3.17.0.2)
96
+ lint_roller (~> 1.1.0)
94
97
  parallel (~> 1.10)
95
98
  parser (>= 3.3.0.2)
96
99
  rainbow (>= 2.2.2, < 4.0)
97
100
  regexp_parser (>= 2.9.3, < 3.0)
98
- rubocop-ast (>= 1.36.2, < 2.0)
101
+ rubocop-ast (>= 1.45.1, < 2.0)
99
102
  ruby-progressbar (~> 1.7)
100
103
  unicode-display_width (>= 2.4.0, < 4.0)
101
- rubocop-ast (1.36.2)
102
- parser (>= 3.3.1.0)
103
- rubocop-capybara (2.21.0)
104
- rubocop (~> 1.41)
105
- rubocop-factory_bot (2.26.1)
106
- rubocop (~> 1.61)
107
- rubocop-rake (0.6.0)
108
- rubocop (~> 1.0)
109
- rubocop-rspec (2.31.0)
110
- rubocop (~> 1.40)
111
- rubocop-capybara (~> 2.17)
112
- rubocop-factory_bot (~> 2.22)
113
- rubocop-rspec_rails (~> 2.28)
114
- rubocop-rspec_rails (2.29.1)
115
- rubocop (~> 1.61)
104
+ rubocop-ast (1.45.1)
105
+ parser (>= 3.3.7.2)
106
+ prism (~> 1.4)
107
+ rubocop-rake (0.7.1)
108
+ lint_roller (~> 1.1)
109
+ rubocop (>= 1.72.1)
110
+ rubocop-rspec (3.6.0)
111
+ lint_roller (~> 1.1)
112
+ rubocop (~> 1.72, >= 1.72.1)
116
113
  ruby-progressbar (1.13.0)
117
- securerandom (0.4.0)
114
+ securerandom (0.4.1)
118
115
  simplecov (0.22.0)
119
116
  docile (~> 1.1)
120
117
  simplecov-html (~> 0.11)
@@ -123,16 +120,16 @@ GEM
123
120
  simplecov_json_formatter (0.1.4)
124
121
  tzinfo (2.0.6)
125
122
  concurrent-ruby (~> 1.0)
126
- unicode-display_width (3.1.2)
123
+ unicode-display_width (3.1.4)
127
124
  unicode-emoji (~> 4.0, >= 4.0.4)
128
125
  unicode-emoji (4.0.4)
129
- uri (1.0.2)
130
- webmock (3.24.0)
126
+ uri (1.0.3)
127
+ webmock (3.25.1)
131
128
  addressable (>= 2.8.0)
132
129
  crack (>= 0.3.2)
133
130
  hashdiff (>= 0.4.0, < 2.0.0)
134
131
  yard (0.9.37)
135
- zeitwerk (2.7.1)
132
+ zeitwerk (2.7.3)
136
133
 
137
134
  PLATFORMS
138
135
  ruby
@@ -145,10 +142,10 @@ DEPENDENCIES
145
142
  rspec_junit_formatter
146
143
  rubocop (~> 1.24)
147
144
  rubocop-rake
148
- rubocop-rspec (~> 2.1)
145
+ rubocop-rspec
149
146
  simplecov
150
147
  webmock
151
148
  yard
152
149
 
153
150
  BUNDLED WITH
154
- 2.4.13
151
+ 2.6.9
data/LICENSE.txt CHANGED
@@ -1,22 +1,174 @@
1
- Copyright (c) 2012 Willy Mene
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  [![CircleCI](https://circleci.com/gh/sul-dlss/dor-workflow-client.svg?style=svg)](https://circleci.com/gh/sul-dlss/dor-workflow-client)
2
- [![Test Coverage](https://api.codeclimate.com/v1/badges/ff9d01af29a7a357645c/test_coverage)](https://codeclimate.com/github/sul-dlss/dor-workflow-client/test_coverage)
3
- [![Maintainability](https://api.codeclimate.com/v1/badges/ff9d01af29a7a357645c/maintainability)](https://codeclimate.com/github/sul-dlss/dor-workflow-client/maintainability)
4
-
2
+ [![codecov](https://codecov.io/github/sul-dlss/dor-workflow-client/graph/badge.svg?token=Wz2wROJGOY)](https://codecov.io/github/sul-dlss/dor-workflow-client)
5
3
  [![Gem Version](https://badge.fury.io/rb/dor-workflow-client.svg)](https://badge.fury.io/rb/dor-workflow-client)
6
4
 
7
5
  # dor-workflow-client gem
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.description = 'Enables Ruby manipulation of the DOR Workflow Service via its REST API'
13
13
  gem.summary = 'Provides convenience methods to work with the DOR Workflow Service'
14
14
  gem.homepage = 'https://consul.stanford.edu/display/DOR/DOR+services#DORservices-initializeworkflow'
15
-
15
+ gem.licenses = ['Apache-2.0']
16
16
  gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
17
  gem.require_paths = ['lib']
18
18
  gem.required_ruby_version = '>= 3.0'
@@ -39,15 +39,6 @@ module Dor
39
39
  end
40
40
  end
41
41
 
42
- private
43
-
44
- def filter_milestone(lifecycle_doc, milestone_name)
45
- milestone = lifecycle_doc.at_xpath("//lifecycle/milestone[text() = '#{milestone_name}']")
46
- return unless milestone
47
-
48
- Time.parse(milestone['date'])
49
- end
50
-
51
42
  # @param [String] druid object id
52
43
  # @param [Boolean] active_only (false) if true, return only lifecycle steps for versions that have all processes complete
53
44
  # @param [Number] version the version to query for
@@ -69,7 +60,16 @@ module Dor
69
60
  Nokogiri::XML(requestor.request(req))
70
61
  end
71
62
 
63
+ private
64
+
72
65
  attr_reader :requestor
66
+
67
+ def filter_milestone(lifecycle_doc, milestone_name)
68
+ milestone = lifecycle_doc.at_xpath("//lifecycle/milestone[text() = '#{milestone_name}']")
69
+ return unless milestone
70
+
71
+ Time.parse(milestone['date'])
72
+ end
73
73
  end
74
74
  end
75
75
  end
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Workflow
5
5
  class Client
6
- VERSION = '7.7.0'
6
+ VERSION = '7.8.0'
7
7
  end
8
8
  end
9
9
  end
@@ -44,7 +44,7 @@ module Dor
44
44
  :workflow, :process, :delete_workflow, :delete_all_workflows, :update_status, :update_error_status,
45
45
  to: :workflow_routes
46
46
 
47
- delegate :lifecycle, :active_lifecycle, :milestones, to: :lifecycle_routes
47
+ delegate :lifecycle, :active_lifecycle, :milestones, :query_lifecycle, to: :lifecycle_routes
48
48
 
49
49
  delegate :lane_ids, :objects_for_workstep, :objects_erroring_at_workstep, to: :queues
50
50
 
@@ -21,7 +21,7 @@ module Dor
21
21
  # @param [Integer] version the version we are checking for.
22
22
  def active_for?(version:)
23
23
  result = ng_xml.at_xpath("/workflow/process[@version=#{version}]")
24
- result ? true : false
24
+ result ? true : false # rubocop:disable Style/RedundantCondition
25
25
  end
26
26
 
27
27
  # Returns the process, for the most recent version that matches the given name:
@@ -57,4 +57,23 @@ RSpec.describe Dor::Workflow::Client::LifecycleRoutes do
57
57
  end
58
58
  end
59
59
  end
60
+
61
+ describe '#query_lifecycle' do
62
+ subject(:lifecycle) { routes.query_lifecycle(druid, active_only: true, version: 2) }
63
+
64
+ let(:xml) do
65
+ '<?xml version="1.0" encoding="UTF-8"?><lifecycle objectId="druid:gv054hp4128"><milestone date="2012-01-26T21:06:54-0800" version="2">published</milestone></lifecycle>'
66
+ end
67
+
68
+ before do
69
+ allow(requestor).to receive(:request).and_return(xml)
70
+ end
71
+
72
+ it 'returns XML' do
73
+ expect(lifecycle).to be_a(Nokogiri::XML::Document)
74
+ expect(lifecycle.to_xml).to eq(Nokogiri::XML(xml).to_xml)
75
+
76
+ expect(requestor).to have_received(:request).with('objects/druid:gv054hp4128/lifecycle?version=2&active-only=true')
77
+ end
78
+ end
60
79
  end
data/spec/spec_helper.rb CHANGED
@@ -3,6 +3,12 @@
3
3
  require 'simplecov'
4
4
  SimpleCov.start do
5
5
  add_filter 'spec'
6
+
7
+ if ENV['CI']
8
+ require 'simplecov_json_formatter'
9
+
10
+ formatter SimpleCov::Formatter::JSONFormatter
11
+ end
6
12
  end
7
13
 
8
14
  lib = File.expand_path('lib', __dir__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-workflow-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.7.0
4
+ version: 7.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willy Mene
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-12-10 00:00:00.000000000 Z
12
+ date: 2025-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -143,7 +143,8 @@ files:
143
143
  - spec/dor/workflow/response/workflows_spec.rb
144
144
  - spec/spec_helper.rb
145
145
  homepage: https://consul.stanford.edu/display/DOR/DOR+services#DORservices-initializeworkflow
146
- licenses: []
146
+ licenses:
147
+ - Apache-2.0
147
148
  metadata:
148
149
  rubygems_mfa_required: 'true'
149
150
  post_install_message:
@@ -161,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
162
  - !ruby/object:Gem::Version
162
163
  version: '0'
163
164
  requirements: []
164
- rubygems_version: 3.5.22
165
+ rubygems_version: 3.5.11
165
166
  signing_key:
166
167
  specification_version: 4
167
168
  summary: Provides convenience methods to work with the DOR Workflow Service