lyber-core 9.0.1 → 9.1.1
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 +4 -4
- data/README.md +5 -0
- data/lib/lyber_core/robot.rb +12 -0
- data/lib/lyber_core/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53169df32c581350c038edfb364cb984db1efc38c07fdf9a020c5bafd1561754
|
|
4
|
+
data.tar.gz: 353e2d384a91f276b14938894e5dd35c9623bc2401c1f7d27f85daf86b212a18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5a9c9a61886c6fd6964d5e434f369554a9a612c38446d6f3487ac74523ff5524eee98096c0a0938913e29b8c9b061844879c101ba3bdab3a4a3f9a58ea604cd
|
|
7
|
+
data.tar.gz: 0bf7528fb4707261665a959d67c68b0aa7c5d1be632c4ff5fcaeec0f278120e060419f6cb3fef1faec5b3498e62f4d34fc750bc02f8c110e4c7ff551c92e939b
|
data/README.md
CHANGED
|
@@ -82,6 +82,8 @@ module Robots
|
|
|
82
82
|
end
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
A robot that closes the object's version (e.g., the last step of an assembly workflow) should call `close_version` rather than `object_client.version.close`. It passes the workflow's lane and the user version mode from the workflow context (`userVersions`, e.g., set by Argo), so accessioning keeps the deposit's lane and the user's choice of user version. Params passed to `close_version` override these.
|
|
86
|
+
|
|
85
87
|
## Robot Environment Setup
|
|
86
88
|
|
|
87
89
|
Create a `config/boot.rb` containing:
|
|
@@ -126,6 +128,9 @@ The following environment variables can optionally be set:
|
|
|
126
128
|
* ROBOT_LOG_LEVEL
|
|
127
129
|
|
|
128
130
|
## Robot Testing
|
|
131
|
+
|
|
132
|
+
Use Ruby 4.0.7 for development and testing.
|
|
133
|
+
|
|
129
134
|
Include the following in `rspec/spec_helper.rb`:
|
|
130
135
|
```
|
|
131
136
|
ENV['ROBOT_ENVIRONMENT'] = 'test'
|
data/lib/lyber_core/robot.rb
CHANGED
|
@@ -48,6 +48,18 @@ module LyberCore
|
|
|
48
48
|
@druid_object ||= DruidTools::Druid.new(druid, Settings.stacks.local_workspace_root)
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
# The workflow context key that holds the user version mode (none, new, update, or update_if_existing) for
|
|
52
|
+
# closing the version, e.g., set by Argo when starting the assembly workflow.
|
|
53
|
+
USER_VERSIONS_CONTEXT_KEY = 'userVersions'
|
|
54
|
+
|
|
55
|
+
# Closes the object's version, which by default starts accessionWF.
|
|
56
|
+
# Accessioning uses this workflow's lane, and closing uses the user version mode from the workflow context, if
|
|
57
|
+
# any; otherwise DSA's defaults apply.
|
|
58
|
+
# @param params [Hash] other params for closing, which override these (see Dor::Services::Client::ObjectVersion#close)
|
|
59
|
+
def close_version(**params)
|
|
60
|
+
object_client.version.close(lane_id:, user_versions: workflow.context[USER_VERSIONS_CONTEXT_KEY], **params)
|
|
61
|
+
end
|
|
62
|
+
|
|
51
63
|
# Sets up logging, timing and error handling of the job
|
|
52
64
|
# Calls the #perform_work method, then sets workflow to 'completed' or 'error' depending on success
|
|
53
65
|
# rubocop:disable Metrics/AbcSize
|
data/lib/lyber_core/version.rb
CHANGED
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: 9.
|
|
4
|
+
version: 9.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alpana Pande
|
|
@@ -31,6 +31,20 @@ dependencies:
|
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
|
+
- !ruby/object:Gem::Dependency
|
|
35
|
+
name: benchmark
|
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
type: :runtime
|
|
42
|
+
prerelease: false
|
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
34
48
|
- !ruby/object:Gem::Dependency
|
|
35
49
|
name: config
|
|
36
50
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -265,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
265
279
|
- !ruby/object:Gem::Version
|
|
266
280
|
version: 1.3.6
|
|
267
281
|
requirements: []
|
|
268
|
-
rubygems_version: 4.0.
|
|
282
|
+
rubygems_version: 4.0.20
|
|
269
283
|
specification_version: 4
|
|
270
284
|
summary: Core services used by the SUL Digital Library
|
|
271
285
|
test_files: []
|