Skip to content

Commit 95db6c3

Browse files
authored
Update CI versions (#2791)
1 parent cac38ef commit 95db6c3

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

.github/workflows/ruby.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
rails_version: [6.1.3.2]
14-
ruby: [2.7, 3.0]
13+
rails_version: [6.1.4.4]
14+
ruby: [2.7, '3.0']
1515
env:
1616
RAILS_VERSION: ${{ matrix.rails_version }}
1717
steps:

app/controllers/concerns/spotlight/controller.rb

+13-12
Original file line numberDiff line numberDiff line change
@@ -67,38 +67,39 @@ def blacklight_config
6767
end
6868
end
6969

70-
def search_action_url(*args)
70+
def search_action_url(*args, **kwargs)
7171
if current_exhibit
72-
exhibit_search_action_url(*args)
72+
exhibit_search_action_url(*args, **kwargs)
7373
else
74-
main_app.search_catalog_url(*args)
74+
main_app.search_catalog_url(*args, **kwargs)
7575
end
7676
end
7777

78-
def search_facet_path(*args)
78+
def search_facet_path(*args, **kwargs)
7979
if current_exhibit
80-
exhibit_search_facet_path(*args)
80+
exhibit_search_facet_path(*args, **kwargs)
8181
else
82-
main_app.catalog_facet_url(*args)
82+
main_app.catalog_facet_url(*args, **kwargs)
8383
end
8484
end
8585

86-
def exhibit_search_action_url(*args)
86+
def exhibit_search_action_url(*args, **kwargs)
8787
options = args.extract_options!
88+
options = options.merge(kwargs)
8889
only_path = options[:only_path]
8990
options.except! :exhibit_id, :only_path
9091

9192
if only_path
92-
spotlight.search_exhibit_catalog_path(current_exhibit, *args, options)
93+
spotlight.search_exhibit_catalog_path(current_exhibit, *args, **options)
9394
else
94-
spotlight.search_exhibit_catalog_url(current_exhibit, *args, options)
95+
spotlight.search_exhibit_catalog_url(current_exhibit, *args, **options)
9596
end
9697
end
9798

98-
def exhibit_search_facet_path(*args)
99+
def exhibit_search_facet_path(*args, **kwargs)
99100
options = args.extract_options!
100-
options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).except(:exhibit_id, :only_path)
101-
spotlight.facet_exhibit_catalog_url(current_exhibit, *args, options)
101+
options = Blacklight::Parameters.sanitize(params.to_unsafe_h.with_indifferent_access).merge(options).merge(kwargs).except(:exhibit_id, :only_path)
102+
spotlight.facet_exhibit_catalog_url(current_exhibit, *args, **options&.symbolize_keys)
102103
end
103104
end
104105
end

spec/helpers/spotlight/pages_helper_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
let(:search_result) { [double('response'), double('documents')] }
4747

4848
it 'returns the results for a given search browse category' do
49-
expect(helper).to receive(:search_results).with('q' => 'query').and_return(search_result)
49+
expect(helper).to receive(:search_results).with({ 'q' => 'query' }).and_return(search_result)
5050
expect(helper.get_search_widget_search_results(good)).to eq search_result
5151
end
5252

spec/models/solr_document_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
it 'stores sidecar data on the sidecar object' do
7575
mock_sidecar = double
7676
allow(subject).to receive_messages(sidecar: mock_sidecar)
77-
expect(mock_sidecar).to receive(:update).with(data: { 'a' => 1 })
77+
expect(mock_sidecar).to receive(:update).with({ data: { 'a' => 1 } })
7878
subject.update exhibit, sidecar: { data: { 'a' => 1 } }
7979
end
8080

@@ -86,14 +86,14 @@
8686
it 'converts empty strings to nil' do
8787
mock_sidecar = double
8888
allow(subject).to receive_messages(sidecar: mock_sidecar)
89-
expect(mock_sidecar).to receive(:update).with(data: { 'a' => nil })
89+
expect(mock_sidecar).to receive(:update).with({ data: { 'a' => nil } })
9090
subject.update exhibit, sidecar: { data: { 'a' => '' } }
9191
end
9292

9393
it 'compacts arrays of empty or nil values' do
9494
mock_sidecar = double
9595
allow(subject).to receive_messages(sidecar: mock_sidecar)
96-
expect(mock_sidecar).to receive(:update).with(data: { 'a' => ['a'] })
96+
expect(mock_sidecar).to receive(:update).with({ data: { 'a' => ['a'] } })
9797
subject.update exhibit, sidecar: { data: { 'a' => ['', nil, 'a'] } }
9898
end
9999
end

0 commit comments

Comments
 (0)