Skip to content

Commit 7028b37

Browse files
authored
Merge pull request #237 from MITLibraries/timx-565-depupdates
Rails 7.2.x and Ruby 3.4.7
2 parents e39f326 + 69efe6a commit 7028b37

File tree

17 files changed

+214
-134
lines changed

17 files changed

+214
-134
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2-
ARG RUBY_VERSION=3.2.9@sha256:cb60d6c68fca2cd3e25d82cf7e31268ab490f40f85a4216bf4de617d043efac4
2+
ARG RUBY_VERSION=3.4.7
33
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.9
1+
3.4.7

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source 'https://rubygems.org'
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
ruby '3.2.9'
4+
ruby '3.4.7'
55

66
gem 'bootsnap', require: false
77
gem 'graphql'
@@ -12,7 +12,7 @@ gem 'jbuilder'
1212
gem 'mitlibraries-theme', git: 'https://github.com/mitlibraries/mitlibraries-theme', tag: 'v1.4'
1313
gem 'puma'
1414
gem 'rack-attack'
15-
gem 'rails', '~> 7.1.0'
15+
gem 'rails', '~> 7.2.0'
1616
gem 'redis'
1717
gem 'sentry-rails'
1818
gem 'sentry-ruby'

Gemfile.lock

Lines changed: 70 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -10,83 +10,77 @@ GIT
1010
GEM
1111
remote: https://rubygems.org/
1212
specs:
13-
actioncable (7.1.5.2)
14-
actionpack (= 7.1.5.2)
15-
activesupport (= 7.1.5.2)
13+
actioncable (7.2.2.2)
14+
actionpack (= 7.2.2.2)
15+
activesupport (= 7.2.2.2)
1616
nio4r (~> 2.0)
1717
websocket-driver (>= 0.6.1)
1818
zeitwerk (~> 2.6)
19-
actionmailbox (7.1.5.2)
20-
actionpack (= 7.1.5.2)
21-
activejob (= 7.1.5.2)
22-
activerecord (= 7.1.5.2)
23-
activestorage (= 7.1.5.2)
24-
activesupport (= 7.1.5.2)
25-
mail (>= 2.7.1)
26-
net-imap
27-
net-pop
28-
net-smtp
29-
actionmailer (7.1.5.2)
30-
actionpack (= 7.1.5.2)
31-
actionview (= 7.1.5.2)
32-
activejob (= 7.1.5.2)
33-
activesupport (= 7.1.5.2)
34-
mail (~> 2.5, >= 2.5.4)
35-
net-imap
36-
net-pop
37-
net-smtp
19+
actionmailbox (7.2.2.2)
20+
actionpack (= 7.2.2.2)
21+
activejob (= 7.2.2.2)
22+
activerecord (= 7.2.2.2)
23+
activestorage (= 7.2.2.2)
24+
activesupport (= 7.2.2.2)
25+
mail (>= 2.8.0)
26+
actionmailer (7.2.2.2)
27+
actionpack (= 7.2.2.2)
28+
actionview (= 7.2.2.2)
29+
activejob (= 7.2.2.2)
30+
activesupport (= 7.2.2.2)
31+
mail (>= 2.8.0)
3832
rails-dom-testing (~> 2.2)
39-
actionpack (7.1.5.2)
40-
actionview (= 7.1.5.2)
41-
activesupport (= 7.1.5.2)
33+
actionpack (7.2.2.2)
34+
actionview (= 7.2.2.2)
35+
activesupport (= 7.2.2.2)
4236
nokogiri (>= 1.8.5)
4337
racc
44-
rack (>= 2.2.4)
38+
rack (>= 2.2.4, < 3.2)
4539
rack-session (>= 1.0.1)
4640
rack-test (>= 0.6.3)
4741
rails-dom-testing (~> 2.2)
4842
rails-html-sanitizer (~> 1.6)
49-
actiontext (7.1.5.2)
50-
actionpack (= 7.1.5.2)
51-
activerecord (= 7.1.5.2)
52-
activestorage (= 7.1.5.2)
53-
activesupport (= 7.1.5.2)
43+
useragent (~> 0.16)
44+
actiontext (7.2.2.2)
45+
actionpack (= 7.2.2.2)
46+
activerecord (= 7.2.2.2)
47+
activestorage (= 7.2.2.2)
48+
activesupport (= 7.2.2.2)
5449
globalid (>= 0.6.0)
5550
nokogiri (>= 1.8.5)
56-
actionview (7.1.5.2)
57-
activesupport (= 7.1.5.2)
51+
actionview (7.2.2.2)
52+
activesupport (= 7.2.2.2)
5853
builder (~> 3.1)
5954
erubi (~> 1.11)
6055
rails-dom-testing (~> 2.2)
6156
rails-html-sanitizer (~> 1.6)
62-
activejob (7.1.5.2)
63-
activesupport (= 7.1.5.2)
57+
activejob (7.2.2.2)
58+
activesupport (= 7.2.2.2)
6459
globalid (>= 0.3.6)
65-
activemodel (7.1.5.2)
66-
activesupport (= 7.1.5.2)
67-
activerecord (7.1.5.2)
68-
activemodel (= 7.1.5.2)
69-
activesupport (= 7.1.5.2)
60+
activemodel (7.2.2.2)
61+
activesupport (= 7.2.2.2)
62+
activerecord (7.2.2.2)
63+
activemodel (= 7.2.2.2)
64+
activesupport (= 7.2.2.2)
7065
timeout (>= 0.4.0)
71-
activestorage (7.1.5.2)
72-
actionpack (= 7.1.5.2)
73-
activejob (= 7.1.5.2)
74-
activerecord (= 7.1.5.2)
75-
activesupport (= 7.1.5.2)
66+
activestorage (7.2.2.2)
67+
actionpack (= 7.2.2.2)
68+
activejob (= 7.2.2.2)
69+
activerecord (= 7.2.2.2)
70+
activesupport (= 7.2.2.2)
7671
marcel (~> 1.0)
77-
activesupport (7.1.5.2)
72+
activesupport (7.2.2.2)
7873
base64
7974
benchmark (>= 0.3)
8075
bigdecimal
81-
concurrent-ruby (~> 1.0, >= 1.0.2)
76+
concurrent-ruby (~> 1.0, >= 1.3.1)
8277
connection_pool (>= 2.2.5)
8378
drb
8479
i18n (>= 1.6, < 2)
8580
logger (>= 1.4.2)
8681
minitest (>= 5.1)
87-
mutex_m
8882
securerandom (>= 0.3)
89-
tzinfo (~> 2.0)
83+
tzinfo (~> 2.0, >= 2.0.5)
9084
addressable (2.8.7)
9185
public_suffix (>= 2.0.2, < 7.0)
9286
annotate (3.2.0)
@@ -100,7 +94,7 @@ GEM
10094
erubi (>= 1.0.0)
10195
rack (>= 0.9.0)
10296
rouge (>= 1.0.0)
103-
bigdecimal (3.3.0)
97+
bigdecimal (3.3.1)
10498
bindex (0.8.1)
10599
binding_of_caller (1.0.1)
106100
debug_inspector (>= 1.2.0)
@@ -116,7 +110,6 @@ GEM
116110
rack-test (>= 0.6.3)
117111
regexp_parser (>= 1.5, < 3.0)
118112
xpath (~> 3.2)
119-
cgi (0.5.0)
120113
climate_control (1.2.0)
121114
concurrent-ruby (1.3.5)
122115
connection_pool (2.5.4)
@@ -136,8 +129,7 @@ GEM
136129
dotenv (= 3.1.8)
137130
railties (>= 6.1)
138131
drb (2.2.3)
139-
erb (2.2.3)
140-
cgi
132+
erb (5.0.3)
141133
erubi (1.13.1)
142134
ffi (1.17.2-aarch64-linux-gnu)
143135
ffi (1.17.2-arm64-darwin)
@@ -150,7 +142,7 @@ GEM
150142
flipflop (2.8.0)
151143
activesupport (>= 4.0)
152144
terminal-table (>= 1.8)
153-
globalid (1.2.1)
145+
globalid (1.3.0)
154146
activesupport (>= 6.1)
155147
graphql (2.5.14)
156148
base64
@@ -197,7 +189,7 @@ GEM
197189
net-imap
198190
net-pop
199191
net-smtp
200-
marcel (1.0.4)
192+
marcel (1.1.0)
201193
matrix (0.4.2)
202194
mini_mime (1.1.5)
203195
minitest (5.26.0)
@@ -209,7 +201,6 @@ GEM
209201
mocha (2.7.1)
210202
ruby2_keywords (>= 0.0.5)
211203
msgpack (1.8.0)
212-
mutex_m (0.3.0)
213204
net-imap (0.5.12)
214205
date
215206
net-protocol
@@ -244,10 +235,10 @@ GEM
244235
date
245236
stringio
246237
public_suffix (6.0.2)
247-
puma (6.6.1)
238+
puma (7.0.4)
248239
nio4r (~> 2.0)
249240
racc (1.8.1)
250-
rack (3.2.2)
241+
rack (3.1.18)
251242
rack-attack (6.7.0)
252243
rack (>= 1.0, < 4)
253244
rack-session (2.1.1)
@@ -257,31 +248,31 @@ GEM
257248
rack (>= 1.3)
258249
rackup (2.2.1)
259250
rack (>= 3)
260-
rails (7.1.5.2)
261-
actioncable (= 7.1.5.2)
262-
actionmailbox (= 7.1.5.2)
263-
actionmailer (= 7.1.5.2)
264-
actionpack (= 7.1.5.2)
265-
actiontext (= 7.1.5.2)
266-
actionview (= 7.1.5.2)
267-
activejob (= 7.1.5.2)
268-
activemodel (= 7.1.5.2)
269-
activerecord (= 7.1.5.2)
270-
activestorage (= 7.1.5.2)
271-
activesupport (= 7.1.5.2)
251+
rails (7.2.2.2)
252+
actioncable (= 7.2.2.2)
253+
actionmailbox (= 7.2.2.2)
254+
actionmailer (= 7.2.2.2)
255+
actionpack (= 7.2.2.2)
256+
actiontext (= 7.2.2.2)
257+
actionview (= 7.2.2.2)
258+
activejob (= 7.2.2.2)
259+
activemodel (= 7.2.2.2)
260+
activerecord (= 7.2.2.2)
261+
activestorage (= 7.2.2.2)
262+
activesupport (= 7.2.2.2)
272263
bundler (>= 1.15.0)
273-
railties (= 7.1.5.2)
264+
railties (= 7.2.2.2)
274265
rails-dom-testing (2.3.0)
275266
activesupport (>= 5.0.0)
276267
minitest
277268
nokogiri (>= 1.6)
278269
rails-html-sanitizer (1.6.2)
279270
loofah (~> 2.21)
280271
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)
281-
railties (7.1.5.2)
282-
actionpack (= 7.1.5.2)
283-
activesupport (= 7.1.5.2)
284-
irb
272+
railties (7.2.2.2)
273+
actionpack (= 7.2.2.2)
274+
activesupport (= 7.2.2.2)
275+
irb (~> 1.13)
285276
rackup (>= 1.0.0)
286277
rake (>= 12.2)
287278
thor (~> 1.0, >= 1.2.2)
@@ -382,6 +373,7 @@ GEM
382373
unicode-display_width (3.2.0)
383374
unicode-emoji (~> 4.1)
384375
unicode-emoji (4.1.0)
376+
useragent (0.16.11)
385377
vcr (6.3.1)
386378
base64
387379
web-console (4.2.1)
@@ -394,7 +386,7 @@ GEM
394386
crack (>= 0.3.2)
395387
hashdiff (>= 0.4.0, < 2.0.0)
396388
websocket (1.2.11)
397-
websocket-driver (0.7.7)
389+
websocket-driver (0.8.0)
398390
base64
399391
websocket-extensions (>= 0.1.0)
400392
websocket-extensions (0.1.5)
@@ -434,7 +426,7 @@ DEPENDENCIES
434426
pg
435427
puma
436428
rack-attack
437-
rails (~> 7.1.0)
429+
rails (~> 7.2.0)
438430
redis
439431
rubocop
440432
rubocop-rails
@@ -453,7 +445,7 @@ DEPENDENCIES
453445
webmock
454446

455447
RUBY VERSION
456-
ruby 3.2.9p265
448+
ruby 3.4.7p58
457449

458450
BUNDLED WITH
459451
2.4.19

bin/rubocop

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
# explicit rubocop config increases performance slightly while avoiding config confusion.
6+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7+
8+
load Gem.bin_path("rubocop", "rubocop")

bin/setup

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
33

4-
# path to your application root.
54
APP_ROOT = File.expand_path("..", __dir__)
5+
APP_NAME = "timdex-ui"
66

77
def system!(*args)
88
system(*args, exception: true)
@@ -30,4 +30,8 @@ FileUtils.chdir APP_ROOT do
3030

3131
puts "\n== Restarting application server =="
3232
system! "bin/rails restart"
33+
34+
# puts "\n== Configuring puma-dev =="
35+
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
36+
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
3337
end

config/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Application < Rails::Application
2020
config.flipflop.raise_strategy_errors = nil
2121

2222
# Initialize configuration defaults for originally generated Rails version.
23-
config.load_defaults 7.1
23+
config.load_defaults 7.2
2424

2525
# Enable asset pipeline
2626
config.assets.enabled = true
@@ -29,7 +29,7 @@ class Application < Rails::Application
2929
# Please, add to the `ignore` list any other `lib` subdirectories that do
3030
# not contain `.rb` files, or that should not be reloaded or eager loaded.
3131
# Common ones are `templates`, `generators`, or `middleware`, for example.
32-
config.autoload_lib(ignore: %w(assets tasks))
32+
config.autoload_lib(ignore: %w[assets tasks])
3333

3434
# Configuration for the application, engines, and railties goes here.
3535
#

config/environments/development.rb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Show full error reports.
2323
config.consider_all_requests_local = true
2424

25-
# Enable server timing
25+
# Enable server timing.
2626
config.server_timing = true
2727

2828
# Enable/disable caching. By default caching is disabled.
@@ -32,9 +32,7 @@
3232
config.action_controller.enable_fragment_cache_logging = true
3333

3434
config.cache_store = :memory_store
35-
config.public_file_server.headers = {
36-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
37-
}
35+
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
3836
else
3937
config.action_controller.perform_caching = false
4038

@@ -47,8 +45,12 @@
4745
# Don't care if the mailer can't send.
4846
config.action_mailer.raise_delivery_errors = false
4947

48+
# Disable caching for Action Mailer templates even if Action Controller
49+
# caching is enabled.
5050
config.action_mailer.perform_caching = false
5151

52+
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
53+
5254
# Print deprecation notices to the Rails logger.
5355
config.active_support.deprecation = :log
5456

@@ -74,11 +76,14 @@
7476
# config.i18n.raise_on_missing_translations = true
7577

7678
# Annotate rendered view with file names.
77-
# config.action_view.annotate_rendered_view_with_filenames = true
79+
config.action_view.annotate_rendered_view_with_filenames = true
7880

7981
# Uncomment if you wish to allow Action Cable access from any origin.
8082
# config.action_cable.disable_request_forgery_protection = true
8183

82-
# Raise error when a before_action's only/except options reference missing actions
84+
# Raise error when a before_action's only/except options reference missing actions.
8385
config.action_controller.raise_on_missing_callback_actions = true
86+
87+
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
88+
# config.generators.apply_rubocop_autocorrect_after_generate!
8489
end

0 commit comments

Comments
 (0)