sdr-client 0.49.0 → 0.53.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0291287d0f8239e8dff2f876ab4608ef03cebe93e04c20731e3da781d6be20c
4
- data.tar.gz: f3015072200cf011551491bf8fd6d2f669103c618a096e99ff5b5c512534f028
3
+ metadata.gz: 5de85a5b1c494c32a577da43bb799692c88eada90753c5a261568d4237d6b3b7
4
+ data.tar.gz: f03da32b512c5c6a92f753061fab8ee2d875dd1787008bd5d69cbd18db777fc9
5
5
  SHA512:
6
- metadata.gz: 9f47f107920ad9c0a49de2d0e166b465ea4268c9be67c2f42e4fef5c8824d5ffde8d42f783143782e83569929b23a26f3ebce006785a30b11ee148c712879006
7
- data.tar.gz: c38a01efe4dc857843d1b5b3a7534e8d06ee5860581848b5322bfc482e3f9a82e174ad85533f93721f00eead034575b961d4c6a73be92570ebcaa4635be60311
6
+ metadata.gz: 2ce571c4d6800ffe3a887772fcab1644ad13967527b44c9cac0aa93c393f82d89e20b12d5538475d65dabd9064045b045c38578dc958fdb605fba376d5dd2de8
7
+ data.tar.gz: 4d8b93581b5248db0e1f073f97fc798ff70289774ddc13b35d3b9c01e68e516a3f3982ccd2ad41409af41728736fe6f3fc02ccfe273cd684da731d2c24b2f7e9
data/.rubocop_todo.yml CHANGED
@@ -1,29 +1,23 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-09-08 13:16:08 -0500 using RuboCop version 0.79.0.
3
+ # on 2021-03-12 13:21:16 -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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 2
9
+ # Offense count: 1
10
10
  Metrics/AbcSize:
11
11
  Max: 16
12
12
 
13
- # Offense count: 8
13
+ # Offense count: 9
14
14
  # Configuration parameters: CountComments, ExcludedMethods.
15
15
  Metrics/MethodLength:
16
16
  Max: 15
17
17
 
18
- # Offense count: 1
19
- # Cop supports --auto-correct.
20
- Style/IfUnlessModifier:
21
- Exclude:
22
- - 'exe/sdr'
23
-
24
- # Offense count: 188
18
+ # Offense count: 231
25
19
  # Cop supports --auto-correct.
26
20
  # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
27
21
  # URISchemes: http, https
28
22
  Layout/LineLength:
29
- Max: 1230
23
+ Max: 132
data/README.md CHANGED
@@ -49,5 +49,5 @@ sdr --service-url https://sdr-api-server:3000 deposit --label 'hey there' \
49
49
  View the object:
50
50
  ```
51
51
  sdr --service-url https://sdr-api-server:3000 get druid:bw581ng3176
52
- {"type":"http://cocina.sul.stanford.edu/models/document.jsonld","externalIdentifier":"druid:bw581ng3176","label":"Something something better title","version":1,"access":{"access":"stanford","copyright":"This work is copyrighted by the creator.","download":"stanford","useAndReproductionStatement":"This document is available only to the Stanford faculty, staff and student community."},"administrative":{"hasAdminPolicy":"druid:zx485kb6348"},"description":{"title":[{"value":"Something something better title"}],"contributor":[{"name":[{"value":"Hodge, Amy"}],"type":"person","role":[{"value":"Author"},{"value":"author","uri":"http://id.loc.gov/vocabulary/relators/aut","source":{"code":"marcrelator","uri":"http://id.loc.gov/vocabulary/relators/"}},{"value":"Creator"}]}],"form":[{"structuredValue":[{"value":"Text","type":"type"},{"value":"Report","type":"subtype"}],"type":"resource type","source":{"value":"Stanford self-deposit resource types"}},{"value":"reports","type":"genre","uri":"http://vocab.getty.edu/aat/300027267","source":{"code":"aat"}},{"value":"text","type":"resource type","source":{"value":"MODS resource types"}}],"note":[{"value":";alkdfjlsadkjf;l","type":"summary"},{"value":"amyhodge@stanford.edu","type":"contact","displayLabel":"Contact"}],"subject":[{"value":"lkfj","type":"topic"},{"value":";kfj","type":"topic"},{"value":"fjwelkb","type":"topic"}]},"identification":{"sourceId":"hydrus:20"},"structural":{"contains":[{"type":"http://cocina.sul.stanford.edu/models/fileset.jsonld","externalIdentifier":"bw581ng3176_1","label":"Test file","version":1,"structural":{"contains":[{"type":"http://cocina.sul.stanford.edu/models/file.jsonld","externalIdentifier":"druid:bw581ng3176/test.txt","label":"test.txt","filename":"test.txt","size":11,"version":1,"hasMimeType":"text/plain","hasMessageDigests":[{"type":"sha1","digest":"5d39343e4bb48abd97f759828282f5ebbac56c5e"},{"type":"md5","digest":"63b8812b0c05722a9d6c51cbd2bfb54b"}],"access":{"access":"world","download":"world"},"administrative":{"sdrPreserve":true,"shelve":true}}]}}]}}
52
+ {"type":"http://cocina.sul.stanford.edu/models/document.jsonld","externalIdentifier":"druid:bw581ng3176","label":"Something something better title","version":1,"access":{"access":"stanford","copyright":"This work is copyrighted by the creator.","download":"stanford","useAndReproductionStatement":"This document is available only to the Stanford faculty, staff and student community."},"administrative":{"hasAdminPolicy":"druid:zx485kb6348"},"description":{"title":[{"value":"Something something better title"}],"contributor":[{"name":[{"value":"Hodge, Amy"}],"type":"person","role":[{"value":"Author"},{"value":"author","uri":"http://id.loc.gov/vocabulary/relators/aut","source":{"code":"marcrelator","uri":"http://id.loc.gov/vocabulary/relators/"}},{"value":"Creator"}]}],"form":[{"structuredValue":[{"value":"Text","type":"type"},{"value":"Report","type":"subtype"}],"type":"resource type","source":{"value":"Stanford self-deposit resource types"}},{"value":"reports","type":"genre","uri":"http://vocab.getty.edu/aat/300027267","source":{"code":"aat"}},{"value":"text","type":"resource type","source":{"value":"MODS resource types"}}],"note":[{"value":";alkdfjlsadkjf;l","type":"summary"},{"value":"amyhodge@stanford.edu","type":"contact","displayLabel":"Contact"}],"subject":[{"value":"lkfj","type":"topic"},{"value":";kfj","type":"topic"},{"value":"fjwelkb","type":"topic"}]},"identification":{"sourceId":"hydrus:20"},"structural":{"contains":[{"type":"http://cocina.sul.stanford.edu/models/resources/file.jsonld","externalIdentifier":"bw581ng3176_1","label":"Test file","version":1,"structural":{"contains":[{"type":"http://cocina.sul.stanford.edu/models/file.jsonld","externalIdentifier":"druid:bw581ng3176/test.txt","label":"test.txt","filename":"test.txt","size":11,"version":1,"hasMimeType":"text/plain","hasMessageDigests":[{"type":"sha1","digest":"5d39343e4bb48abd97f759828282f5ebbac56c5e"},{"type":"md5","digest":"63b8812b0c05722a9d6c51cbd2bfb54b"}],"access":{"access":"world","download":"world"},"administrative":{"sdrPreserve":true,"shelve":true}}]}}]}}
53
53
  ```
@@ -7,13 +7,15 @@ module SdrClient
7
7
  # rubocop:disable Metrics/ParameterLists
8
8
  def initialize(external_identifier:, label:, filename:,
9
9
  access: 'world', preserve: true, shelve: true,
10
- mime_type: nil, md5: nil, sha1: nil, use: nil)
10
+ publish: true, mime_type: nil, md5: nil, sha1: nil,
11
+ use: nil)
11
12
  @external_identifier = external_identifier
12
13
  @label = label
13
14
  @filename = filename
14
15
  @access = access
15
16
  @preserve = preserve
16
17
  @shelve = shelve
18
+ @publish = publish
17
19
  @mime_type = mime_type
18
20
  @md5 = md5
19
21
  @sha1 = sha1
@@ -33,7 +35,8 @@ module SdrClient
33
35
  },
34
36
  administrative: {
35
37
  sdrPreserve: @preserve,
36
- shelve: @shelve
38
+ shelve: @shelve,
39
+ publish: @publish
37
40
  },
38
41
  version: 1,
39
42
  hasMessageDigests: message_digests
@@ -21,7 +21,7 @@ module SdrClient
21
21
 
22
22
  def as_json
23
23
  {
24
- "type": 'http://cocina.sul.stanford.edu/models/fileset.jsonld',
24
+ "type": 'http://cocina.sul.stanford.edu/models/resources/file.jsonld',
25
25
  "label": label,
26
26
  structural: {
27
27
  contains: files.map(&:as_json)
@@ -8,7 +8,7 @@ module SdrClient
8
8
  class MetadataBuilder
9
9
  # @param [Request] metadata information about the object
10
10
  # @param [Class] grouping_strategy class whose run method groups an array of uploads
11
- # Additional metadata includes access, preserve, shelve, md5, sha1
11
+ # Additional metadata includes access, preserve, shelve, publish, md5, sha1
12
12
  # @param [Logger] logger the logger to use
13
13
  def initialize(metadata:, grouping_strategy:, logger:)
14
14
  @metadata = metadata
@@ -10,7 +10,7 @@ module SdrClient
10
10
  # @param [String] type (http://cocina.sul.stanford.edu/models/object.jsonld) the required object type.
11
11
  # @param [Array<FileSet>] file_sets the file sets to attach.
12
12
  # @param [Hash<String, Hash<String, String>>] files_metadata file name, hash of additional file metadata
13
- # Additional metadata includes access, preserve, shelve, md5, sha1
13
+ # Additional metadata includes access, preserve, shelve, publish, md5, sha1
14
14
  # rubocop:disable Metrics/ParameterLists
15
15
  def initialize(label: nil,
16
16
  access: 'dark',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrClient
4
- VERSION = '0.49.0'
4
+ VERSION = '0.53.0'
5
5
  end
data/sdr-client.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ['lib']
29
29
 
30
30
  spec.add_dependency 'activesupport'
31
- spec.add_dependency 'cocina-models', '~> 0.52.0'
31
+ spec.add_dependency 'cocina-models', '~> 0.56.0'
32
32
  spec.add_dependency 'dry-monads'
33
33
  spec.add_dependency 'faraday', '>= 0.16'
34
34
 
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.49.0
4
+ version: 0.53.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: 2021-03-04 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.52.0
33
+ version: 0.56.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.52.0
40
+ version: 0.56.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-monads
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.1.2
242
+ rubygems_version: 3.0.3
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: The CLI for https://github.com/sul-dlss/sdr-api