sdr-client 0.67.0 → 0.67.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6f0cbe88719cea674e5568bc60da33b77819904cc062995161c5eb6443a4f07
4
- data.tar.gz: d4dc7e51ac117cc54e0c9d988f0d482c836d090bad2c5c46c4941150eb845478
3
+ metadata.gz: e08558986780410f688c1c5f19396dd7a55065281ec47e5e1c2f4f5a09d64618
4
+ data.tar.gz: 0a6f0a072b0543de5ba731552340d52b8bd2dcc9414be96ee69f5709aa496471
5
5
  SHA512:
6
- metadata.gz: cb349532c8a777f077e2f8bf22430b0777938447f60862a273e10b5cb09430ef6dabaa17b2c5f46a792ac8ea5a3671ec0d977c3c4e8dab0820181d9b9f3245d6
7
- data.tar.gz: e846f06d0202c1272e4d82e2622bd02d8fee61f2df40d7c5d5477bd0f373e92fc2828053bede2b391b558bb00b1941cb5ebd55cfdbaa18256facb130d099a4c2
6
+ metadata.gz: 5e4f1efe21eaf7938d0a6533d5de35f5a31bbd470a14120036c6991ebdaf3d17885e958861191e49c9f4548d7e61be840e2e94fd1957594515ff19af439b5f4c
7
+ data.tar.gz: 648509578100d2728172a1644ba8dcc3e60e4489cc82860fca33264d9bbb037e2f8b6699a1b351f87eb87697c330899b19190746c16c611dc05ffeb1aac8f7a4
@@ -10,6 +10,7 @@ module SdrClient
10
10
  # @param [Class] grouping_strategy class whose run method groups an array of uploads
11
11
  # Additional metadata includes access, preserve, shelve, publish, md5, sha1
12
12
  # @param [Logger] logger the logger to use
13
+ # @param [Class] file_set_type_strategy class whose run method determines file_set type
13
14
  def initialize(metadata:, grouping_strategy:, logger:, file_set_type_strategy: FileTypeFileSetStrategy)
14
15
  @metadata = metadata
15
16
  @logger = logger
@@ -10,6 +10,7 @@ module SdrClient
10
10
  # @param [String] connection the server connection to use
11
11
  # @param [Boolean] accession should the accessionWF be started
12
12
  # @param [Class] grouping_strategy class whose run method groups an array of uploads
13
+ # @param [Class] file_set_type_strategy class whose run method determines file_set type
13
14
  # @param [Array<String>] files a list of file names to upload
14
15
  # @param [Boolean] assign_doi should a DOI be assigned to this item
15
16
  # @param [Logger] logger the logger to use
@@ -19,6 +20,7 @@ module SdrClient
19
20
  connection:,
20
21
  accession:,
21
22
  grouping_strategy: SingleFileGroupingStrategy,
23
+ file_set_type_strategy: FileTypeFileSetStrategy,
22
24
  files: [],
23
25
  assign_doi: false,
24
26
  logger: Logger.new($stdout))
@@ -27,6 +29,7 @@ module SdrClient
27
29
  @metadata = metadata
28
30
  @logger = logger
29
31
  @grouping_strategy = grouping_strategy
32
+ @file_set_type_strategy = file_set_type_strategy
30
33
  @accession = accession
31
34
  @assign_doi = assign_doi
32
35
  end
@@ -43,6 +46,7 @@ module SdrClient
43
46
  connection: connection)
44
47
  metadata_builder = MetadataBuilder.new(metadata: metadata,
45
48
  grouping_strategy: grouping_strategy,
49
+ file_set_type_strategy: file_set_type_strategy,
46
50
  logger: logger)
47
51
  request = metadata_builder.with_uploads(upload_responses)
48
52
  model = Cocina::Models.build_request(request.as_json.with_indifferent_access)
@@ -56,7 +60,7 @@ module SdrClient
56
60
 
57
61
  private
58
62
 
59
- attr_reader :metadata, :files, :connection, :logger, :grouping_strategy
63
+ attr_reader :metadata, :files, :connection, :logger, :grouping_strategy, :file_set_type_strategy
60
64
 
61
65
  def check_files_exist
62
66
  logger.info('checking to see if files exist')
@@ -28,6 +28,7 @@ module SdrClient
28
28
  files_metadata: {},
29
29
  accession: false,
30
30
  grouping_strategy: SingleFileGroupingStrategy,
31
+ file_set_type_strategy: FileTypeFileSetStrategy,
31
32
  logger: Logger.new($stdout))
32
33
  augmented_metadata = FileMetadataBuilder.build(files: files, files_metadata: files_metadata)
33
34
  metadata = Request.new(label: label,
@@ -48,6 +49,7 @@ module SdrClient
48
49
  connection = Connection.new(url: url)
49
50
  Process.new(metadata: metadata, connection: connection, files: files,
50
51
  grouping_strategy: grouping_strategy,
52
+ file_set_type_strategy: file_set_type_strategy,
51
53
  accession: accession,
52
54
  logger: logger).run
53
55
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrClient
4
- VERSION = '0.67.0'
4
+ VERSION = '0.67.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdr-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.67.0
4
+ version: 0.67.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne