sdr-client 0.14.0 → 0.15.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 +4 -4
- data/.rubocop_todo.yml +3 -3
- data/exe/sdr +8 -0
- data/lib/sdr_client/deposit.rb +4 -0
- data/lib/sdr_client/deposit/request.rb +8 -1
- 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: 76c749fe07c1e54f2326bb0ff00b448d0dff1211c7bada06865c1259fa1ccdb7
|
4
|
+
data.tar.gz: 4ae3c617f450a7d6d388522830232a42567dd376e6a6192d942a242f1351e39b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57a774eb99df08439e040198a6b45ce6b37ecad275fb3db8030ca90793ae407183bb514ab907e9d8f54aee4febcaa0a15d62b8cfbb99aa29efd4db071c63265c
|
7
|
+
data.tar.gz: d7dd88626f1ea6c20f3be68cb1b31787aeaf353450952ca7b2e5862e2acaf0f308ec66ce4a7e385c237f5d08ba66d8647fe77fa95dad9e08602382b87f4f0746
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-
|
3
|
+
# on 2020-03-02 15:54:47 -0600 using RuboCop version 0.79.0.
|
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
|
@@ -10,7 +10,7 @@
|
|
10
10
|
Metrics/AbcSize:
|
11
11
|
Max: 16
|
12
12
|
|
13
|
-
# Offense count:
|
13
|
+
# Offense count: 4
|
14
14
|
# Configuration parameters: CountComments, ExcludedMethods.
|
15
15
|
Metrics/MethodLength:
|
16
|
-
Max:
|
16
|
+
Max: 14
|
data/exe/sdr
CHANGED
@@ -70,6 +70,14 @@ subcommands = {
|
|
70
70
|
options[:source_id] = source_id
|
71
71
|
end
|
72
72
|
|
73
|
+
opts.on('--copyright COPYRIGHT', 'The copyright statement') do |copyright|
|
74
|
+
options[:copyright] = copyright
|
75
|
+
end
|
76
|
+
|
77
|
+
opts.on('--use-statement STATEMENT', 'The use and reproduction statement') do |use_statement|
|
78
|
+
options[:use_statement] = use_statement
|
79
|
+
end
|
80
|
+
|
73
81
|
opts.on('--viewing-direction DIRECTION', 'The viewing direction (if a book). ' \
|
74
82
|
'Either "left-to-right" or "right-to-left"') do |viewing_direction|
|
75
83
|
options[:viewing_direction] = viewing_direction if %w[left-to-right right-to-left].include?(viewing_direction)
|
data/lib/sdr_client/deposit.rb
CHANGED
@@ -11,6 +11,8 @@ module SdrClient
|
|
11
11
|
type: 'http://cocina.sul.stanford.edu/models/book.jsonld',
|
12
12
|
viewing_direction: nil,
|
13
13
|
access: 'dark',
|
14
|
+
use_statement: nil,
|
15
|
+
copyright: nil,
|
14
16
|
apo:,
|
15
17
|
collection: nil,
|
16
18
|
catkey: nil,
|
@@ -28,6 +30,8 @@ module SdrClient
|
|
28
30
|
type: type,
|
29
31
|
access: access,
|
30
32
|
apo: apo,
|
33
|
+
use_statement: use_statement,
|
34
|
+
copyright: copyright,
|
31
35
|
collection: collection,
|
32
36
|
source_id: source_id,
|
33
37
|
catkey: catkey,
|
@@ -14,6 +14,8 @@ module SdrClient
|
|
14
14
|
# rubocop:disable Metrics/ParameterLists
|
15
15
|
def initialize(label: nil,
|
16
16
|
access: 'dark',
|
17
|
+
use_statement: nil,
|
18
|
+
copyright: nil,
|
17
19
|
apo:,
|
18
20
|
collection: nil,
|
19
21
|
source_id:,
|
@@ -32,6 +34,8 @@ module SdrClient
|
|
32
34
|
@embargo_release_date = embargo_release_date
|
33
35
|
@embargo_access = embargo_access
|
34
36
|
@access = access
|
37
|
+
@use_statement = use_statement
|
38
|
+
@copyright = copyright
|
35
39
|
@apo = apo
|
36
40
|
@file_sets = file_sets
|
37
41
|
@files_metadata = files_metadata
|
@@ -77,7 +81,7 @@ module SdrClient
|
|
77
81
|
|
78
82
|
attr_reader :access, :label, :file_sets, :source_id, :catkey, :apo, :collection,
|
79
83
|
:type, :files_metadata, :embargo_release_date, :embargo_access,
|
80
|
-
:viewing_direction
|
84
|
+
:viewing_direction, :use_statement, :copyright
|
81
85
|
|
82
86
|
def administrative
|
83
87
|
{
|
@@ -101,6 +105,9 @@ module SdrClient
|
|
101
105
|
|
102
106
|
def access_struct
|
103
107
|
{ access: access }.tap do |json|
|
108
|
+
json[:useAndReproductionStatement] = use_statement if use_statement
|
109
|
+
json[:copyright] = copyright if copyright
|
110
|
+
|
104
111
|
if embargo_release_date
|
105
112
|
json[:embargo] = {
|
106
113
|
releaseDate: embargo_release_date.strftime('%FT%T%:z'),
|
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.15.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-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-monads
|