blacklight-spotlight 5.2.4 → 5.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8118c7db4342112b0002fff061c080e3ff8ec95f4025e09f0d068e8be11ccc46
4
- data.tar.gz: b8967991643c751413c61d1f58b1332cdeea8b95c49109605fbd6035939545e1
3
+ metadata.gz: 77faacb08fec808eb92fe2839ac84da6901925e5e417e8b621513e914d058de8
4
+ data.tar.gz: e3e7c58e629eb49be082bbb6a2b8479a052bf6de073111061a16a1888117555c
5
5
  SHA512:
6
- metadata.gz: b38d413653acfc7576fec6c2448561bc614623c2158898f1bca25bf82d5d932f2df9261e9a4d3601b00879004637f2c6f999f5d6953ff284869e44410eb44d27
7
- data.tar.gz: e25ebfb68db749f40047aa045ce51b358ae43a27e1523e5fc6f545e46279d8147a1a6ba7c3b9e7ef9146edbd182dd8d99ffb15cba6d7f7e9b311721d97a51864
6
+ metadata.gz: 8abf1cf95606f9c0ee1fbbca58baa3f57ce5b77711c43eb3398cca4e790772536fe9771ce8112532782f990c0c92dc937df962a694b6ec71abc6cd7844f1ee8d
7
+ data.tar.gz: 1c884044f7cd43d5446dbfe72b2a06758bbfbfe2310e0a4741b2348c68ccaa2f6409cf764ff0b0d59c50d35f4e7b4c79d45898bca5b7ecf76f97f1d8403ba246
data/README.md CHANGED
@@ -11,10 +11,13 @@ If you have questions or are interested in contributing, please reach out to the
11
11
 
12
12
  ## Requirements
13
13
 
14
- 1. [Ruby](https://www.ruby-lang.org/) 3.2+
15
- 2. [Ruby on Rails](https://rubyonrails.org/) 7.1+
16
- 3. Java (11 or greater) *for Solr*
17
- 4. ImageMagick (http://www.imagemagick.org/script/index.php) due to [carrierwave](https://github.com/carrierwaveuploader/carrierwave#adding-versions)
14
+ - [Ruby](https://www.ruby-lang.org/) 3.2+
15
+ - [Ruby on Rails](https://rubyonrails.org/) 7.1+
16
+ - Java (11 or greater) *for Solr*
17
+ - [ImageMagick](http://www.imagemagick.org/script/index.php) if using riiif (current default for `config.iiif_service`)
18
+ - See [riiif](https://github.com/sul-dlss/riiif) configuration instructions for alternatives to ImageMagick (ex. libvips)
19
+ - May also be needed if adding custom [carrierwave](https://github.com/carrierwaveuploader/carrierwave) uploaders to Spotlight
20
+
18
21
 
19
22
  ## Installation
20
23
 
@@ -24,7 +24,6 @@
24
24
  @import "upload";
25
25
  @import "nestable";
26
26
  @import "blacklight_configuration";
27
- @import "typeahead";
28
27
  @import "bootstrap_overrides";
29
28
  @import "blacklight_overrides";
30
29
  @import "report_a_problem";
@@ -38,7 +37,6 @@
38
37
  @import "admin_users";
39
38
  @import "autocomplete";
40
39
 
41
-
42
40
  // Styles below keep footer at bottom of viewport
43
41
  html {
44
42
  position: relative;
@@ -29,8 +29,8 @@ module Spotlight
29
29
  **params
30
30
  )
31
31
 
32
- redirect_back fallback_location: spotlight.search_exhibit_catalog_path(current_search_session.query_params),
33
- notice: t(:"spotlight.bulk_actions.#{i18n_key}.changed", count: solr_response.total)
32
+ redirect_back_or_to(spotlight.search_exhibit_catalog_path(current_search_session.query_params),
33
+ notice: t(:"spotlight.bulk_actions.#{i18n_key}.changed", count: solr_response.total))
34
34
  end
35
35
 
36
36
  def solr_params
@@ -31,9 +31,9 @@ module Spotlight
31
31
  bulk_update = Spotlight::BulkUpdate.new(exhibit: current_exhibit, file: file_params)
32
32
  if bulk_update.save
33
33
  ProcessBulkUpdatesCsvJob.perform_later(current_exhibit, bulk_update)
34
- redirect_back fallback_location: spotlight.edit_exhibit_bulk_updates_path(current_exhibit), notice: t(:'spotlight.bulk_updates.update.submitted')
34
+ redirect_back_or_to(spotlight.edit_exhibit_bulk_updates_path(current_exhibit), notice: t(:'spotlight.bulk_updates.update.submitted'))
35
35
  else
36
- redirect_back fallback_location: spotlight.edit_exhibit_bulk_updates_path(current_exhibit), alert: t(:'spotlight.bulk_updates.update.error')
36
+ redirect_back_or_to(spotlight.edit_exhibit_bulk_updates_path(current_exhibit), alert: t(:'spotlight.bulk_updates.update.error'))
37
37
  end
38
38
  end
39
39
 
@@ -103,7 +103,7 @@ module Spotlight
103
103
  @document.save
104
104
 
105
105
  respond_to do |format|
106
- format.html { redirect_back(fallback_location: [spotlight, current_exhibit, @document]) }
106
+ format.html { redirect_back_or_to([spotlight, current_exhibit, @document]) }
107
107
  format.json { render json: true }
108
108
  end
109
109
  end
@@ -113,7 +113,7 @@ module Spotlight
113
113
  @document.save
114
114
 
115
115
  respond_to do |format|
116
- format.html { redirect_back(fallback_location: [spotlight, current_exhibit, @document]) }
116
+ format.html { redirect_back_or_to([spotlight, current_exhibit, @document]) }
117
117
  format.json { render json: true }
118
118
  end
119
119
  end
@@ -15,7 +15,7 @@ module Spotlight
15
15
  if @contact_form.valid?
16
16
  ContactMailer.report_problem(@contact_form).deliver_now
17
17
 
18
- redirect_back fallback_location: spotlight.new_exhibit_contact_form_path(current_exhibit), notice: t(:'helpers.submit.contact_form.created')
18
+ redirect_back_or_to(spotlight.new_exhibit_contact_form_path(current_exhibit), notice: t(:'helpers.submit.contact_form.created'))
19
19
  else
20
20
  render 'new'
21
21
  end
@@ -64,7 +64,7 @@ module Spotlight
64
64
  else
65
65
  flash.now[:alert] = t('spotlight.exhibits.new_exhibit_form.errors.slug_taken') if @exhibit.errors[:slug].present?
66
66
 
67
- render :new, status: :unprocessable_entity
67
+ render :new, status: :unprocessable_content
68
68
  end
69
69
  end
70
70
  # rubocop:enable Metrics/AbcSize
@@ -18,7 +18,7 @@ module Spotlight
18
18
  private
19
19
 
20
20
  def handle_upload_error(exception)
21
- render json: { error: [exception.message] }, status: :unprocessable_entity
21
+ render json: { error: [exception.message] }, status: :unprocessable_content
22
22
  end
23
23
 
24
24
  def tilesource
@@ -93,7 +93,7 @@ module Spotlight
93
93
  else
94
94
  t(:'helpers.submit.page.batch_error', model: human_name)
95
95
  end
96
- redirect_back fallback_location: spotlight.exhibit_dashboard_path(@exhibit), notice:
96
+ redirect_back_or_to(spotlight.exhibit_dashboard_path(@exhibit), notice:)
97
97
  end
98
98
 
99
99
  def clone
@@ -40,10 +40,9 @@ module Spotlight
40
40
  @search.query_params = query_params
41
41
 
42
42
  if @search.save
43
- redirect_back fallback_location: fallback_url,
44
- notice: t(:'helpers.submit.search.created', model: @search.class.model_name.human.downcase)
43
+ redirect_back_or_to(fallback_url, notice: t(:'helpers.submit.search.created', model: @search.class.model_name.human.downcase))
45
44
  else
46
- redirect_back fallback_location: fallback_url, alert: @search.errors.full_messages.join('<br>'.html_safe)
45
+ redirect_back_or_to(fallback_url, alert: @search.errors.full_messages.join('<br>'.html_safe))
47
46
  end
48
47
  end
49
48
 
@@ -79,7 +78,7 @@ module Spotlight
79
78
  else
80
79
  t(:'helpers.submit.search.batch_error', model: Spotlight::Search.model_name.human.pluralize.downcase)
81
80
  end
82
- redirect_back fallback_location: fallback_url, notice:
81
+ redirect_back_or_to(fallback_url, notice:)
83
82
  end
84
83
 
85
84
  protected
@@ -27,7 +27,7 @@ module Spotlight
27
27
  end
28
28
 
29
29
  if params[:resources_json_upload]
30
- redirect_back fallback_location: exhibit_resources_path(@exhibit)
30
+ redirect_back_or_to(exhibit_resources_path(@exhibit))
31
31
  else
32
32
  head :ok
33
33
  end
@@ -43,7 +43,7 @@ module Spotlight
43
43
 
44
44
  rename_tags_later!(tags_to_rename)
45
45
 
46
- redirect_back fallback_location: fallback_url, notice: t(:'helpers.submit.tags.batch_updated', count: tags_to_rename.count)
46
+ redirect_back_or_to(fallback_url, notice: t(:'helpers.submit.tags.batch_updated', count: tags_to_rename.count))
47
47
  end
48
48
 
49
49
  private
@@ -17,7 +17,7 @@ module Spotlight
17
17
  redirect_to [obj.exhibit, obj], flash: { html_safe: true }, notice: view_context.t(:'spotlight.versions.undo_error')
18
18
  end
19
19
  else
20
- redirect_back fallback_location: main_app.root_url, flash: { html_safe: true }, notice: view_context.t(:'spotlight.versions.undo_error')
20
+ redirect_back_or_to(main_app.root_url, flash: { html_safe: true }, notice: view_context.t(:'spotlight.versions.undo_error'))
21
21
  end
22
22
  end
23
23
 
@@ -127,7 +127,7 @@ module Spotlight
127
127
  end
128
128
 
129
129
  def update_sidecar_data_after_field_name_change
130
- Spotlight::RenameSidecarFieldJob.perform_later(exhibit, field_before_last_save, self.field, slug_before_last_save, slug)
130
+ Spotlight::RenameSidecarFieldJob.perform_later(exhibit, field_before_last_save, field, slug_before_last_save, slug)
131
131
  end
132
132
 
133
133
  def document_model
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spotlight
4
- VERSION = '5.2.4'
4
+ VERSION = '5.3.0'
5
5
  end
@@ -39,13 +39,13 @@ module Spotlight
39
39
  end
40
40
 
41
41
  def wait_for_sir_trevor
42
- expect(page).to have_selector('.st-blocks.st-ready')
42
+ expect(page).to have_css('.st-blocks.st-ready')
43
43
  end
44
44
 
45
45
  def save_page_changes
46
46
  click_button('Save changes')
47
47
  # verify that the page was created.
48
- expect(page).to have_selector('.alert-info', text: 'was successfully updated')
48
+ expect(page).to have_css('.alert-info', text: 'was successfully updated')
49
49
  expect(page).to have_no_selector('.alert-danger')
50
50
  end
51
51
 
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: 5.2.4
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -158,16 +158,22 @@ dependencies:
158
158
  name: devise
159
159
  requirement: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - "~>"
161
+ - - ">="
162
162
  - !ruby/object:Gem::Version
163
163
  version: '4.9'
164
+ - - "<"
165
+ - !ruby/object:Gem::Version
166
+ version: '6'
164
167
  type: :runtime
165
168
  prerelease: false
166
169
  version_requirements: !ruby/object:Gem::Requirement
167
170
  requirements:
168
- - - "~>"
171
+ - - ">="
169
172
  - !ruby/object:Gem::Version
170
173
  version: '4.9'
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: '6'
171
177
  - !ruby/object:Gem::Dependency
172
178
  name: devise_invitable
173
179
  requirement: !ruby/object:Gem::Requirement
@@ -848,7 +854,6 @@ files:
848
854
  - app/assets/stylesheets/spotlight/_variables.scss
849
855
  - app/assets/stylesheets/spotlight/_view_larger.scss
850
856
  - app/assets/stylesheets/spotlight/browse_group_categories_block.scss
851
- - app/assets/stylesheets/spotlight/typeahead.scss
852
857
  - app/components/blacklight/icons/arrow_alt_circle_left_component.rb
853
858
  - app/components/blacklight/icons/arrow_alt_circle_right_component.rb
854
859
  - app/components/blacklight/icons/arrow_back_ios_component.rb
@@ -1561,7 +1566,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1561
1566
  - !ruby/object:Gem::Version
1562
1567
  version: '0'
1563
1568
  requirements: []
1564
- rubygems_version: 3.6.9
1569
+ rubygems_version: 4.0.7
1565
1570
  specification_version: 4
1566
1571
  summary: Enable librarians, curators, and others who are responsible for digital collections
1567
1572
  to create attractive, feature-rich websites that feature these collections.
@@ -1,77 +0,0 @@
1
- .twitter-typeahead {
2
- width: 100%;
3
- }
4
-
5
- .typeahead,
6
- .tt-query,
7
- .tt-hint {
8
- }
9
-
10
- .typeahead {
11
- background-color: #fff;
12
- }
13
-
14
- .typeahead:focus {
15
- border: 2px solid #0097cf;
16
- }
17
-
18
- .tt-hint {
19
- color: #999
20
- }
21
-
22
- .tt-dropdown-menu {
23
- z-index: $zindex-dropdown !important;
24
- margin-top: 2px;
25
- max-height: 360px;
26
- overflow-y: auto;
27
- padding: 8px 0;
28
- background-color: #fff;
29
- border: 1px solid #ccc;
30
- border: 1px solid rgba(0, 0, 0, 0.2);
31
- -webkit-border-radius: 8px;
32
- -moz-border-radius: 8px;
33
- border-radius: 8px;
34
- -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
35
- -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
36
- box-shadow: 0 5px 10px rgba(0,0,0,.2);
37
- }
38
-
39
- .twitter-typeahead {
40
- z-index: $zindex-dropdown !important; /* get typeahead to float on top of e.g. leaflet */
41
- .tt-suggestion {
42
- font-size: 18px;
43
- line-height: 24px;
44
- padding: 3px 1rem 3px 1rem;
45
- margin-bottom: 1em;
46
-
47
- &.tt-cursor {
48
- color: #fff;
49
- background-color: #0097cf;
50
- }
51
- }
52
- }
53
-
54
- .tt-dataset-tags {
55
- p {
56
- white-space: nowrap !important;
57
- }
58
- }
59
-
60
- .autocomplete-item {
61
- display: flex;
62
-
63
- p {
64
- margin: 0;
65
- }
66
- .document-thumbnail {
67
- margin-right: 1rem;
68
- min-width: 60px;
69
- padding: 0;
70
- width: 60px;
71
-
72
- img {
73
- max-width: 60px;
74
- max-height: 60px;
75
- }
76
- }
77
- }