blacklight-spotlight 3.4.4.1 → 3.5.0.2

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
  SHA256:
3
- metadata.gz: f4b74d84df0dcd65567763f41d2a660689ee04bff5b7af92c3de7e25085f6f13
4
- data.tar.gz: 966afd8e09ec93d4d7c900affb6e19e056636add47d5b847e0761316d744547d
3
+ metadata.gz: 6b37ca44843ce17defff551d04be7ad02dec03229756548a7f42dbda6d7608ed
4
+ data.tar.gz: d240e8284f7030833fd81256d232c37f3ee178c8b329823007a1de6d44e6e7ca
5
5
  SHA512:
6
- metadata.gz: d063e57ea84229a5d9a314c90b2014a17b8426fb0b4d1bde438884203b2f8522891a286d0848eeed2610381061815a245ba854bd767c00fabbfec0cd213bebda
7
- data.tar.gz: 6e728ae496aa532407110639ecd1a6f6b0c6fc251c5e79edd2b9ce503d9eece1accad5977db32cd61ec51378498cf9020dbc1dc9e4ef0aaef10b8cc1d155f3fa
6
+ metadata.gz: 6ab409d1cb4743910da14cc580d2048fe18a798edcbaa5b5dcbf93c67b1a7c9a6e40a9647a44262d369e13830cf7e3a0419278c18a3de58bbb70a2df93933716
7
+ data.tar.gz: 900d4dec2ff3596e0f9ee37f66b118419317eb8c1a2931827a1ed3ebb117a3a6324e9358bb660180f94c63427db39520b3663e8cb167afc2db4d54bd01ef86a5
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/master/template.rb
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/master/template.rb
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
- serialize :query_params, Hash
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]) }
@@ -60,6 +64,10 @@ module Spotlight
60
64
  end
61
65
  end
62
66
 
67
+ def query_params
68
+ super || {}.with_indifferent_access
69
+ end
70
+
63
71
  delegate :blacklight_config, to: :exhibit
64
72
 
65
73
  def display_masthead?
@@ -67,11 +75,11 @@ module Spotlight
67
75
  end
68
76
 
69
77
  def search_params
70
- search_service.search_builder.with(query_params.with_indifferent_access).merge(facet: false)
78
+ search_service.search_builder.with((query_params || {}).with_indifferent_access).merge(facet: false)
71
79
  end
72
80
 
73
81
  def merge_params_for_search(params, blacklight_config)
74
- base_query = Blacklight::SearchState.new(query_params, blacklight_config)
82
+ base_query = Blacklight::SearchState.new((query_params || {}), blacklight_config)
75
83
  user_query = Blacklight::SearchState.new(params, blacklight_config).to_h
76
84
  base_query.params_for_search(user_query).merge(user_query.slice(:page))
77
85
  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/master/README.md
11
+ # see: https://github.com/projecthydra-labs/iiif_manifest/blob/main/README.md
12
12
  class IiifManifestPresenter
13
13
  require 'iiif_manifest'
14
14
 
@@ -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/master/app/mailers/spotlight/invitation_mailer.rb#L16
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '3.4.4.1'
4
+ VERSION = '3.5.0.2'
5
5
  end
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.4.1
4
+ version: 3.5.0.2
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-12 00:00:00.000000000 Z
14
+ date: 2022-07-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob-status