Skip to content

Commit

Permalink
Merge pull request #586 from sul-dlss/prune
Browse files Browse the repository at this point in the history
Prune dead code
  • Loading branch information
justinlittman committed Dec 17, 2019
2 parents ed170b9 + 44e7d3c commit e5091a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
18 changes: 0 additions & 18 deletions app/services/discovery_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@ def process_dobj(dobj)
ObjectFileValidator.new(object: dobj, bundle: bundle).validate
end

# @param [DruidTools]
# @return [Hash<Symbol => Boolean>] errors
def registration_check(druid)
begin
obj = Dor::Item.find(druid.druid)
rescue ActiveFedora::ObjectNotFoundError
return { item_not_registered: true }
end
begin
return { apo_empty: true } unless obj.admin_policy_object
{}
rescue ActiveFedora::ObjectNotFoundError
return { apo_not_registered: true }
end
rescue RuntimeError # HTTP timeout, network error, whatever
{ dor_connection_error: true }
end

# @return [Boolean]
def using_media_manifest?
content_md_creation == 'media_cm_style' && File.exist?(File.join(bundle_dir, bundle.bundle_context.media_manifest))
Expand Down
1 change: 0 additions & 1 deletion spec/services/discovery_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
before do
allow(dobj).to receive(:pid).and_return('kk203bw3276')
allow(Dor::Item).to receive(:find).and_return(instance_double(Dor::Item, admin_policy_object: ''))
allow(report).to receive(:registration_check).and_return({}) # pretend everything is in Dor
end

it 'process_dobj gives expected output for one dobj' do
Expand Down

0 comments on commit e5091a1

Please sign in to comment.