Skip to content

Commit

Permalink
Merge pull request #514 from sul-dlss/smpl-to-media
Browse files Browse the repository at this point in the history
Changed SMPL option for content structure and content metadata creation
  • Loading branch information
ndushay committed Aug 12, 2019
2 parents 7cc03fb + a74687a commit d64acbb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/bundle_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def verify_bundle_directory
return errors.add(:bundle_dir, "'#{bundle_dir}' not found.") unless File.directory?(bundle_dir)
errors.add(:bundle_dir, "missing manifest: #{bundle_dir}/#{manifest}") unless File.exist?(File.join(bundle_dir, manifest))
return unless smpl_cm_style? # only smpl objects require smpl_manifest.csv
errors.add(:bundle_dir, "missing SMPL manifest: #{bundle_dir}/#{smpl_manifest}") unless File.exist?(File.join(bundle_dir, smpl_manifest))
errors.add(:bundle_dir, "missing Media (SMPL) manifest: #{bundle_dir}/#{smpl_manifest}") unless File.exist?(File.join(bundle_dir, smpl_manifest))
end

def verify_bundle_dir_path
Expand Down
4 changes: 2 additions & 2 deletions app/views/bundle_contexts/_new_bc_form.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
['Simple Book', 'simple_book'],
['Book as Image','book_as_image'],
['File', 'file'],
['SMPL', 'smpl']
['Media', 'smpl']
]
%>
</div>
Expand All @@ -52,7 +52,7 @@
[
["Default", "default"],
["Filename", "filename"],
["SMPL", "smpl_cm_style"]
["Media", "smpl_cm_style"]
]
%>
</div>
Expand Down
2 changes: 1 addition & 1 deletion spec/models/bundle_context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
it 'adds error if spml object is missing smpl_manifest.csv' do
allow(bc).to receive(:smpl_cm_style?).and_return(true)
bc.send(:verify_bundle_directory)
expect(bc.errors.to_h).to include(bundle_dir: /missing SMPL manifest/)
expect(bc.errors.to_h).to include(bundle_dir: /missing Media \(SMPL\) manifest/)
end
end
end

0 comments on commit d64acbb

Please sign in to comment.