Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Use Image geom type in ImageWork and MapSet geoblacklight documents (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan authored and tampakis committed Jun 8, 2017
1 parent 21c96a1 commit 19ad198
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gem 'rsolr', '~> 1.1.0'
gem 'devise' , '~> 4.2.0'
gem 'devise-guests', '~> 0.3'
gem 'iiif-presentation', github: 'iiif/osullivan', branch: 'development'
gem 'geo_works', '~> 0.1.1'
gem 'geo_works', '~> 0.1.2'

# PDF generation
gem 'prawn'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ GEM
jquery-rails
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
geo_works (0.1.1)
geo_works (0.1.2)
hyrax (>= 1.0.1, < 2.0)
jquery-ui-rails (~> 5.0.5)
json-schema (>= 2.6.2)
Expand Down Expand Up @@ -899,7 +899,7 @@ DEPENDENCIES
factory_girl
fcrepo_wrapper (~> 0.8.0)
flipflop!
geo_works (~> 0.1.1)
geo_works (~> 0.1.2)
grocer!
honeybadger (~> 2.0)
hydra-derivatives (= 3.1.3)
Expand Down
2 changes: 1 addition & 1 deletion app/services/discovery/layer_info_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class LayerInfoBuilder < GeoWorks::Discovery::DocumentBuilder::LayerInfoBuilder

def geom_type
if geo_concern.model_name == 'MapSet'
'Scanned Map'
'Image'
else
super
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/hyrax/map_sets_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
response_json = JSON.parse(response.body)
references = JSON.parse(response_json['dct_references_s'])
expect(response_json['dc_format_s']).to eq 'TIFF'
expect(response_json['layer_geom_type_s']).to eq 'Scanned Map'
expect(response_json['layer_geom_type_s']).to eq 'Image'
expect(references).to include('http://iiif.io/api/presentation#manifest')
expect(references).to include('http://schema.org/thumbnailUrl')
end
Expand Down
2 changes: 2 additions & 0 deletions spec/services/discovery/geoblacklight_document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
expect(refs).to have_key 'http://iiif.io/api/image'
expect(refs).to have_key 'http://iiif.io/api/presentation#manifest'
expect(document[:dc_rights_s]).to eq 'Public'
expect(document[:layer_geom_type_s]).to eq 'Image'
end
end

Expand Down Expand Up @@ -113,6 +114,7 @@
refs = JSON.parse(document[:dct_references_s])
expect(document[:suppressed_b]).to be_nil
expect(document[:dct_source_sm]).to be_nil
expect(document[:layer_geom_type_s]).to eq 'Image'
expect(refs).to have_key 'http://iiif.io/api/presentation#manifest'
expect(refs).to have_key 'http://iiif.io/api/image'
end
Expand Down

0 comments on commit 19ad198

Please sign in to comment.