dor-workflow-service 1.7.5 → 1.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +206 -0
- data/.travis.yml +5 -0
- data/README.md +8 -2
- data/Rakefile +1 -1
- data/dor-workflow-service.gemspec +3 -3
- data/gemfiles/rails3.gemfile +12 -0
- data/gemfiles/rails4.gemfile +12 -0
- data/lib/dor/services/workflow_service.rb +42 -49
- data/lib/dor/workflow_version.rb +1 -1
- data/spec/spec_helper.rb +6 -3
- data/spec/workflow_service_spec.rb +4 -8
- metadata +21 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa9ff38ab7893369b2e7c762f0a3d76725c8c9e
|
4
|
+
data.tar.gz: c0196de5226f2771b595efd265d210f5bdfc8949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1713dda989aed538147756b8a0b51df5a54adee310302b76e609037e4dc8629aac1602a423dc951a92014eda8cedf59ede51f34916cddaf07c86d35e862ac8b1
|
7
|
+
data.tar.gz: b7d671e2973e6ce7267180caf74a436266f8fb7c9237c7d2191f31e2cf529b8c5a1e0b852ca41646150457d13a90a7e7bb0e6aad4204df2b00833830a6a88008
|
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,206 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2015-06-26 11:52:46 -0700 using RuboCop version 0.31.0.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# Offense count: 1
|
9
|
+
# Cop supports --auto-correct.
|
10
|
+
Lint/UnusedBlockArgument:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
# Cop supports --auto-correct.
|
15
|
+
Lint/UnusedMethodArgument:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
# Offense count: 2
|
19
|
+
Metrics/AbcSize:
|
20
|
+
Max: 32
|
21
|
+
|
22
|
+
# Offense count: 2
|
23
|
+
# Configuration parameters: CountComments.
|
24
|
+
Metrics/MethodLength:
|
25
|
+
Max: 16
|
26
|
+
|
27
|
+
# Offense count: 1
|
28
|
+
# Configuration parameters: CountComments.
|
29
|
+
Metrics/ModuleLength:
|
30
|
+
Max: 202
|
31
|
+
|
32
|
+
# Offense count: 2
|
33
|
+
# Configuration parameters: CountKeywordArgs.
|
34
|
+
Metrics/ParameterLists:
|
35
|
+
Max: 6
|
36
|
+
|
37
|
+
# Offense count: 2
|
38
|
+
# Cop supports --auto-correct.
|
39
|
+
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
40
|
+
Style/AlignHash:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
# Offense count: 2
|
44
|
+
# Cop supports --auto-correct.
|
45
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
46
|
+
Style/BlockDelimiters:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# Offense count: 5
|
50
|
+
# Cop supports --auto-correct.
|
51
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
52
|
+
Style/BracesAroundHashParameters:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
# Offense count: 4
|
56
|
+
Style/ClassVars:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
# Offense count: 1
|
60
|
+
Style/Documentation:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
# Offense count: 7
|
64
|
+
# Cop supports --auto-correct.
|
65
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
66
|
+
Style/EmptyLinesAroundBlockBody:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
# Offense count: 2
|
70
|
+
# Cop supports --auto-correct.
|
71
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
72
|
+
Style/EmptyLinesAroundClassBody:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
# Offense count: 1
|
76
|
+
# Cop supports --auto-correct.
|
77
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
78
|
+
Style/EmptyLinesAroundModuleBody:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
# Offense count: 1
|
82
|
+
# Configuration parameters: Exclude.
|
83
|
+
Style/FileName:
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
# Offense count: 52
|
87
|
+
# Cop supports --auto-correct.
|
88
|
+
# Configuration parameters: SupportedStyles, UseHashRocketsWithSymbolValues.
|
89
|
+
Style/HashSyntax:
|
90
|
+
EnforcedStyle: hash_rockets
|
91
|
+
|
92
|
+
# Offense count: 2
|
93
|
+
# Cop supports --auto-correct.
|
94
|
+
Style/LeadingCommentSpace:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
# Offense count: 1
|
98
|
+
# Cop supports --auto-correct.
|
99
|
+
Style/MethodCallParentheses:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
# Offense count: 2
|
103
|
+
# Cop supports --auto-correct.
|
104
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
105
|
+
Style/MethodDefParentheses:
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
# Offense count: 2
|
109
|
+
# Cop supports --auto-correct.
|
110
|
+
Style/MultilineBlockLayout:
|
111
|
+
Enabled: false
|
112
|
+
|
113
|
+
# Offense count: 10
|
114
|
+
# Cop supports --auto-correct.
|
115
|
+
# Configuration parameters: PreferredDelimiters.
|
116
|
+
Style/PercentLiteralDelimiters:
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
# Offense count: 1
|
120
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
121
|
+
Style/RaiseArgs:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
# Offense count: 10
|
125
|
+
# Cop supports --auto-correct.
|
126
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
127
|
+
Style/RedundantReturn:
|
128
|
+
Enabled: false
|
129
|
+
|
130
|
+
# Offense count: 3
|
131
|
+
# Cop supports --auto-correct.
|
132
|
+
Style/RedundantSelf:
|
133
|
+
Enabled: false
|
134
|
+
|
135
|
+
# Offense count: 5
|
136
|
+
# Cop supports --auto-correct.
|
137
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
138
|
+
Style/SignalException:
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
# Offense count: 14
|
142
|
+
# Cop supports --auto-correct.
|
143
|
+
Style/SpaceAfterComma:
|
144
|
+
Enabled: false
|
145
|
+
|
146
|
+
# Offense count: 6
|
147
|
+
# Cop supports --auto-correct.
|
148
|
+
Style/SpaceAfterControlKeyword:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
# Offense count: 7
|
152
|
+
# Cop supports --auto-correct.
|
153
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
154
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
# Offense count: 11
|
158
|
+
# Cop supports --auto-correct.
|
159
|
+
# Configuration parameters: MultiSpaceAllowedForOperators.
|
160
|
+
Style/SpaceAroundOperators:
|
161
|
+
Enabled: false
|
162
|
+
|
163
|
+
# Offense count: 6
|
164
|
+
# Cop supports --auto-correct.
|
165
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
166
|
+
Style/SpaceBeforeBlockBraces:
|
167
|
+
Enabled: false
|
168
|
+
|
169
|
+
# Offense count: 8
|
170
|
+
# Cop supports --auto-correct.
|
171
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
172
|
+
Style/SpaceInsideBlockBraces:
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
# Offense count: 6
|
176
|
+
# Cop supports --auto-correct.
|
177
|
+
Style/SpaceInsideBrackets:
|
178
|
+
Enabled: false
|
179
|
+
|
180
|
+
# Offense count: 15
|
181
|
+
# Cop supports --auto-correct.
|
182
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
183
|
+
Style/SpaceInsideHashLiteralBraces:
|
184
|
+
Enabled: false
|
185
|
+
|
186
|
+
# Offense count: 4
|
187
|
+
# Cop supports --auto-correct.
|
188
|
+
Style/SpaceInsideParens:
|
189
|
+
Enabled: false
|
190
|
+
|
191
|
+
# Offense count: 1
|
192
|
+
# Cop supports --auto-correct.
|
193
|
+
Style/SpecialGlobalVars:
|
194
|
+
Enabled: false
|
195
|
+
|
196
|
+
# Offense count: 128
|
197
|
+
# Cop supports --auto-correct.
|
198
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
199
|
+
Style/StringLiterals:
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
# Offense count: 1
|
203
|
+
# Cop supports --auto-correct.
|
204
|
+
# Configuration parameters: IgnoredMethods.
|
205
|
+
Style/SymbolProc:
|
206
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/sul-dlss/dor-workflow-service.svg?branch=master)](https://travis-ci.org/sul-dlss/dor-workflow-service)
|
2
|
+
[![Dependency Status](https://gemnasium.com/sul-dlss/dor-workflow-service.svg)](https://gemnasium.com/sul-dlss/dor-workflow-service)
|
1
3
|
|
2
4
|
# dor-workflow-service gem
|
3
5
|
|
@@ -9,11 +11,15 @@ https://consul.stanford.edu/display/DOR/DOR+services#DORservices-initializeworkf
|
|
9
11
|
To initialize usage of the service, you need to call `Dor::WorkflowService.configure`, like in a bootup or startup method,
|
10
12
|
e.g.:
|
11
13
|
|
12
|
-
|
14
|
+
```ruby
|
15
|
+
Dor::WorkflowService.configure('https://test-server.edu/workflow/')
|
16
|
+
```
|
13
17
|
|
14
18
|
If you plan to archive workflows, then you need to set the URL to the Dor REST service:
|
15
19
|
|
16
|
-
|
20
|
+
```ruby
|
21
|
+
Dor::WorkflowService.configure('https://test-server.edu/workflow/', :dor_services_url => 'https://sul-lyberservices-dev.stanford.edu/dor')
|
22
|
+
```
|
17
23
|
|
18
24
|
There's no need to call `Dor::WorkflowService.configure` if using the `dor-services` gem and using the `Dor::Config`
|
19
25
|
object. The latest versions of `dor-services` will configure the workflow service for you.
|
data/Rakefile
CHANGED
@@ -17,13 +17,13 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(spec)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency "activesupport", '>= 3.2.1', '<
|
20
|
+
gem.add_dependency "activesupport", '>= 3.2.1', '< 5'
|
21
21
|
gem.add_dependency "nokogiri", '~> 1.6.0'
|
22
22
|
gem.add_dependency "rest-client", '~> 1.7'
|
23
|
-
gem.add_dependency "confstruct", '
|
23
|
+
gem.add_dependency "confstruct", '>= 0.2.7', '< 2'
|
24
24
|
|
25
25
|
gem.add_development_dependency "rake"
|
26
|
-
gem.add_development_dependency "rspec"
|
26
|
+
gem.add_development_dependency "rspec", "~> 3.3"
|
27
27
|
gem.add_development_dependency "yard"
|
28
28
|
gem.add_development_dependency "redcarpet"
|
29
29
|
gem.add_development_dependency "equivalent-xml", '~> 0.5.1'
|
@@ -83,9 +83,7 @@ module Dor
|
|
83
83
|
raise Exception.new("Unable to parse response:\n#{workflow_md}") if(doc.root.nil?)
|
84
84
|
|
85
85
|
status = doc.root.at_xpath("//process[@name='#{process}']/@status")
|
86
|
-
if status
|
87
|
-
status=status.content
|
88
|
-
end
|
86
|
+
status=status.content if status
|
89
87
|
return status
|
90
88
|
end
|
91
89
|
|
@@ -175,9 +173,7 @@ module Dor
|
|
175
173
|
def get_lifecycle(repo, druid, milestone)
|
176
174
|
doc = self.query_lifecycle(repo, druid)
|
177
175
|
milestone = doc.at_xpath("//lifecycle/milestone[text() = '#{milestone}']")
|
178
|
-
|
179
|
-
return Time.parse(milestone['date'])
|
180
|
-
end
|
176
|
+
return Time.parse(milestone['date']) if milestone
|
181
177
|
|
182
178
|
nil
|
183
179
|
end
|
@@ -196,9 +192,7 @@ module Dor
|
|
196
192
|
def get_active_lifecycle(repo, druid, milestone)
|
197
193
|
doc = self.query_lifecycle(repo, druid, true)
|
198
194
|
milestone = doc.at_xpath("//lifecycle/milestone[text() = '#{milestone}']")
|
199
|
-
|
200
|
-
return Time.parse(milestone['date'])
|
201
|
-
end
|
195
|
+
return Time.parse(milestone['date']) if milestone
|
202
196
|
|
203
197
|
nil
|
204
198
|
end
|
@@ -263,7 +257,6 @@ module Dor
|
|
263
257
|
# }
|
264
258
|
#
|
265
259
|
def get_objects_for_workstep completed, waiting, lane_id='default', options = {}
|
266
|
-
result = nil
|
267
260
|
waiting_param = qualify_step(options[:default_repository],options[:default_workflow],waiting)
|
268
261
|
uri_string = "workflow_queue?waiting=#{waiting_param}"
|
269
262
|
if(completed)
|
@@ -273,7 +266,7 @@ module Dor
|
|
273
266
|
end
|
274
267
|
end
|
275
268
|
|
276
|
-
if options[:limit]
|
269
|
+
if options[:limit] && options[:limit].to_i > 0
|
277
270
|
uri_string << "&limit=#{options[:limit].to_i}"
|
278
271
|
end
|
279
272
|
|
@@ -310,7 +303,7 @@ module Dor
|
|
310
303
|
result = {}
|
311
304
|
uri_string = "workflow_queue?repository=#{repository}&workflow=#{workflow}&error=#{step}"
|
312
305
|
resp = workflow_resource[uri_string].get
|
313
|
-
|
306
|
+
Nokogiri::XML(resp).xpath('//object').collect do |node|
|
314
307
|
result.merge!(node['id'] => node['errorMessage'])
|
315
308
|
end
|
316
309
|
result
|
@@ -411,7 +404,7 @@ module Dor
|
|
411
404
|
# @param [Boolean] create_accession_wf Option to create accessionWF when closing a version. Defaults to true
|
412
405
|
def close_version(repo, druid, create_accession_wf = true)
|
413
406
|
uri = "#{repo}/objects/#{druid}/versionClose"
|
414
|
-
uri << "?create-accession=false"
|
407
|
+
uri << "?create-accession=false" unless create_accession_wf
|
415
408
|
workflow_resource[uri].post ''
|
416
409
|
return true
|
417
410
|
end
|
@@ -454,47 +447,47 @@ module Dor
|
|
454
447
|
@@resource = RestClient::Resource.new(url, params)
|
455
448
|
end
|
456
449
|
|
457
|
-
|
450
|
+
protected
|
458
451
|
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
452
|
+
def build_queued_uri(repository, opts = {})
|
453
|
+
uri_string = "workflow_queue/all_queued?repository=#{repository}"
|
454
|
+
uri_string << "&hours-ago=#{opts[:hours_ago]}" if opts[:hours_ago]
|
455
|
+
uri_string << "&limit=#{opts[:limit]}" if opts[:limit]
|
456
|
+
uri_string
|
457
|
+
end
|
465
458
|
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
459
|
+
def parse_queued_workflows_response(xml)
|
460
|
+
res = []
|
461
|
+
doc = Nokogiri::XML(xml)
|
462
|
+
doc.xpath('/workflows/workflow').each do |wf_node|
|
463
|
+
wf = {}
|
464
|
+
wf[:workflow] = wf_node['name']
|
465
|
+
wf[:step] = wf_node['process']
|
466
|
+
wf[:druid] = wf_node['druid']
|
467
|
+
wf[:lane_id] = wf_node['laneId']
|
468
|
+
res << wf
|
469
|
+
end
|
470
|
+
res
|
476
471
|
end
|
477
|
-
res
|
478
|
-
end
|
479
472
|
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
473
|
+
# Adds laneId attributes to each process of workflow xml
|
474
|
+
#
|
475
|
+
# @param [String] lane_id to add to each process element
|
476
|
+
# @param [String] wf_xml the workflow xml
|
477
|
+
# @return [String] wf_xml with lane_id attributes
|
478
|
+
def add_lane_id_to_workflow_xml(lane_id, wf_xml)
|
479
|
+
doc = Nokogiri::XML(wf_xml)
|
480
|
+
doc.xpath('/workflow/process').each { |proc| proc['laneId'] = lane_id }
|
481
|
+
doc.to_xml
|
482
|
+
end
|
490
483
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
484
|
+
def count_objects_in_step(workflow, step, type, repo)
|
485
|
+
uri_string = "workflow_queue?repository=#{repo}&workflow=#{workflow}&#{type}=#{step}"
|
486
|
+
resp = @workflow_resource[uri_string].get
|
487
|
+
node = Nokogiri::XML(resp).at_xpath('/objects')
|
488
|
+
raise "Unable to determine count from response" if node.nil?
|
489
|
+
node['count'].to_i
|
490
|
+
end
|
498
491
|
|
499
492
|
end
|
500
493
|
end
|
data/lib/dor/workflow_version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
lib = File.expand_path('../lib', __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
|
4
|
+
require 'dor-workflow-service'
|
5
|
+
require 'equivalent-xml'
|
6
|
+
require 'equivalent-xml/rspec_matchers'
|
7
|
+
|
4
8
|
Bundler.require(:default, :development)
|
5
9
|
|
6
|
-
RSpec.configure do |conf|
|
7
|
-
|
8
|
-
end
|
10
|
+
# RSpec.configure do |conf|
|
11
|
+
# end
|
9
12
|
|
10
13
|
Rails = Object.new unless defined? Rails
|
@@ -1,7 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require 'dor-workflow-service'
|
3
|
-
require 'equivalent-xml'
|
4
|
-
require 'equivalent-xml/rspec_matchers'
|
1
|
+
require 'spec_helper'
|
5
2
|
|
6
3
|
describe Dor::WorkflowService do
|
7
4
|
|
@@ -91,7 +88,7 @@ describe Dor::WorkflowService do
|
|
91
88
|
it "should update workflow status and return true if successful" do
|
92
89
|
built_xml = "<?xml version=\"1.0\"?>\n<process name=\"reader-approval\" status=\"completed\" elapsed=\"0\" note=\"annotation\" version=\"2\" laneId=\"lane2\"/>\n"
|
93
90
|
expect(@mock_resource).to receive(:put).with(built_xml, { :content_type => 'application/xml' }).and_return('')
|
94
|
-
expect(Dor::WorkflowService.update_workflow_status(@repo, @druid, "etdSubmitWF", "reader-approval", "completed", :version => 2, :note => 'annotation', :lane_id => 'lane2')).to
|
91
|
+
expect(Dor::WorkflowService.update_workflow_status(@repo, @druid, "etdSubmitWF", "reader-approval", "completed", :version => 2, :note => 'annotation', :lane_id => 'lane2')).to be true
|
95
92
|
end
|
96
93
|
|
97
94
|
it "should return false if the PUT to the DOR workflow service throws an exception" do
|
@@ -103,7 +100,7 @@ describe Dor::WorkflowService do
|
|
103
100
|
it "performs a conditional update when current-status is passed as a parameter" do
|
104
101
|
expect(@mock_resource).to receive(:[]).with("dor/objects/druid:123/workflows/etdSubmitWF/reader-approval?current-status=queued")
|
105
102
|
expect(@mock_resource).to receive(:put).with(@xml_re, { :content_type => 'application/xml' }).and_return('')
|
106
|
-
expect(Dor::WorkflowService.update_workflow_status(@repo, @druid, "etdSubmitWF", "reader-approval", "completed", :version => 2, :note => 'annotation', :lane_id => 'lane1', :current_status => 'queued')).to
|
103
|
+
expect(Dor::WorkflowService.update_workflow_status(@repo, @druid, "etdSubmitWF", "reader-approval", "completed", :version => 2, :note => 'annotation', :lane_id => 'lane1', :current_status => 'queued')).to be true
|
107
104
|
end
|
108
105
|
end
|
109
106
|
|
@@ -229,7 +226,6 @@ describe Dor::WorkflowService do
|
|
229
226
|
it "creates the URI string with only one completed step passed in as a String" do
|
230
227
|
qualified_waiting = "#{@repository}:#{@workflow}:#{@waiting}"
|
231
228
|
qualified_completed = "#{@repository}:#{@workflow}:#{@completed}"
|
232
|
-
repo2 = "sdr"
|
233
229
|
|
234
230
|
expect(@mock_resource).to receive(:[]).with("workflow_queue?waiting=#{qualified_waiting}&completed=#{qualified_completed}&lane-id=default")
|
235
231
|
expect(@mock_resource).to receive(:get).and_return(%{<objects count="1"><object id="druid:ab123de4567"/></objects>})
|
@@ -356,7 +352,7 @@ describe Dor::WorkflowService do
|
|
356
352
|
expect(@mock_resource).to receive(:[]).with("workflow_queue/lane_ids?step=dor:accessionWF:shelve")
|
357
353
|
expect(@mock_resource).to receive(:get).and_return(xml)
|
358
354
|
|
359
|
-
expect(Dor::WorkflowService.get_lane_ids('dor', 'accessionWF', 'shelve')).to eq(
|
355
|
+
expect(Dor::WorkflowService.get_lane_ids('dor', 'accessionWF', 'shelve')).to eq(%w(lane1 lane2))
|
360
356
|
end
|
361
357
|
end
|
362
358
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-workflow-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.6
|
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: 2015-
|
12
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: 3.2.1
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: '5'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: 3.2.1
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '5'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: nokogiri
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,16 +63,22 @@ dependencies:
|
|
63
63
|
name: confstruct
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.2.7
|
69
|
+
- - "<"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '2'
|
69
72
|
type: :runtime
|
70
73
|
prerelease: false
|
71
74
|
version_requirements: !ruby/object:Gem::Requirement
|
72
75
|
requirements:
|
73
|
-
- - "
|
76
|
+
- - ">="
|
74
77
|
- !ruby/object:Gem::Version
|
75
78
|
version: 0.2.7
|
79
|
+
- - "<"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2'
|
76
82
|
- !ruby/object:Gem::Dependency
|
77
83
|
name: rake
|
78
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,16 +97,16 @@ dependencies:
|
|
91
97
|
name: rspec
|
92
98
|
requirement: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
|
-
- - "
|
100
|
+
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
102
|
+
version: '3.3'
|
97
103
|
type: :development
|
98
104
|
prerelease: false
|
99
105
|
version_requirements: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
|
-
- - "
|
107
|
+
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
109
|
+
version: '3.3'
|
104
110
|
- !ruby/object:Gem::Dependency
|
105
111
|
name: yard
|
106
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,6 +159,8 @@ extra_rdoc_files: []
|
|
153
159
|
files:
|
154
160
|
- ".gitignore"
|
155
161
|
- ".rspec"
|
162
|
+
- ".rubocop.yml"
|
163
|
+
- ".rubocop_todo.yml"
|
156
164
|
- ".travis.yml"
|
157
165
|
- ".yardopts"
|
158
166
|
- Gemfile
|
@@ -161,6 +169,8 @@ files:
|
|
161
169
|
- Rakefile
|
162
170
|
- bin/console
|
163
171
|
- dor-workflow-service.gemspec
|
172
|
+
- gemfiles/rails3.gemfile
|
173
|
+
- gemfiles/rails4.gemfile
|
164
174
|
- lib/dor-workflow-service.rb
|
165
175
|
- lib/dor/services/workflow_service.rb
|
166
176
|
- lib/dor/workflow_version.rb
|
@@ -185,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
195
|
version: '0'
|
186
196
|
requirements: []
|
187
197
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.2.2
|
189
199
|
signing_key:
|
190
200
|
specification_version: 4
|
191
201
|
summary: Provides convenience methods to work with the DOR Workflow Service
|