Skip to content

Commit

Permalink
Merge aad6aec into 4315de8
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 1, 2018
2 parents 4315de8 + aad6aec commit acdea14
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -35,7 +35,7 @@ gem 'net-http-persistent', '~> 2.9'
gem 'marc'

# DLSS/domain-specific dependencies
gem 'dor-services', '~> 5.31'
gem 'dor-services', '~> 6.0'
gem 'lyber-core', '>= 2.0.2'
gem 'workflow-archiver', '~> 2.0'

Expand Down
11 changes: 5 additions & 6 deletions Gemfile.lock
Expand Up @@ -118,10 +118,11 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dor-rights-auth (1.3.0)
nokogiri
dor-services (5.32.1)
dor-services (6.0.1)
active-fedora (>= 7.0, < 9.a)
activesupport (>= 4.2.10, < 6.0.0)
confstruct (~> 0.2.7)
deprecation (~> 0)
dor-rights-auth (~> 1.0, >= 1.2.0)
dor-workflow-service (~> 2.0, >= 2.0.1)
druid-tools (>= 0.4.1)
Expand All @@ -136,7 +137,6 @@ GEM
retries
rsolr (>= 1.0.3, < 3)
ruby-cache (~> 0.3.0)
ruby-graphviz
rubydora (~> 2.1)
solrizer (~> 3.0)
stanford-mods (>= 2.3.1)
Expand Down Expand Up @@ -359,7 +359,6 @@ GEM
rubocop-rspec (1.27.0)
rubocop (>= 0.56.0)
ruby-cache (0.3.0)
ruby-graphviz (1.2.4)
ruby-oci8 (2.2.6.1)
ruby-progressbar (1.10.0)
rubydora (2.1.0)
Expand Down Expand Up @@ -411,7 +410,7 @@ GEM
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.8)
tilt (2.0.9)
tins (1.20.2)
tzinfo (1.2.5)
thread_safe (~> 0.1)
Expand Down Expand Up @@ -450,7 +449,7 @@ DEPENDENCIES
config
coveralls (~> 0.8)
dlss-capistrano
dor-services (~> 5.31)
dor-services (~> 6.0)
equivalent-xml
erubis
faraday
Expand All @@ -477,4 +476,4 @@ DEPENDENCIES
workflow-archiver (~> 2.0)

BUNDLED WITH
1.16.4
1.17.1
2 changes: 1 addition & 1 deletion app/models/dor/service_item.rb
Expand Up @@ -57,7 +57,7 @@ def barcode
# the @id attribute of resource/file elements including extension
# @return [String] thumbnail filename (nil if none found)
def thumb
@thumb ||= @druid_obj.encoded_thumb unless @druid_obj.datastreams.nil?
@thumb ||= ERB::Util.url_encode(ThumbnailService.new(@druid_obj).thumb).presence unless @druid_obj.datastreams.nil?
end

# returns the first collection_id the object is contained in (if any)
Expand Down
4 changes: 2 additions & 2 deletions app/models/dor/update_marc_record_service.rb
Expand Up @@ -68,8 +68,8 @@ def run_write_script(command)

def new_856_record(ckey)
new856 = "#{get_identifier(ckey)}#{get_856_cons} #{get_1st_indicator}#{get_2nd_indicator}#{get_z_field}#{get_u_field}#{get_x1_sdrpurl_marker}#{object_type.prepend('|x')}"
new856 << barcode.prepend('|xbarcode:') unless barcode.nil?
new856 << thumb.prepend('|xfile:') unless thumb.nil?
new856 << "|xbarcode:#{barcode}" unless barcode.nil?
new856 << "|xfile:#{thumb}" unless thumb.nil?
new856 << get_x2_collection_info unless get_x2_collection_info.nil?
new856 << get_x2_constituent_info unless get_x2_constituent_info.nil?
new856 << get_x2_part_info unless get_x2_part_info.nil?
Expand Down
2 changes: 1 addition & 1 deletion spec/dor/service_item_spec.rb
Expand Up @@ -201,7 +201,7 @@
expect(Dor::ServiceItem.new(d).thumb).to eq('bb111bb2222%2Fwt183gy6220_00_0001.jp2')
end

it 'returns an empty string for contentMetadata without thumb' do
it 'returns nil for contentMetadata without thumb' do
druid = 'aa111aa2222'
d = Dor::Item.new(:pid => druid)
content_metadata_ng_xml = Nokogiri::XML(build_content_metadata_2)
Expand Down

0 comments on commit acdea14

Please sign in to comment.