blacklight-spotlight 3.4.4 → 3.5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/models/spotlight/search.rb +7 -3
- data/app/presenters/spotlight/iiif_manifest_presenter.rb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_video_block.html.erb +2 -2
- data/config/i18n-tasks.yml +1 -1
- data/lib/spotlight/engine.rb +5 -0
- data/lib/spotlight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd568a7e1663ebde3fb308ca3174b0c4aa10415a1c202f86da675873e1c722a7
|
4
|
+
data.tar.gz: a41c2f3a08c6bd1e5b8f3d1076cecbc2205151fd43d1371d9717f2a4ffa062e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fde923d14c41f0313479eb27441b06f8535cd13254eb11210b75db65afaba862d5688023c9048c12f5a18ca3e867b3a6247437ab38d38bdbd0731cb517bb9321
|
7
|
+
data.tar.gz: 76e088c504f780faaad67bede7893e5379d7d9e07e53f3d6fd38161927fbf8b4a5c40e7fb5827f2f140fdd9e74f546a0917799109e4b7c9ca34e50386e4ab893
|
data/README.md
CHANGED
@@ -19,13 +19,13 @@ Read more about what Spotlight is, our motivations for creating it, and how to i
|
|
19
19
|
To bootstrap a new Rails application:
|
20
20
|
|
21
21
|
```
|
22
|
-
$ rails new app-name -m https://raw.githubusercontent.com/projectblacklight/spotlight/
|
22
|
+
$ rails new app-name -m https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
23
23
|
```
|
24
24
|
|
25
25
|
or from an existing Rails application:
|
26
26
|
|
27
27
|
```
|
28
|
-
$ rails app:template LOCATION=https://raw.githubusercontent.com/projectblacklight/spotlight/
|
28
|
+
$ rails app:template LOCATION=https://raw.githubusercontent.com/projectblacklight/spotlight/main/template.rb
|
29
29
|
```
|
30
30
|
|
31
31
|
*During this process you will be prompted to enter an initial administrator email and password (this is a super-admin that can administer any exhibit in the installation).* If you choose not to create one, the first user will be given administrative privileges.
|
@@ -16,7 +16,11 @@ module Spotlight
|
|
16
16
|
has_many :groups, through: :group_memberships
|
17
17
|
accepts_nested_attributes_for :group_memberships
|
18
18
|
accepts_nested_attributes_for :groups
|
19
|
-
|
19
|
+
if defined?(Blacklight::SearchParamsYamlCoder)
|
20
|
+
serialize :query_params, Blacklight::SearchParamsYamlCoder, default: -> { {} }
|
21
|
+
else
|
22
|
+
serialize :query_params, Hash
|
23
|
+
end
|
20
24
|
default_scope { order('weight ASC') }
|
21
25
|
scope :published, -> { where(published: true) }
|
22
26
|
scope :unpublished, -> { where(published: [nil, false]) }
|
@@ -67,11 +71,11 @@ module Spotlight
|
|
67
71
|
end
|
68
72
|
|
69
73
|
def search_params
|
70
|
-
search_service.search_builder.with(query_params.with_indifferent_access).merge(facet: false)
|
74
|
+
search_service.search_builder.with((query_params || {}).with_indifferent_access).merge(facet: false)
|
71
75
|
end
|
72
76
|
|
73
77
|
def merge_params_for_search(params, blacklight_config)
|
74
|
-
base_query = Blacklight::SearchState.new(query_params, blacklight_config)
|
78
|
+
base_query = Blacklight::SearchState.new((query_params || {}), blacklight_config)
|
75
79
|
user_query = Blacklight::SearchState.new(params, blacklight_config).to_h
|
76
80
|
base_query.params_for_search(user_query).merge(user_query.slice(:page))
|
77
81
|
end
|
@@ -8,7 +8,7 @@ module Spotlight
|
|
8
8
|
# nodes.
|
9
9
|
#
|
10
10
|
# IIIFManifest expects the following methods: #file_set_presenters, #work_presenters, #manifest_url, #description.
|
11
|
-
# see: https://github.com/projecthydra-labs/iiif_manifest/blob/
|
11
|
+
# see: https://github.com/projecthydra-labs/iiif_manifest/blob/main/README.md
|
12
12
|
class IiifManifestPresenter
|
13
13
|
require 'iiif_manifest'
|
14
14
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if video_block.source == 'vimeo' %>
|
2
|
-
<%= render partial: '/spotlight/sir_trevor/blocks/videos/vimeo', vimeo: video_block %>
|
2
|
+
<%= render partial: '/spotlight/sir_trevor/blocks/videos/vimeo', locals: { vimeo: video_block } %>
|
3
3
|
<% elsif video_block.source == 'youtube' %>
|
4
|
-
<%= render partial: '/spotlight/sir_trevor/blocks/videos/youtube', youtube: video_block %>
|
4
|
+
<%= render partial: '/spotlight/sir_trevor/blocks/videos/youtube', locals: { youtube: video_block } %>
|
5
5
|
<% end %>
|
data/config/i18n-tasks.yml
CHANGED
@@ -78,7 +78,7 @@ ignore_unused:
|
|
78
78
|
# TODO Look into these as its unclear
|
79
79
|
- activerecord.models.spotlight.page
|
80
80
|
#- # perhaps removed here? https://github.com/projectblacklight/spotlight/commit/d4fdf04565ab3d648f0cb2a1238d84f262509fcd
|
81
|
-
- devise.mailer.*.* # Does this even work? https://github.com/projectblacklight/spotlight/blob/
|
81
|
+
- devise.mailer.*.* # Does this even work? https://github.com/projectblacklight/spotlight/blob/main/app/mailers/spotlight/invitation_mailer.rb#L16
|
82
82
|
- helpers.submit.solr_document.{batch_error,batch_updated,create,created,destroyed,submit,update,updated} # Do we need this?
|
83
83
|
- helpers.submit.user.{batch_error,batch_updated,create,created,destroyed,submit,update,updated} # Do we need this?
|
84
84
|
- helpers.action.destroy # no idea here
|
data/lib/spotlight/engine.rb
CHANGED
@@ -308,5 +308,10 @@ module Spotlight
|
|
308
308
|
config.assign_default_roles_to_first_user = true
|
309
309
|
|
310
310
|
config.exhibit_roles = %w[admin curator viewer]
|
311
|
+
|
312
|
+
if ActiveRecord.respond_to?(:yaml_column_permitted_classes) || ActiveRecord::Base.respond_to?(:yaml_column_permitted_classes)
|
313
|
+
config.active_record.yaml_column_permitted_classes ||= []
|
314
|
+
config.active_record.yaml_column_permitted_classes += [Symbol, ActiveSupport::HashWithIndifferentAccess]
|
315
|
+
end
|
311
316
|
end
|
312
317
|
end
|
data/lib/spotlight/version.rb
CHANGED
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: 3.
|
4
|
+
version: 3.5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-07-
|
14
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob-status
|