Skip to content

Commit

Permalink
little cleanup opportunities (one noticed by rubocop, one by me while…
Browse files Browse the repository at this point in the history
… fixing up a spec, one by me while testing readme changes)
  • Loading branch information
jmartin-sul committed Jan 15, 2020
1 parent 35b207d commit 54d2f41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Parameters:
* druid[] (repeatable): druid for the object

```
curl -H 'Authorization: Bearer eyJhbGcxxxxx.eyJzdWIxxxxx.lWMJ66Wxx-xx' "https://preservation-catalog-prod-01.stanford.edu/v1/objects/checksums?druids[]=druid:bb000kg4251&druids[]=druid:bb000kq3835"
curl -H 'Authorization: Bearer eyJhbGcxxxxx.eyJzdWIxxxxx.lWMJ66Wxx-xx' "https://preservation-catalog-prod-01.stanford.edu/v1/objects/checksums?druids\[\]=druid:bb000kg4251&druids\[\]=druid:bb000kq3835"
[
{
"druid:bb000kg4251": [
Expand Down
8 changes: 3 additions & 5 deletions app/controllers/objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,9 @@ def generate_checksum_list
checksum_list = []
missing_druids = []
normalized_druids.each do |druid|
begin
checksum_list << { returned_druid(druid) => content_files_checksums(druid) }
rescue Moab::ObjectNotFoundException
missing_druids << druid
end
checksum_list << { returned_druid(druid) => content_files_checksums(druid) }
rescue Moab::ObjectNotFoundException
missing_druids << druid
end
[checksum_list, missing_druids]
end
Expand Down
4 changes: 0 additions & 4 deletions spec/requests/objects_controller_object_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

require 'rails_helper'
RSpec.describe ObjectsController, type: :request do
let(:prefixed_druid) { 'druid:bj102hs9687' }
let(:prefixed_druid2) { 'druid:bz514sm9647' }
let(:bare_druid) { 'bj102hs9687' }
let(:bare_druid2) { 'bz514sm9647' }
let(:pres_obj) { create(:preserved_object) }

describe 'GET #show' do
Expand Down

0 comments on commit 54d2f41

Please sign in to comment.