Skip to content

Commit 041e373

Browse files
committed
downgrade rack to 2.x
Signed-off-by: Andrew Fader <[email protected]>
1 parent 3842206 commit 041e373

File tree

4 files changed

+110
-96
lines changed

4 files changed

+110
-96
lines changed

Gemfile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ ruby File.read('.ruby-version').strip
2121
# Loading only what we use reduces memory use & attack surface.
2222
# gem 'actioncable' # Not used. Client/server comm channel.
2323
# gem 'activestorage' # Not used. Attaches cloud files to ActiveRecord.
24-
gem 'actionmailer', '~> 7.2.2' # Rails. Send email.
25-
gem 'actionpack', '~> 7.2.2' # Rails. MVC framework.
26-
gem 'actionview', '~> 7.2.2' # Rails. View.
27-
gem 'activejob', '~> 7.2.2' # Rails. Async jobs.
28-
gem 'activemodel', '~> 7.2.2' # Rails. Model basics.
29-
gem 'activerecord', '~> 7.2.2' # Rails. ORM and query system.
24+
gem 'actionmailer', '~> 8.0.1' # Rails. Send email.
25+
gem 'actionpack', '~> 8.0.1' # Rails. MVC framework.
26+
gem 'actionview', '~> 8.0.1' # Rails. View.
27+
gem 'activejob', '~> 8.0.1' # Rails. Async jobs.
28+
gem 'activemodel', '~> 8.0.1' # Rails. Model basics.
29+
gem 'activerecord', '~> 8.0.1' # Rails. ORM and query system.
3030
# gem 'activestorage' # Not used. Attaches cloud files to ActiveRecord.
31-
gem 'activesupport', '~> 7.2.2' # Rails. Underlying library.
31+
gem 'activesupport', '~> 8.0.1' # Rails. Underlying library.
3232
# gem 'activetext' # Not used. Text editor that fails to support markdown.
3333
gem 'attr_encrypted', '~> 4'
3434
gem 'bcrypt', '~> 3.1.18' # Security - for salted hashed interacted passwords
@@ -81,20 +81,21 @@ gem 'omniauth-github', '~> 2.0' # Authentication to GitHub (get project info)
8181
gem 'omniauth-rails_csrf_protection'
8282
gem 'pagy', '~> 6.0'
8383
gem 'paleta', '~> 0.3' # Color manipulation, used for badges
84-
gem 'paper_trail', '~> 15.2.0' # Record previous versions of project data
84+
gem 'paper_trail', '~> 16.0' # Record previous versions of project data
8585
gem 'pg', '~> 1.4' # PostgreSQL database, used for data storage
8686
gem 'pg_search', '~> 2.3' # PostgreSQL full-text search
8787
gem 'puma', '~> 6.5' # Faster webserver; recommended by Heroku
8888
gem 'puma_worker_killer', '~> 1.0' # Band-aid: Restart to limit memory use
89+
gem 'rack', '< 3'
8990
gem 'rack-attack', '~> 6.7' # Implement rate limiting
9091
gem 'rack-cors', '~> 2.0' # Enable CORS so JavaScript clients can get JSON
9192
gem 'rack-headers_filter', '~> 0.0.1' # Filter out "dangerous" headers
9293
# We no longer say: gem 'rails', '6.1.7.3' # Our web framework
9394
# but instead load only what we use (to reduce memory use and attack surface).
9495
# We load sprockets-rails, but its version number isn't kept in sync.
9596
# Note: Update the gem versions of action* and railties in sync.
96-
gem 'railties', '~> 7.2.2' # Rails. Rails core, loads rest of Rails
97-
gem 'rails-i18n', '~> 7.0.10' # Localizations for Rails built-ins # not 7.2.2
97+
gem 'railties', '~> 8.0.1' # Rails. Rails core, loads rest of Rails
98+
gem 'rails-i18n', '~> 8.0.1' # Localizations for Rails built-ins
9899
gem 'redcarpet', '~> 3.5' # Process markdown in form textareas (justifications)
99100
gem 'sassc-rails' # compiles .scss (css replacement) drop-in replacement for sass-rails
100101
gem 'scout_apm' # Monitor for memory leaks
@@ -151,7 +152,7 @@ group :development do
151152
# We bring in full rails in development in case we need it for debugging;
152153
# this also keeps some gems happy that don't realize that loading
153154
# only *parts* of Rails is fine:
154-
gem 'rails', '~> 7.2.2' # Rails (our web framework)
155+
gem 'rails', '~> 8.0.1' # Rails (our web framework)
155156
# To update the translation gem, see the process docs in doc/testing.md
156157
gem 'translation', '1.37' # translation.io - translation service
157158
gem 'web-console' # In-browser debugger; use <% console %> or console

Gemfile.lock

Lines changed: 85 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,65 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.2.1)
5-
actionpack (= 7.2.2.1)
6-
activesupport (= 7.2.2.1)
4+
actioncable (8.0.1)
5+
actionpack (= 8.0.1)
6+
activesupport (= 8.0.1)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.2.1)
11-
actionpack (= 7.2.2.1)
12-
activejob (= 7.2.2.1)
13-
activerecord (= 7.2.2.1)
14-
activestorage (= 7.2.2.1)
15-
activesupport (= 7.2.2.1)
10+
actionmailbox (8.0.1)
11+
actionpack (= 8.0.1)
12+
activejob (= 8.0.1)
13+
activerecord (= 8.0.1)
14+
activestorage (= 8.0.1)
15+
activesupport (= 8.0.1)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.2.1)
18-
actionpack (= 7.2.2.1)
19-
actionview (= 7.2.2.1)
20-
activejob (= 7.2.2.1)
21-
activesupport (= 7.2.2.1)
17+
actionmailer (8.0.1)
18+
actionpack (= 8.0.1)
19+
actionview (= 8.0.1)
20+
activejob (= 8.0.1)
21+
activesupport (= 8.0.1)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.2.1)
25-
actionview (= 7.2.2.1)
26-
activesupport (= 7.2.2.1)
24+
actionpack (8.0.1)
25+
actionview (= 8.0.1)
26+
activesupport (= 8.0.1)
2727
nokogiri (>= 1.8.5)
28-
racc
29-
rack (>= 2.2.4, < 3.2)
28+
rack (>= 2.2.4)
3029
rack-session (>= 1.0.1)
3130
rack-test (>= 0.6.3)
3231
rails-dom-testing (~> 2.2)
3332
rails-html-sanitizer (~> 1.6)
3433
useragent (~> 0.16)
35-
actiontext (7.2.2.1)
36-
actionpack (= 7.2.2.1)
37-
activerecord (= 7.2.2.1)
38-
activestorage (= 7.2.2.1)
39-
activesupport (= 7.2.2.1)
34+
actiontext (8.0.1)
35+
actionpack (= 8.0.1)
36+
activerecord (= 8.0.1)
37+
activestorage (= 8.0.1)
38+
activesupport (= 8.0.1)
4039
globalid (>= 0.6.0)
4140
nokogiri (>= 1.8.5)
42-
actionview (7.2.2.1)
43-
activesupport (= 7.2.2.1)
41+
actionview (8.0.1)
42+
activesupport (= 8.0.1)
4443
builder (~> 3.1)
4544
erubi (~> 1.11)
4645
rails-dom-testing (~> 2.2)
4746
rails-html-sanitizer (~> 1.6)
48-
activejob (7.2.2.1)
49-
activesupport (= 7.2.2.1)
47+
activejob (8.0.1)
48+
activesupport (= 8.0.1)
5049
globalid (>= 0.3.6)
51-
activemodel (7.2.2.1)
52-
activesupport (= 7.2.2.1)
53-
activerecord (7.2.2.1)
54-
activemodel (= 7.2.2.1)
55-
activesupport (= 7.2.2.1)
50+
activemodel (8.0.1)
51+
activesupport (= 8.0.1)
52+
activerecord (8.0.1)
53+
activemodel (= 8.0.1)
54+
activesupport (= 8.0.1)
5655
timeout (>= 0.4.0)
57-
activestorage (7.2.2.1)
58-
actionpack (= 7.2.2.1)
59-
activejob (= 7.2.2.1)
60-
activerecord (= 7.2.2.1)
61-
activesupport (= 7.2.2.1)
56+
activestorage (8.0.1)
57+
actionpack (= 8.0.1)
58+
activejob (= 8.0.1)
59+
activerecord (= 8.0.1)
60+
activesupport (= 8.0.1)
6261
marcel (~> 1.0)
63-
activesupport (7.2.2.1)
62+
activesupport (8.0.1)
6463
base64
6564
benchmark (>= 0.3)
6665
bigdecimal
@@ -72,6 +71,7 @@ GEM
7271
minitest (>= 5.1)
7372
securerandom (>= 0.3)
7473
tzinfo (~> 2.0, >= 2.0.5)
74+
uri (>= 0.13.1)
7575
addressable (2.8.7)
7676
public_suffix (>= 2.0.2, < 7.0)
7777
ansi (1.5.0)
@@ -264,7 +264,7 @@ GEM
264264
bigdecimal (~> 3.1)
265265
net-http (0.6.0)
266266
uri
267-
net-imap (0.5.3)
267+
net-imap (0.5.4)
268268
date
269269
net-protocol
270270
net-pop (0.1.2)
@@ -311,7 +311,7 @@ GEM
311311
omniauth (~> 2.0)
312312
pagy (6.5.0)
313313
paleta (0.3.0)
314-
paper_trail (15.2.0)
314+
paper_trail (16.0.0)
315315
activerecord (>= 6.1)
316316
request_store (~> 1.4)
317317
parallel (1.26.3)
@@ -359,37 +359,37 @@ GEM
359359
get_process_mem (>= 0.2)
360360
puma (>= 2.7)
361361
racc (1.8.1)
362-
rack (3.1.8)
362+
rack (2.2.10)
363363
rack-attack (6.7.0)
364364
rack (>= 1.0, < 4)
365365
rack-cors (2.0.2)
366366
rack (>= 2.0.0)
367367
rack-headers_filter (0.0.1)
368-
rack-protection (4.1.1)
368+
rack-protection (3.2.0)
369369
base64 (>= 0.1.0)
370-
logger (>= 1.6.0)
371-
rack (>= 3.0.0, < 4)
372-
rack-session (2.0.0)
373-
rack (>= 3.0.0)
374-
rack-test (2.1.0)
370+
rack (~> 2.2, >= 2.2.4)
371+
rack-session (1.0.2)
372+
rack (< 3)
373+
rack-test (2.2.0)
375374
rack (>= 1.3)
376375
rack-timeout (0.7.0)
377-
rackup (2.2.1)
378-
rack (>= 3)
379-
rails (7.2.2.1)
380-
actioncable (= 7.2.2.1)
381-
actionmailbox (= 7.2.2.1)
382-
actionmailer (= 7.2.2.1)
383-
actionpack (= 7.2.2.1)
384-
actiontext (= 7.2.2.1)
385-
actionview (= 7.2.2.1)
386-
activejob (= 7.2.2.1)
387-
activemodel (= 7.2.2.1)
388-
activerecord (= 7.2.2.1)
389-
activestorage (= 7.2.2.1)
390-
activesupport (= 7.2.2.1)
376+
rackup (1.0.1)
377+
rack (< 3)
378+
webrick
379+
rails (8.0.1)
380+
actioncable (= 8.0.1)
381+
actionmailbox (= 8.0.1)
382+
actionmailer (= 8.0.1)
383+
actionpack (= 8.0.1)
384+
actiontext (= 8.0.1)
385+
actionview (= 8.0.1)
386+
activejob (= 8.0.1)
387+
activemodel (= 8.0.1)
388+
activerecord (= 8.0.1)
389+
activestorage (= 8.0.1)
390+
activesupport (= 8.0.1)
391391
bundler (>= 1.15.0)
392-
railties (= 7.2.2.1)
392+
railties (= 8.0.1)
393393
rails-controller-testing (1.0.5)
394394
actionpack (>= 5.0.1.rc1)
395395
actionview (>= 5.0.1.rc1)
@@ -401,9 +401,9 @@ GEM
401401
rails-html-sanitizer (1.6.2)
402402
loofah (~> 2.21)
403403
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)
404-
rails-i18n (7.0.10)
404+
rails-i18n (8.0.1)
405405
i18n (>= 0.7, < 2)
406-
railties (>= 6.0.0, < 8)
406+
railties (>= 8.0.0, < 9)
407407
rails_12factor (0.0.3)
408408
rails_serve_static_assets
409409
rails_stdout_logging
@@ -417,9 +417,9 @@ GEM
417417
ruby-progressbar
418418
rails_serve_static_assets (0.0.5)
419419
rails_stdout_logging (0.0.5)
420-
railties (7.2.2.1)
421-
actionpack (= 7.2.2.1)
422-
activesupport (= 7.2.2.1)
420+
railties (8.0.1)
421+
actionpack (= 8.0.1)
422+
activesupport (= 8.0.1)
423423
irb (~> 1.13)
424424
rackup (>= 1.0.0)
425425
rake (>= 12.2)
@@ -509,8 +509,7 @@ GEM
509509
activesupport (>= 6.1)
510510
sprockets (>= 3.0.0)
511511
stringio (3.1.2)
512-
terminal-table (3.0.2)
513-
unicode-display_width (>= 1.1.1, < 3)
512+
terminal-table (1.6.0)
514513
text (1.3.1)
515514
thor (1.3.2)
516515
tilt (2.5.0)
@@ -522,7 +521,9 @@ GEM
522521
concurrent-ruby (~> 1.0)
523522
uglifier (4.2.1)
524523
execjs (>= 0.3.0, < 3)
525-
unicode-display_width (2.6.0)
524+
unicode-display_width (3.1.2)
525+
unicode-emoji (~> 4.0, >= 4.0.4)
526+
unicode-emoji (4.0.4)
526527
uniform_notifier (1.16.0)
527528
uri (1.0.2)
528529
useragent (0.16.11)
@@ -537,6 +538,7 @@ GEM
537538
addressable (>= 2.8.0)
538539
crack (>= 0.3.2)
539540
hashdiff (>= 0.4.0, < 2.0.0)
541+
webrick (1.9.1)
540542
websocket (1.2.11)
541543
websocket-driver (0.7.6)
542544
websocket-extensions (>= 0.1.0)
@@ -565,13 +567,13 @@ PLATFORMS
565567
x86_64-linux-musl
566568

567569
DEPENDENCIES
568-
actionmailer (~> 7.2.2)
569-
actionpack (~> 7.2.2)
570-
actionview (~> 7.2.2)
571-
activejob (~> 7.2.2)
572-
activemodel (~> 7.2.2)
573-
activerecord (~> 7.2.2)
574-
activesupport (~> 7.2.2)
570+
actionmailer (~> 8.0.1)
571+
actionpack (~> 8.0.1)
572+
actionview (~> 8.0.1)
573+
activejob (~> 8.0.1)
574+
activemodel (~> 8.0.1)
575+
activerecord (~> 8.0.1)
576+
activesupport (~> 8.0.1)
575577
attr_encrypted (~> 4)
576578
awesome_print
577579
bcrypt (~> 3.1.18)
@@ -607,7 +609,7 @@ DEPENDENCIES
607609
omniauth-rails_csrf_protection
608610
pagy (~> 6.0)
609611
paleta (~> 0.3)
610-
paper_trail (~> 15.2.0)
612+
paper_trail (~> 16.0)
611613
pg (~> 1.4)
612614
pg_search (~> 2.3)
613615
pronto (~> 0.11)
@@ -617,15 +619,16 @@ DEPENDENCIES
617619
pry-byebug
618620
puma (~> 6.5)
619621
puma_worker_killer (~> 1.0)
622+
rack (< 3)
620623
rack-attack (~> 6.7)
621624
rack-cors (~> 2.0)
622625
rack-headers_filter (~> 0.0.1)
623626
rack-timeout (~> 0.7.0)
624-
rails (~> 7.2.2)
627+
rails (~> 8.0.1)
625628
rails-controller-testing (~> 1.0)
626-
rails-i18n (~> 7.0.10)
629+
rails-i18n (~> 8.0.1)
627630
rails_12factor (~> 0.0.3)
628-
railties (~> 7.2.2)
631+
railties (~> 8.0.1)
629632
redcarpet (~> 3.5)
630633
rubocop (~> 1.6)
631634
rubocop-performance (~> 1.20)

config/application.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class Application < Rails::Application
2929
end
3030

3131
# Prepare for future deprecation.
32-
# to_time will always preserve the timezone offset of the receiver in Rails 8.0.
33-
# This opts into the new 8.0 behavior
32+
# to_time will always preserve the full timezone rather than the
33+
# offset of the receiver in Rails 8.1.
34+
# This opts into the new 8.1 behavior.
35+
# In our case it doesn't matter, the only timezone we use is UTC.
3436

35-
ActiveSupport.to_time_preserves_timezone = true
37+
ActiveSupport.to_time_preserves_timezone = :zone

config/environment.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,13 @@
77
# Load the Rails application.
88
require_relative 'application'
99

10+
# Eliminate deprecation warning that
11+
# > `to_time` will always preserve the receiver timezone rather than
12+
# > system local time in Rails 8.1. To opt in to the new behavior,
13+
# > set `config.active_support.to_time_preserves_timezone = :zone`
14+
# In practice we only use UTC in operational systems anyway.
15+
16+
Rails.configuration.active_support.to_time_preserves_timezone = :zone
17+
1018
# Initialize the Rails application.
1119
Rails.application.initialize!

0 commit comments

Comments
 (0)