lib/sdr_client/deposit.rb in sdr-client-0.4.0 vs lib/sdr_client/deposit.rb in sdr-client-0.5.0
- old
+ new
@@ -1,30 +1,35 @@
# frozen_string_literal: true
module SdrClient
# The namespace for the "deposit" command
module Deposit
+ # rubocop:disable Metrics/ParameterLists
def self.run(label: nil,
type: 'http://cocina.sul.stanford.edu/models/book.jsonld',
apo:,
collection:,
catkey: nil,
source_id:,
- url:, files: [])
+ url:,
+ files: [],
+ grouping_strategy: SingleFileGroupingStrategy)
token = Credentials.read
metadata = Request.new(label: label,
type: type,
apo: apo,
collection: collection,
source_id: source_id,
catkey: catkey)
- Process.new(metadata: metadata, url: url, token: token, files: files).run
+ Process.new(metadata: metadata, url: url, token: token, files: files, grouping_strategy: grouping_strategy).run
end
+ # rubocop:enable Metrics/ParameterLists
end
end
require 'json'
-require 'sdr_client/deposit/default_file_set_builder'
+require 'sdr_client/deposit/single_file_grouping_strategy'
+require 'sdr_client/deposit/matching_file_grouping_strategy'
require 'sdr_client/deposit/files/direct_upload_request'
require 'sdr_client/deposit/files/direct_upload_response'
require 'sdr_client/deposit/file'
require 'sdr_client/deposit/file_set'
require 'sdr_client/deposit/request'