sdr-client 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sdr_client/deposit.rb +2 -0
- data/lib/sdr_client/deposit/request.rb +11 -2
- data/lib/sdr_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21747acf342863a0778d124203f23e7857337d67f2e646e24e758d2650ce4da9
|
4
|
+
data.tar.gz: 80bf83d4511cb5e62bdda45511ec5f0ce970d4846162242ba73d0f4df19afde8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732e33520bec07bfbc78af0a0a904396d021be4821bccc1dde7b2bdcd7cf109e38f69cecf99f5ee1d512c02290e832620ae37f0372f358ecdc5533f8377ce022
|
7
|
+
data.tar.gz: 134d5fa2291686a60122be430df385903a2ac50cca830188d932a6b35fa11b67df8bee692e8b49d9d7c726a083abca7cfce065db52ac4eddcef7b7cda261ecbf
|
data/lib/sdr_client/deposit.rb
CHANGED
@@ -12,6 +12,7 @@ module SdrClient
|
|
12
12
|
collection:,
|
13
13
|
catkey: nil,
|
14
14
|
embargo_release_date: nil,
|
15
|
+
embargo_access: 'world',
|
15
16
|
source_id:,
|
16
17
|
url:,
|
17
18
|
files: [],
|
@@ -27,6 +28,7 @@ module SdrClient
|
|
27
28
|
source_id: source_id,
|
28
29
|
catkey: catkey,
|
29
30
|
embargo_release_date: embargo_release_date,
|
31
|
+
embargo_access: embargo_access,
|
30
32
|
files_metadata: files_metadata)
|
31
33
|
Process.new(metadata: metadata, url: url, token: token, files: files,
|
32
34
|
grouping_strategy: grouping_strategy, logger: logger).run
|
@@ -6,6 +6,7 @@ module SdrClient
|
|
6
6
|
class Request
|
7
7
|
# @param [String] label the required object label
|
8
8
|
# @param [Time|nil] embargo_release_date when the item should be released from embargo or nil if no embargo
|
9
|
+
# @param [String] embargo_access access after embargo has expired if embargoed
|
9
10
|
# @param [String] type (http://cocina.sul.stanford.edu/models/object.jsonld) the required object type.
|
10
11
|
# @param [Array<FileSet>] file_sets the file sets to attach.
|
11
12
|
# @param [Hash<String, Hash<String, String>>] files_metadata file name, hash of additional file metadata
|
@@ -17,6 +18,7 @@ module SdrClient
|
|
17
18
|
source_id:,
|
18
19
|
catkey: nil,
|
19
20
|
embargo_release_date: nil,
|
21
|
+
embargo_access: 'world',
|
20
22
|
type: 'http://cocina.sul.stanford.edu/models/object.jsonld',
|
21
23
|
file_sets: [],
|
22
24
|
files_metadata: {})
|
@@ -26,6 +28,7 @@ module SdrClient
|
|
26
28
|
@collection = collection
|
27
29
|
@catkey = catkey
|
28
30
|
@embargo_release_date = embargo_release_date
|
31
|
+
@embargo_access = embargo_access
|
29
32
|
@apo = apo
|
30
33
|
@file_sets = file_sets
|
31
34
|
@files_metadata = files_metadata
|
@@ -52,6 +55,7 @@ module SdrClient
|
|
52
55
|
source_id: source_id,
|
53
56
|
catkey: catkey,
|
54
57
|
embargo_release_date: embargo_release_date,
|
58
|
+
embargo_access: embargo_access,
|
55
59
|
type: type,
|
56
60
|
file_sets: file_sets,
|
57
61
|
files_metadata: files_metadata)
|
@@ -66,7 +70,7 @@ module SdrClient
|
|
66
70
|
private
|
67
71
|
|
68
72
|
attr_reader :label, :file_sets, :source_id, :catkey, :apo, :collection,
|
69
|
-
:type, :files_metadata, :embargo_release_date
|
73
|
+
:type, :files_metadata, :embargo_release_date, :embargo_access
|
70
74
|
|
71
75
|
def administrative
|
72
76
|
{
|
@@ -89,7 +93,12 @@ module SdrClient
|
|
89
93
|
|
90
94
|
def access
|
91
95
|
{}.tap do |json|
|
92
|
-
|
96
|
+
if embargo_release_date
|
97
|
+
json[:embargo] = {
|
98
|
+
releaseDate: embargo_release_date.strftime('%FT%T%:z'),
|
99
|
+
access: embargo_access
|
100
|
+
}
|
101
|
+
end
|
93
102
|
end
|
94
103
|
end
|
95
104
|
end
|
data/lib/sdr_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdr-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-monads
|