blacklight-spotlight 3.0.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spotlight/admin/blocks/block.js +4 -0
- data/app/jobs/spotlight/reindex_exhibit_job.rb +9 -1
- data/app/views/layouts/spotlight/base.html.erb +2 -1
- data/app/views/shared/_body_preamble.html.erb +0 -0
- data/app/views/shared/_footer.html.erb +0 -1
- data/app/views/shared/_masthead.html.erb +1 -1
- data/app/views/shared/_user_util_links.html.erb +8 -2
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +1 -0
- data/lib/generators/spotlight/install_generator.rb +16 -7
- data/lib/spotlight/version.rb +1 -1
- data/spec/examples.txt +1499 -1498
- data/spec/features/report_a_problem_spec.rb +1 -0
- data/spec/fixtures/iiif_responses.rb +81 -81
- data/spec/models/spotlight/page_configurations_spec.rb +2 -2
- data/spec/test_app_templates/catalog_controller.rb +0 -1
- data/spec/views/spotlight/pages/show.html.erb_spec.rb +16 -6
- metadata +7 -8
- data/spec/views/shared/_footer.html.erb_spec.rb +0 -15
|
@@ -5,24 +5,24 @@ module IiifResponses
|
|
|
5
5
|
{
|
|
6
6
|
"@id": 'uri://for-top-level-collection',
|
|
7
7
|
"@type": 'sc:Collection',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
label: 'Complex Collection',
|
|
9
|
+
collections: [
|
|
10
10
|
{
|
|
11
11
|
"@id": 'uri://for-child-collection1',
|
|
12
12
|
"@type": 'sc:Collection',
|
|
13
|
-
|
|
13
|
+
label: 'Child Collection 1'
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"@id": 'uri://for-child-collection2',
|
|
17
17
|
"@type": 'sc:Collection',
|
|
18
|
-
|
|
18
|
+
label: 'Child Collection 2'
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
|
-
|
|
21
|
+
manifests: [
|
|
22
22
|
{
|
|
23
23
|
"@id": 'uri://for-manifest1',
|
|
24
24
|
"@type": 'sc:Manifest',
|
|
25
|
-
|
|
25
|
+
label: 'Test Manifest 1'
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
}.to_json
|
|
@@ -32,19 +32,19 @@ module IiifResponses
|
|
|
32
32
|
{
|
|
33
33
|
"@id": 'uri://for-child-collection1',
|
|
34
34
|
"@type": 'sc:Collection',
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
label: 'Child Collection 1',
|
|
36
|
+
collections: [
|
|
37
37
|
{
|
|
38
38
|
"@id": 'uri://for-child-collection3',
|
|
39
39
|
"@type": 'sc:Collection',
|
|
40
|
-
|
|
40
|
+
label: 'Child Collection 3'
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
|
|
43
|
+
manifests: [
|
|
44
44
|
{
|
|
45
45
|
"@id": 'uri://for-manifest2',
|
|
46
46
|
"@type": 'sc:Manifest',
|
|
47
|
-
|
|
47
|
+
label: 'Test Manifest 2'
|
|
48
48
|
}
|
|
49
49
|
]
|
|
50
50
|
}.to_json
|
|
@@ -54,12 +54,12 @@ module IiifResponses
|
|
|
54
54
|
{
|
|
55
55
|
"@id": 'uri://for-child-collection2',
|
|
56
56
|
"@type": 'sc:Collection',
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
label: 'Child Collection 2',
|
|
58
|
+
manifests: [
|
|
59
59
|
{
|
|
60
60
|
"@id": 'uri://for-manifest4',
|
|
61
61
|
"@type": 'sc:Manifest',
|
|
62
|
-
|
|
62
|
+
label: 'Test Manifest 4'
|
|
63
63
|
}
|
|
64
64
|
]
|
|
65
65
|
}.to_json
|
|
@@ -69,12 +69,12 @@ module IiifResponses
|
|
|
69
69
|
{
|
|
70
70
|
"@id": 'uri://for-child-collection3',
|
|
71
71
|
"@type": 'sc:Collection',
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
label: 'Child Collection 3',
|
|
73
|
+
manifests: [
|
|
74
74
|
{
|
|
75
75
|
"@id": 'uri://for-manifest3',
|
|
76
76
|
"@type": 'sc:Manifest',
|
|
77
|
-
|
|
77
|
+
label: 'Test Manifest 3'
|
|
78
78
|
}
|
|
79
79
|
]
|
|
80
80
|
}.to_json
|
|
@@ -84,40 +84,40 @@ module IiifResponses
|
|
|
84
84
|
{
|
|
85
85
|
"@id": 'uri://for-manifest1',
|
|
86
86
|
"@type": 'sc:Manifest',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
label: 'Test Manifest 1',
|
|
88
|
+
attribution: 'Attribution Data',
|
|
89
|
+
description: 'A test IIIF manifest',
|
|
90
|
+
license: 'http://www.example.org/license.html',
|
|
91
|
+
metadata: [
|
|
92
92
|
{
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
label: 'Author',
|
|
94
|
+
value: 'John Doe'
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
label: 'Author',
|
|
98
|
+
value: 'Jane Doe'
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
label: 'Another Field',
|
|
102
|
+
value: 'Some data'
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
|
-
|
|
105
|
+
thumbnail: {
|
|
106
106
|
"@id": 'uri://to-thumbnail'
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
sequences: [
|
|
109
109
|
{
|
|
110
110
|
"@type": 'sc:Sequence',
|
|
111
|
-
|
|
111
|
+
canvases: [
|
|
112
112
|
{
|
|
113
113
|
"@type": 'sc:Canvas',
|
|
114
|
-
|
|
114
|
+
images: [
|
|
115
115
|
{
|
|
116
116
|
"@type": 'oa:Annotation',
|
|
117
|
-
|
|
117
|
+
resource: {
|
|
118
118
|
"@type": 'dcterms:Image',
|
|
119
119
|
"@id": 'uri://full-image',
|
|
120
|
-
|
|
120
|
+
service: {
|
|
121
121
|
"@id": 'uri://to-image-service'
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -134,47 +134,47 @@ module IiifResponses
|
|
|
134
134
|
{
|
|
135
135
|
"@id": 'uri://for-manifest2',
|
|
136
136
|
"@type": 'sc:Manifest',
|
|
137
|
-
|
|
137
|
+
label: {
|
|
138
138
|
"@value": 'Test Manifest 2',
|
|
139
139
|
"@language": 'en'
|
|
140
140
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
attribution: 'Attribution Data',
|
|
142
|
+
description: 'A test IIIF manifest',
|
|
143
|
+
license: 'http://www.example.org/license.html',
|
|
144
|
+
metadata: [
|
|
145
145
|
{
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
label: 'Contributor',
|
|
147
|
+
value: 'John Doe'
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
label: 'Yet Another Field',
|
|
151
|
+
value: 'Some data'
|
|
152
152
|
}
|
|
153
153
|
],
|
|
154
|
-
|
|
154
|
+
thumbnail: {
|
|
155
155
|
"@id": 'uri://to-thumbnail'
|
|
156
156
|
},
|
|
157
|
-
|
|
157
|
+
sequences: [
|
|
158
158
|
{
|
|
159
159
|
"@type": 'sc:Sequence',
|
|
160
|
-
|
|
160
|
+
canvases: [
|
|
161
161
|
{
|
|
162
162
|
"@type": 'sc:Canvas',
|
|
163
|
-
|
|
163
|
+
images: [
|
|
164
164
|
{
|
|
165
165
|
"@type": 'oa:Annotation',
|
|
166
|
-
|
|
166
|
+
resource: {
|
|
167
167
|
"@type": 'dcterms:Image',
|
|
168
|
-
|
|
168
|
+
service: {
|
|
169
169
|
"@id": 'uri://to-image-service'
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"@type": 'oa:Annotation',
|
|
175
|
-
|
|
175
|
+
resource: {
|
|
176
176
|
"@type": 'dcterms:Image',
|
|
177
|
-
|
|
177
|
+
service: {
|
|
178
178
|
"@id": 'uri://to-image-service2'
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -191,7 +191,7 @@ module IiifResponses
|
|
|
191
191
|
{
|
|
192
192
|
"@id": 'uri://for-manifest3',
|
|
193
193
|
"@type": 'sc:Manifest',
|
|
194
|
-
|
|
194
|
+
label: [
|
|
195
195
|
{
|
|
196
196
|
"@value": 'Test Manifest 3',
|
|
197
197
|
"@language": 'en'
|
|
@@ -201,34 +201,34 @@ module IiifResponses
|
|
|
201
201
|
"@language": 'fr'
|
|
202
202
|
}
|
|
203
203
|
],
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
attribution: 'Attribution Data',
|
|
205
|
+
description: 'A test IIIF manifest',
|
|
206
|
+
license: 'http://www.example.org/license.html',
|
|
207
|
+
metadata: [
|
|
208
208
|
{
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
label: 'Author',
|
|
210
|
+
value: 'Jane Doe'
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
label: 'Collection',
|
|
214
|
+
value: 'Some Collection'
|
|
215
215
|
}
|
|
216
216
|
],
|
|
217
|
-
|
|
217
|
+
thumbnail: {
|
|
218
218
|
"@id": 'uri://to-thumbnail'
|
|
219
219
|
},
|
|
220
|
-
|
|
220
|
+
sequences: [
|
|
221
221
|
{
|
|
222
222
|
"@type": 'sc:Sequence',
|
|
223
|
-
|
|
223
|
+
canvases: [
|
|
224
224
|
{
|
|
225
225
|
"@type": 'sc:Canvas',
|
|
226
|
-
|
|
226
|
+
images: [
|
|
227
227
|
{
|
|
228
228
|
"@type": 'oa:Annotation',
|
|
229
|
-
|
|
229
|
+
resource: {
|
|
230
230
|
"@type": 'dcterms:Image',
|
|
231
|
-
|
|
231
|
+
service: {
|
|
232
232
|
"@id": 'uri://to-image-service'
|
|
233
233
|
}
|
|
234
234
|
}
|
|
@@ -245,35 +245,35 @@ module IiifResponses
|
|
|
245
245
|
{
|
|
246
246
|
"@id": 'uri://for-manifest4',
|
|
247
247
|
"@type": 'sc:Manifest',
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
label: 'Test Manifest 4',
|
|
249
|
+
attribution: 'Attribution Data',
|
|
250
|
+
description: 'A test IIIF manifest',
|
|
251
|
+
license: 'http://www.example.org/license.html',
|
|
252
|
+
metadata: [
|
|
253
253
|
{
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
label: 'Contributor',
|
|
255
|
+
value: 'Jane Doe'
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
label: 'Location',
|
|
259
|
+
value: 'Some location'
|
|
260
260
|
}
|
|
261
261
|
],
|
|
262
|
-
|
|
262
|
+
thumbnail: {
|
|
263
263
|
"@id": 'uri://to-thumbnail'
|
|
264
264
|
},
|
|
265
|
-
|
|
265
|
+
sequences: [
|
|
266
266
|
{
|
|
267
267
|
"@type": 'sc:Sequence',
|
|
268
|
-
|
|
268
|
+
canvases: [
|
|
269
269
|
{
|
|
270
270
|
"@type": 'sc:Canvas',
|
|
271
|
-
|
|
271
|
+
images: [
|
|
272
272
|
{
|
|
273
273
|
"@type": 'oa:Annotation',
|
|
274
|
-
|
|
274
|
+
resource: {
|
|
275
275
|
"@type": 'dcterms:Image',
|
|
276
|
-
|
|
276
|
+
service: {
|
|
277
277
|
"@id": 'uri://to-image-service'
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -28,9 +28,9 @@ describe Spotlight::PageConfigurations, type: :model do
|
|
|
28
28
|
|
|
29
29
|
describe 'downstream configured_params' do
|
|
30
30
|
it 'merges the supplied hash into the configs' do
|
|
31
|
-
expect(page_config).to receive_messages(configured_params: {
|
|
31
|
+
expect(page_config).to receive_messages(configured_params: { hello: 'goodbye' })
|
|
32
32
|
|
|
33
|
-
expect(page_config.as_json).to include(
|
|
33
|
+
expect(page_config.as_json).to include(hello: 'goodbye')
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
it 'sends the #call method to the value if it can respond (e.g. a lamda)' do
|
|
@@ -36,7 +36,6 @@ class CatalogController < ApplicationController
|
|
|
36
36
|
config.index.thumbnail_field = Spotlight::Engine.config.thumbnail_field
|
|
37
37
|
|
|
38
38
|
config.show.tile_source_field = :content_metadata_image_iiif_info_ssm
|
|
39
|
-
config.show.partials.insert(1, :openseadragon)
|
|
40
39
|
|
|
41
40
|
config.add_results_collection_tool(:sort_widget)
|
|
42
41
|
config.add_results_collection_tool(:per_page_widget)
|
|
@@ -33,12 +33,22 @@ describe 'spotlight/pages/show', type: :view do
|
|
|
33
33
|
render
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
context 'when rendering with layout' do
|
|
37
|
+
before do
|
|
38
|
+
allow(page).to receive_messages(title: 'Abbott & Costello')
|
|
39
|
+
stub_template 'shared/_analytics.html.erb' => 'analytics'
|
|
40
|
+
stub_template 'shared/_user_util_links.html.erb' => ''
|
|
41
|
+
stub_template 'shared/_masthead.html.erb' => ''
|
|
42
|
+
render template: 'spotlight/pages/show', layout: 'layouts/spotlight/spotlight'
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it 'does not double-escape HTML entities in the HTML title' do
|
|
46
|
+
expect(rendered).to have_content('Abbott & Costello | Blacklight')
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'includes analytics reporting' do
|
|
50
|
+
expect(rendered).to have_content 'analytics'
|
|
51
|
+
end
|
|
42
52
|
end
|
|
43
53
|
|
|
44
54
|
it 'does not include the page title' do
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: blacklight-spotlight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Beer
|
|
8
8
|
- Jessie Keck
|
|
9
9
|
- Gary Geisler
|
|
10
10
|
- Justin Coyne
|
|
11
|
-
autorequire:
|
|
11
|
+
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2021-
|
|
14
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: activejob-status
|
|
@@ -867,7 +867,7 @@ dependencies:
|
|
|
867
867
|
- - ">="
|
|
868
868
|
- !ruby/object:Gem::Version
|
|
869
869
|
version: '0'
|
|
870
|
-
description:
|
|
870
|
+
description:
|
|
871
871
|
email:
|
|
872
872
|
- exhibits-feedback@lists.stanford.edu
|
|
873
873
|
executables: []
|
|
@@ -1191,6 +1191,7 @@ files:
|
|
|
1191
1191
|
- app/views/layouts/spotlight/spotlight.html.erb
|
|
1192
1192
|
- app/views/shared/_about_navbar.html.erb
|
|
1193
1193
|
- app/views/shared/_analytics.html.erb
|
|
1194
|
+
- app/views/shared/_body_preamble.html.erb
|
|
1194
1195
|
- app/views/shared/_breadcrumbs.html.erb
|
|
1195
1196
|
- app/views/shared/_browse_navbar.html.erb
|
|
1196
1197
|
- app/views/shared/_curated_features_navbar.html.erb
|
|
@@ -1725,7 +1726,6 @@ files:
|
|
|
1725
1726
|
- spec/uploaders/spotlight/featured_image_uploader_spec.rb
|
|
1726
1727
|
- spec/views/shared/_analytics.html.erb_spec.rb
|
|
1727
1728
|
- spec/views/shared/_exhibit_navbar.html.erb_spec.rb
|
|
1728
|
-
- spec/views/shared/_footer.html.erb_spec.rb
|
|
1729
1729
|
- spec/views/shared/_header_navbar.html.erb_spec.rb
|
|
1730
1730
|
- spec/views/shared/_masthead.html.erb_spec.rb
|
|
1731
1731
|
- spec/views/shared/_user_util_links.html.erb_spec.rb
|
|
@@ -1820,7 +1820,7 @@ files:
|
|
|
1820
1820
|
homepage: https://github.com/projectblacklight/spotlight
|
|
1821
1821
|
licenses: []
|
|
1822
1822
|
metadata: {}
|
|
1823
|
-
post_install_message:
|
|
1823
|
+
post_install_message:
|
|
1824
1824
|
rdoc_options: []
|
|
1825
1825
|
require_paths:
|
|
1826
1826
|
- lib
|
|
@@ -1836,7 +1836,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1836
1836
|
version: '0'
|
|
1837
1837
|
requirements: []
|
|
1838
1838
|
rubygems_version: 3.2.3
|
|
1839
|
-
signing_key:
|
|
1839
|
+
signing_key:
|
|
1840
1840
|
specification_version: 4
|
|
1841
1841
|
summary: Enable librarians, curators, and others who are responsible for digital collections
|
|
1842
1842
|
to create attractive, feature-rich websites that feature these collections.
|
|
@@ -2085,7 +2085,6 @@ test_files:
|
|
|
2085
2085
|
- spec/uploaders/spotlight/featured_image_uploader_spec.rb
|
|
2086
2086
|
- spec/views/shared/_analytics.html.erb_spec.rb
|
|
2087
2087
|
- spec/views/shared/_exhibit_navbar.html.erb_spec.rb
|
|
2088
|
-
- spec/views/shared/_footer.html.erb_spec.rb
|
|
2089
2088
|
- spec/views/shared/_header_navbar.html.erb_spec.rb
|
|
2090
2089
|
- spec/views/shared/_masthead.html.erb_spec.rb
|
|
2091
2090
|
- spec/views/shared/_user_util_links.html.erb_spec.rb
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
describe 'shared/_footer', type: :view do
|
|
4
|
-
let(:current_exhibit) { double(title: 'Some title', subtitle: 'Subtitle') }
|
|
5
|
-
|
|
6
|
-
before do
|
|
7
|
-
allow(view).to receive_messages(current_exhibit: current_exhibit)
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
it 'includes analytics reporting' do
|
|
11
|
-
stub_template 'shared/_analytics.html.erb' => 'analytics'
|
|
12
|
-
render
|
|
13
|
-
expect(rendered).to have_content 'analytics'
|
|
14
|
-
end
|
|
15
|
-
end
|