blacklight-spotlight 0.33.0 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7c69b50a875632bd6a6ae219dfc690711842fb4
4
- data.tar.gz: ca0be34e748aaa13607f622de0044fe2d9150503
3
+ metadata.gz: 78348ea18057199e2df65dd4f77a17565870de28
4
+ data.tar.gz: e05ebfa153e5d460fc98a5b693b35c58f486de5d
5
5
  SHA512:
6
- metadata.gz: e59f8cde4f002e6bd2ae7c66530692e5ece3d34ac77ede0db11b9a66965683be4d6a9dd0cd7335ea824c328689e264a715f1f1f952639c9d3f1c6ae5d1e367b5
7
- data.tar.gz: 40744c5a1dbf53d783feb0ba7a038b8b6373082762b3c207a965dc3b4381c017c49de43a434e9fec9cffae04fa6ed25ab73bccd944ed1f9454cb7baf8744f10b
6
+ metadata.gz: 99f7d04d673f41e1d635e1d79aa44e5ee13a2012c61c6d9e9119d99ce0c9f78a14ada590d674322c782f47d1b55d3d14fe9dfc6df581e0c0143accb6de4befc5
7
+ data.tar.gz: c09d5b011c13f56d88093c82dca782f70e970b8b6c45e6b6990666762ec789359c716f9f57c141ef06f496eef605dfbe9ff729a329f2474f1e437b51f3a19f97
@@ -73,7 +73,7 @@ module Spotlight
73
73
 
74
74
  def iiif_url
75
75
  # yes this is hacky, and we are appropriately ashamed.
76
- controller.riiif.info_url.sub(%r{/info\.json\Z}, '')
76
+ controller.riiif.info_url(uploaded_resource.upload.id).sub(%r{/info\.json\Z}, '')
77
77
  end
78
78
  end
79
79
  end
@@ -1,3 +1,3 @@
1
1
  module Spotlight
2
- VERSION = '0.33.0'.freeze
2
+ VERSION = '0.33.1'.freeze
3
3
  end
@@ -1,13 +1,18 @@
1
1
  describe Spotlight::IiifManifestPresenter do
2
2
  require 'iiif_manifest'
3
3
 
4
- let(:resource) { FactoryGirl.build(:uploaded_resource) }
4
+ let(:resource) { SolrDocument.new(id: '1-1') }
5
+ let(:uploaded_resource) { FactoryGirl.build(:uploaded_resource) }
5
6
  let(:controller) { double(Spotlight::CatalogController) }
6
7
 
7
8
  let(:subject) { described_class.new(resource, controller) }
8
9
 
9
10
  let(:profile_url) { 'http://iiif.io/api/image/2/level2.json' }
10
11
 
12
+ before do
13
+ allow(resource).to receive(:uploaded_resource).and_return(uploaded_resource)
14
+ end
15
+
11
16
  describe 'public methods' do
12
17
  let(:iiif_url) { 'https://iiif.test/images/1-1' }
13
18
  let(:endpoint) { IIIFManifest::IIIFEndpoint.new(iiif_url, profile: profile_url) }
@@ -23,9 +28,7 @@ describe Spotlight::IiifManifestPresenter do
23
28
  let(:img_height) { 10 }
24
29
 
25
30
  before do
26
- allow(resource).to receive(:uploaded_resource).and_return(double(exhibit: resource.exhibit))
27
-
28
- allow(spotlight_route_helper).to receive(:manifest_exhibit_solr_document_url).with(resource.exhibit, resource).and_return(manifest_url)
31
+ allow(spotlight_route_helper).to receive(:manifest_exhibit_solr_document_url).with(uploaded_resource.exhibit, resource).and_return(manifest_url)
29
32
  allow(controller).to receive(:spotlight).and_return(spotlight_route_helper)
30
33
 
31
34
  allow(blacklight_config).to receive(:view_config).with(:show).and_return(double(title_field: title_field_name))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-spotlight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.33.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer