Skip to content

Commit 91453f2

Browse files
committed
Begin Blacklight 9 upgrade
Currently, several tests are failing because JS hits an error before loading all the necessary things (we need the fix to projectblacklight/blacklight#3724 to be released)
1 parent 00f2640 commit 91453f2

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gem 'alma'
88
gem 'babel-transpiler'
99
gem 'bcrypt_pbkdf'
1010
# Blacklight
11-
gem 'blacklight', '~> 8.8'
11+
gem 'blacklight', '~> 9.0.0.beta7'
1212
gem 'blacklight_dynamic_sitemap'
1313
gem 'blacklight-hierarchy'
1414
gem 'blacklight-marc', '~>8.1'

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ GEM
118118
parser (>= 2.4)
119119
smart_properties
120120
bigdecimal (3.2.2)
121-
blacklight (8.11.0)
121+
blacklight (9.0.0.beta7)
122122
globalid
123123
i18n (>= 1.7.0)
124124
jbuilder (~> 2.7)
125125
kaminari (>= 0.15)
126126
ostruct (>= 0.3.2)
127-
rails (>= 6.1, < 9)
128-
view_component (>= 2.74, < 4)
127+
rails (>= 7.0, < 9)
128+
view_component (>= 3.0, < 5.0)
129129
zeitwerk
130130
blacklight-hierarchy (6.6.0)
131131
blacklight (>= 7.18, < 9)
@@ -786,7 +786,7 @@ DEPENDENCIES
786786
axe-core-rspec
787787
babel-transpiler
788788
bcrypt_pbkdf
789-
blacklight (~> 8.8)
789+
blacklight (~> 9.0.0.beta7)
790790
blacklight-hierarchy
791791
blacklight-marc (~> 8.1)
792792
blacklight_dynamic_sitemap

app/components/format_facet_item_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
class FormatFacetItemComponent < Blacklight::FacetItemComponent
3+
class FormatFacetItemComponent < Blacklight::Facets::ItemComponent
44
def render_facet_value(...)
55
render_icon + super
66
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%= render(@layout.new(
22
classes: (Array(@classes) + ["filter-#{@facet_item_presenter.key.parameterize}"]).join(' '),
3-
label: @facet_item_presenter.field_label,
3+
label: field_label,
44
value: constraint_value,
5-
remove_path: @facet_item_presenter.remove_href)) %>
5+
remove_path: remove_href)) %>

spec/components/index_document_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
presenter = Blacklight::DocumentPresenter.new(document, instance_double(ActionView::Base, action_name: 'show'), blacklight_config)
2121
allow(presenter).to receive(:fields).and_return([])
2222
allow(document).to receive(:export_as_openurl_ctx_kev).and_return 'ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.issn=1045-4438'
23-
render_inline(described_class.new(document:, presenter:))
23+
render_inline(described_class.new(document: presenter))
2424
end
2525
it 'puts everything into an article tag' do
2626
expect(subject.elements.first.name).to eq('article')

spec/components/index_title_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
RSpec.describe IndexTitleComponent, type: :component do
66
subject do
7-
render_inline described_class.new(document:)
7+
render_inline described_class.new(presenter: Blacklight::DocumentPresenter.new(document, instance_double(ActionView::Base, action_name: 'show'), blacklight_config))
88
end
99
before do
1010
allow_any_instance_of(Blacklight::Document::BookmarkComponent).to receive(:bookmarked?).and_return(false)

spec/components/orangelight/constraint_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require "rails_helper"
44

55
RSpec.describe Orangelight::ConstraintComponent, type: :component do
6-
let(:facet_item_presenter) { instance_double(Blacklight::FacetItemPresenter) }
6+
let(:facet_item_presenter) { instance_double(Blacklight::ClausePresenter) }
77

88
it "can handle the odd format[0]-style params" do
99
allow(facet_item_presenter).to receive(:key).and_return('key')

0 commit comments

Comments
 (0)