Skip to content

Commit

Permalink
Merge a7f2b2e into 32cf089
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Mar 16, 2021
2 parents 32cf089 + a7f2b2e commit 9027f16
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/lib/pre_assembly/digital_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def content_md_creation_style
Cocina::Models::Vocab.object => :file,
Cocina::Models::Vocab.book => :simple_book,
Cocina::Models::Vocab.manuscript => :simple_book,
Cocina::Models::Vocab.document => :document,
Cocina::Models::Vocab.map => :map,
Cocina::Models::Vocab.three_dimensional => :'3d'
Cocina::Models::Vocab.three_dimensional => :'3d',
Cocina::Models::Vocab.webarchive_seed => :'webarchive-seed'
}.fetch(object_type, content_structure.to_sym)
end

Expand Down
4 changes: 3 additions & 1 deletion app/models/batch_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class BatchContext < ApplicationRecord
'file' => 3,
'media' => 4,
'3d' => 5,
'document' => 6
'document' => 6,
'maps' => 7,
'webarchive_seed' => 8
}

enum content_metadata_creation: {
Expand Down
2 changes: 2 additions & 0 deletions app/views/batch_contexts/_new_bc_form.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
['File', 'file'],
['Media', 'media'],
['3D', '3d'],
['Map', 'maps'],
['Webarchive seed', 'webarchive_seed']
]
%>
Expand Down
2 changes: 1 addition & 1 deletion spec/features/dark_file_object_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:bare_druid) { 'tx666tx9999' }
let(:object_staging_dir) { Rails.root.join(Settings.assembly_staging_dir, 'tx', '666', 'tx', '9999', bare_druid) }
let(:cocina_model_dark_access) { instance_double(Cocina::Models::Access, access: 'dark') }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.media, access: cocina_model_dark_access) }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.object, access: cocina_model_dark_access) }
let(:dsc_object_version) { instance_double(Dor::Services::Client::ObjectVersion, openable?: true) }
let(:dsc_object) { instance_double(Dor::Services::Client::Object, version: dsc_object_version, find: item) }
let(:exp_content_md) do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:bare_druid) { 'pr666rr9999' }
let(:object_staging_dir) { Rails.root.join(Settings.assembly_staging_dir, 'pr', '666', 'rr', '9999', bare_druid) }
let(:cocina_model_world_access) { instance_double(Cocina::Models::Access, access: 'world') }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.media, access: cocina_model_world_access) }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.document, access: cocina_model_world_access) }
let(:dsc_object_version) { instance_double(Dor::Services::Client::ObjectVersion, openable?: true) }
let(:dsc_object) { instance_double(Dor::Services::Client::Object, version: dsc_object_version, find: item) }
let(:exp_content_md) do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:bare_druid) { 'pr666rr9999' }
let(:object_staging_dir) { Rails.root.join(Settings.assembly_staging_dir, 'pr', '666', 'rr', '9999', bare_druid) }
let(:cocina_model_world_access) { instance_double(Cocina::Models::Access, access: 'world') }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.media, access: cocina_model_world_access) }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.image, access: cocina_model_world_access) }
let(:dsc_object_version) { instance_double(Dor::Services::Client::ObjectVersion, openable?: true) }
let(:dsc_object) { instance_double(Dor::Services::Client::Object, version: dsc_object_version, find: item) }
let(:exp_content_md) do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/public_tif_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:bare_druid) { 'tf111tf2222' }
let(:object_staging_dir) { Rails.root.join(Settings.assembly_staging_dir, 'tf', '111', 'tf', '2222', bare_druid) }
let(:cocina_model_world_access) { instance_double(Cocina::Models::Access, access: 'world') }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.media, access: cocina_model_world_access) }
let(:item) { instance_double(Cocina::Models::DRO, type: Cocina::Models::Vocab.image, access: cocina_model_world_access) }
let(:dsc_object_version) { instance_double(Dor::Services::Client::ObjectVersion, openable?: true) }
let(:dsc_object) { instance_double(Dor::Services::Client::Object, version: dsc_object_version, find: item) }
let(:exp_content_md) do
Expand Down
4 changes: 3 additions & 1 deletion spec/models/batch_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
'file' => 3,
'media' => 4,
'3d' => 5,
'document' => 6
'document' => 6,
'maps' => 7,
'webarchive_seed' => 8
)
end

Expand Down

0 comments on commit 9027f16

Please sign in to comment.