Skip to content

Commit e4ec6f6

Browse files
authored
Merge pull request #5464 from pulibrary/rails-8.1.1
Rails 8.1.1
2 parents f0148d4 + 92e489d commit e4ec6f6

10 files changed

Lines changed: 127 additions & 131 deletions

File tree

Gemfile

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

33
source 'https://gem.coop'
44

5-
gem 'rails', '~> 7.2.2'
5+
gem 'rails', '~> 8.1.1'
66

77
gem 'alma'
88
gem 'babel-transpiler'

Gemfile.lock

Lines changed: 75 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -8,79 +8,80 @@ GIT
88
GEM
99
remote: https://gem.coop/
1010
specs:
11-
actioncable (7.2.3)
12-
actionpack (= 7.2.3)
13-
activesupport (= 7.2.3)
11+
action_text-trix (2.1.15)
12+
railties
13+
actioncable (8.1.1)
14+
actionpack (= 8.1.1)
15+
activesupport (= 8.1.1)
1416
nio4r (~> 2.0)
1517
websocket-driver (>= 0.6.1)
1618
zeitwerk (~> 2.6)
17-
actionmailbox (7.2.3)
18-
actionpack (= 7.2.3)
19-
activejob (= 7.2.3)
20-
activerecord (= 7.2.3)
21-
activestorage (= 7.2.3)
22-
activesupport (= 7.2.3)
19+
actionmailbox (8.1.1)
20+
actionpack (= 8.1.1)
21+
activejob (= 8.1.1)
22+
activerecord (= 8.1.1)
23+
activestorage (= 8.1.1)
24+
activesupport (= 8.1.1)
2325
mail (>= 2.8.0)
24-
actionmailer (7.2.3)
25-
actionpack (= 7.2.3)
26-
actionview (= 7.2.3)
27-
activejob (= 7.2.3)
28-
activesupport (= 7.2.3)
26+
actionmailer (8.1.1)
27+
actionpack (= 8.1.1)
28+
actionview (= 8.1.1)
29+
activejob (= 8.1.1)
30+
activesupport (= 8.1.1)
2931
mail (>= 2.8.0)
3032
rails-dom-testing (~> 2.2)
31-
actionpack (7.2.3)
32-
actionview (= 7.2.3)
33-
activesupport (= 7.2.3)
34-
cgi
33+
actionpack (8.1.1)
34+
actionview (= 8.1.1)
35+
activesupport (= 8.1.1)
3536
nokogiri (>= 1.8.5)
36-
racc
37-
rack (>= 2.2.4, < 3.3)
37+
rack (>= 2.2.4)
3838
rack-session (>= 1.0.1)
3939
rack-test (>= 0.6.3)
4040
rails-dom-testing (~> 2.2)
4141
rails-html-sanitizer (~> 1.6)
4242
useragent (~> 0.16)
43-
actiontext (7.2.3)
44-
actionpack (= 7.2.3)
45-
activerecord (= 7.2.3)
46-
activestorage (= 7.2.3)
47-
activesupport (= 7.2.3)
43+
actiontext (8.1.1)
44+
action_text-trix (~> 2.1.15)
45+
actionpack (= 8.1.1)
46+
activerecord (= 8.1.1)
47+
activestorage (= 8.1.1)
48+
activesupport (= 8.1.1)
4849
globalid (>= 0.6.0)
4950
nokogiri (>= 1.8.5)
50-
actionview (7.2.3)
51-
activesupport (= 7.2.3)
51+
actionview (8.1.1)
52+
activesupport (= 8.1.1)
5253
builder (~> 3.1)
53-
cgi
5454
erubi (~> 1.11)
5555
rails-dom-testing (~> 2.2)
5656
rails-html-sanitizer (~> 1.6)
57-
activejob (7.2.3)
58-
activesupport (= 7.2.3)
57+
activejob (8.1.1)
58+
activesupport (= 8.1.1)
5959
globalid (>= 0.3.6)
60-
activemodel (7.2.3)
61-
activesupport (= 7.2.3)
62-
activerecord (7.2.3)
63-
activemodel (= 7.2.3)
64-
activesupport (= 7.2.3)
60+
activemodel (8.1.1)
61+
activesupport (= 8.1.1)
62+
activerecord (8.1.1)
63+
activemodel (= 8.1.1)
64+
activesupport (= 8.1.1)
6565
timeout (>= 0.4.0)
66-
activestorage (7.2.3)
67-
actionpack (= 7.2.3)
68-
activejob (= 7.2.3)
69-
activerecord (= 7.2.3)
70-
activesupport (= 7.2.3)
66+
activestorage (8.1.1)
67+
actionpack (= 8.1.1)
68+
activejob (= 8.1.1)
69+
activerecord (= 8.1.1)
70+
activesupport (= 8.1.1)
7171
marcel (~> 1.0)
72-
activesupport (7.2.3)
72+
activesupport (8.1.1)
7373
base64
74-
benchmark (>= 0.3)
7574
bigdecimal
7675
concurrent-ruby (~> 1.0, >= 1.3.1)
7776
connection_pool (>= 2.2.5)
7877
drb
7978
i18n (>= 1.6, < 2)
79+
json
8080
logger (>= 1.4.2)
8181
minitest (>= 5.1)
8282
securerandom (>= 0.3)
8383
tzinfo (~> 2.0, >= 2.0.5)
84+
uri (>= 0.13.1)
8485
addressable (2.8.8)
8586
public_suffix (>= 2.0.2, < 8.0)
8687
airbrussh (1.5.3)
@@ -111,11 +112,10 @@ GEM
111112
base64 (0.3.0)
112113
bcrypt (3.1.20)
113114
bcrypt_pbkdf (1.1.1)
114-
benchmark (0.5.0)
115115
benchmark-ips (2.14.0)
116-
better_html (2.1.1)
117-
actionview (>= 6.0)
118-
activesupport (>= 6.0)
116+
better_html (2.2.0)
117+
actionview (>= 7.0)
118+
activesupport (>= 7.0)
119119
ast (~> 2.0)
120120
erubi (~> 1.4)
121121
parser (>= 2.4)
@@ -134,7 +134,7 @@ GEM
134134
blacklight (>= 7.18, < 9)
135135
deprecation
136136
rails (>= 7.1, < 9)
137-
blacklight-marc (8.1.4)
137+
blacklight-marc (8.2.0)
138138
blacklight (>= 7.11, < 9)
139139
library_stdnums
140140
marc (>= 0.4.3, < 2.0)
@@ -175,7 +175,6 @@ GEM
175175
rack-test (>= 0.6.3)
176176
regexp_parser (>= 1.5, < 3.0)
177177
xpath (~> 3.2)
178-
cgi (0.5.1)
179178
chronic (0.10.2)
180179
citeproc (1.1.0)
181180
date
@@ -218,10 +217,10 @@ GEM
218217
sprockets (> 3.0)
219218
sprockets-rails
220219
tilt
221-
datadog (2.17.0)
220+
datadog (2.21.0)
222221
datadog-ruby_core_source (~> 3.4, >= 3.4.1)
223222
libdatadog (~> 18.1.0.1.0)
224-
libddwaf (~> 1.22.0.0.2)
223+
libddwaf (~> 1.24.1.2.1)
225224
logger
226225
msgpack
227226
datadog-ruby_core_source (3.4.1)
@@ -361,7 +360,7 @@ GEM
361360
actionview (>= 7.0.0)
362361
activesupport (>= 7.0.0)
363362
jquery-datatables (1.10.20)
364-
jquery-rails (4.6.0)
363+
jquery-rails (4.6.1)
365364
rails-dom-testing (>= 1, < 3)
366365
railties (>= 4.2.0)
367366
thor (>= 0.14, < 2.0)
@@ -389,13 +388,11 @@ GEM
389388
libdatadog (18.1.0.1.0)
390389
libdatadog (18.1.0.1.0-aarch64-linux)
391390
libdatadog (18.1.0.1.0-x86_64-linux)
392-
libddwaf (1.22.0.0.2)
391+
libddwaf (1.24.1.2.1)
393392
ffi (~> 1.0)
394-
libddwaf (1.22.0.0.2-aarch64-linux)
393+
libddwaf (1.24.1.2.1-aarch64-linux)
395394
ffi (~> 1.0)
396-
libddwaf (1.22.0.0.2-x86_64-linux)
397-
ffi (~> 1.0)
398-
libddwaf (1.22.0.0.2-x86_64-linux-musl)
395+
libddwaf (1.24.1.2.1-x86_64-linux)
399396
ffi (~> 1.0)
400397
library_stdnums (1.6.0)
401398
lint_roller (1.1.0)
@@ -472,7 +469,7 @@ GEM
472469
addressable (~> 2.8)
473470
nokogiri (~> 1.12)
474471
omniauth (~> 2.1)
475-
omniauth-rails_csrf_protection (1.0.2)
472+
omniauth-rails_csrf_protection (2.0.1)
476473
actionpack (>= 4.2)
477474
omniauth (~> 2.0)
478475
open-uri (0.5.0)
@@ -519,20 +516,20 @@ GEM
519516
rack (>= 1.3)
520517
rackup (2.3.1)
521518
rack (>= 3)
522-
rails (7.2.3)
523-
actioncable (= 7.2.3)
524-
actionmailbox (= 7.2.3)
525-
actionmailer (= 7.2.3)
526-
actionpack (= 7.2.3)
527-
actiontext (= 7.2.3)
528-
actionview (= 7.2.3)
529-
activejob (= 7.2.3)
530-
activemodel (= 7.2.3)
531-
activerecord (= 7.2.3)
532-
activestorage (= 7.2.3)
533-
activesupport (= 7.2.3)
519+
rails (8.1.1)
520+
actioncable (= 8.1.1)
521+
actionmailbox (= 8.1.1)
522+
actionmailer (= 8.1.1)
523+
actionpack (= 8.1.1)
524+
actiontext (= 8.1.1)
525+
actionview (= 8.1.1)
526+
activejob (= 8.1.1)
527+
activemodel (= 8.1.1)
528+
activerecord (= 8.1.1)
529+
activestorage (= 8.1.1)
530+
activesupport (= 8.1.1)
534531
bundler (>= 1.15.0)
535-
railties (= 7.2.3)
532+
railties (= 8.1.1)
536533
rails-controller-testing (1.0.5)
537534
actionpack (>= 5.0.1.rc1)
538535
actionview (>= 5.0.1.rc1)
@@ -544,10 +541,9 @@ GEM
544541
rails-html-sanitizer (1.6.2)
545542
loofah (~> 2.21)
546543
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
547-
railties (7.2.3)
548-
actionpack (= 7.2.3)
549-
activesupport (= 7.2.3)
550-
cgi
544+
railties (8.1.1)
545+
actionpack (= 8.1.1)
546+
activesupport (= 8.1.1)
551547
irb (~> 1.13)
552548
rackup (>= 1.0.0)
553549
rake (>= 12.2)
@@ -576,9 +572,9 @@ GEM
576572
io-console (~> 0.5)
577573
request_store (1.7.0)
578574
rack (>= 1.4)
579-
responders (3.1.1)
580-
actionpack (>= 5.2)
581-
railties (>= 5.2)
575+
responders (3.2.0)
576+
actionpack (>= 7.0)
577+
railties (>= 7.0)
582578
rexml (3.4.4)
583579
rsolr (2.6.0)
584580
builder (>= 2.1.2)
@@ -620,7 +616,7 @@ GEM
620616
lint_roller (~> 1.1)
621617
rubocop (>= 1.75.0, < 2.0)
622618
rubocop-ast (>= 1.47.1, < 2.0)
623-
rubocop-rails (2.32.0)
619+
rubocop-rails (2.34.2)
624620
activesupport (>= 4.2.0)
625621
lint_roller (~> 1.1)
626622
rack (>= 1.1)
@@ -850,7 +846,7 @@ DEPENDENCIES
850846
puma (~> 6.4)
851847
rack-attack
852848
rack-mini-profiler
853-
rails (~> 7.2.2)
849+
rails (~> 8.1.1)
854850
rails-controller-testing
855851
rake
856852
redis

app/controllers/contact_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def question
77

88
render "question_success"
99
else
10-
render partial: "catalog/ask_a_question_form", locals: { form: @form }, status: :unprocessable_entity
10+
render partial: "catalog/ask_a_question_form", locals: { form: @form }, status: :unprocessable_content
1111
end
1212
end
1313

@@ -18,7 +18,7 @@ def suggestion
1818

1919
render "suggestion_success"
2020
else
21-
render partial: "catalog/suggest_correction_form", locals: { form: @form }, status: :unprocessable_entity
21+
render partial: "catalog/suggest_correction_form", locals: { form: @form }, status: :unprocessable_content
2222
end
2323
end
2424

@@ -29,7 +29,7 @@ def report_biased_results
2929

3030
render "report_biased_results_success"
3131
else
32-
render partial: "catalog/report_biased_results_form", locals: { form: @form }, status: :unprocessable_entity
32+
render partial: "catalog/report_biased_results_form", locals: { form: @form }, status: :unprocessable_content
3333
end
3434
end
3535

app/controllers/feedback_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def build_feedback_form
4040
end
4141

4242
def feedback_form_params
43-
params.require(:feedback_form).permit(:name, :email, :message, :current_url, :feedback_desc)
43+
params.expect(feedback_form: %i[name email message current_url feedback_desc])
4444
end
4545

4646
def build_ask_a_question_form
@@ -51,7 +51,7 @@ def build_ask_a_question_form
5151
end
5252

5353
def question_form_params
54-
params.require(:ask_a_question_form).permit(:id, :title)
54+
params.expect(ask_a_question_form: %i[id title])
5555
end
5656

5757
def build_suggest_correction_form
@@ -62,7 +62,7 @@ def build_suggest_correction_form
6262
end
6363

6464
def suggest_correction_form_params
65-
params.require(:suggest_correction_form).permit(:id, :title)
65+
params.expect(suggest_correction_form: %i[id title])
6666
end
6767

6868
def build_report_biased_results_form
@@ -72,7 +72,7 @@ def build_report_biased_results_form
7272
end
7373

7474
def biased_results_params
75-
params.require(:report_biased_results_form).permit(:context)
75+
params.expect(report_biased_results_form: [:context])
7676
end
7777

7878
def search_results_url(biased_params)

app/controllers/orangelight/browsables_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def populate_search_results
7979
return if query_param.nil?
8080
# 'subject_facet' is the default vocabulary type if there is no vocabulary type specified
8181
search_result = if vocabulary_search_on_facet == 'subject_facet'
82-
model_param.where('sort <= ?', search_term).order('sort').last
82+
model_param.where('sort <= ?', search_term).order(:sort).last
8383
else
8484
model_param.where(sort: search_term).where(vocabulary: vocabulary_search_on_facet).first
8585
end
@@ -253,6 +253,6 @@ def set_orangelight_browsable
253253

254254
# Never trust parameters from the scary internet; run the params we receive through an allowlist
255255
def orangelight_browsable_params
256-
params.require(:orangelight_browsable).permit(:model, :id)
256+
params.expect(orangelight_browsable: %i[model id])
257257
end
258258
end

app/models/solr_document.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def solr_document_id
180180
end
181181

182182
def host_id
183-
self["contained_in_s"].reject(&:empty?) if self["contained_in_s"].present?
183+
self["contained_in_s"].presence&.reject(&:empty?)
184184
end
185185

186186
def bound_with?
@@ -225,7 +225,7 @@ def holdings_all_display
225225

226226
holdings.each do |k, _val|
227227
# append the solr document id in each holding
228-
holdings[k].merge!("mms_id" => solr_document_id) if holdings[k].present?
228+
holdings[k].presence&.merge!("mms_id" => solr_document_id)
229229
end
230230
return holdings if host_id.blank?
231231
# Append the host_id in the host_holdings

0 commit comments

Comments
 (0)