Skip to content

Commit 9cb06da

Browse files
authored
Merge pull request #13258 from colinux/rails-8-upgrade
Tech: migration Rails 7.2 → 8.0
2 parents 7ed63e7 + 513edd9 commit 9cb06da

19 files changed

Lines changed: 2323 additions & 152 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
path: tmp/rspec_${{ github.job }}_${{ strategy.job-index }}.junit.xml
106106

107107
- name: Upload coverage to Codecov
108-
uses: codecov/codecov-action@v4
108+
uses: codecov/codecov-action@v7
109109
env:
110110
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
111111

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,12 @@ Rails/SquishedSQLHeredocs:
955955
Rails/StripHeredoc:
956956
Enabled: true
957957

958+
# Activated by Rails 8 (params.expect). Migrating require/permit to params.expect
959+
# is a behavior change (raises on malformed params instead of filtering) and the
960+
# autocorrect is unsafe: deferred to a dedicated PR.
961+
Rails/StrongParametersExpect:
962+
Enabled: false
963+
958964
Rails/ThreeStateBooleanColumn:
959965
Enabled: true
960966
Exclude:

Gemfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source 'https://rubygems.org'
44

5-
gem 'rails', '~> 7.2.3' # allows update to security fixes at any time
5+
gem 'rails', '~> 8.0.3' # allows update to security fixes at any time
66

77
gem 'aasm'
88
gem 'active_model_serializers'
@@ -20,8 +20,6 @@ gem 'browser'
2020
gem 'charlock_holmes'
2121
gem 'chartkick'
2222
gem 'clamav-client', require: 'clamav/client'
23-
gem "concurrent-ruby", "< 1.3.5" # force version to avoid https://github.com/rails/rails/pull/54264, should be removed after rails 7.2.x
24-
gem 'connection_pool', '< 3' # connection_pool 3.0 changed initialize signature, incompatible with activesupport 7.2 RedisCacheStore
2523
gem 'daemons'
2624
gem 'deep_cloneable' # Enable deep clone of active record models
2725
gem 'delayed_cron_job', require: false # Cron jobs
@@ -64,6 +62,7 @@ gem 'langchainrb'
6462
gem 'listen' # Required by ActiveSupport::EventedFileUpdateChecker
6563
gem 'lograge'
6664
gem 'logstash-event'
65+
gem 'mail', '~> 2.8.1' # pin to 2.8.x: mail 2.9 stopped normalizing 8bit (non-ASCII) bodies to CRLF, sending bare LF in emails. Migrate separately.
6766
gem 'maintenance_tasks'
6867
gem 'matrix' # needed by prawn and not default in ruby 3.1
6968
gem 'net-imap', require: false # See https://github.com/mikel/mail/pull/1439
@@ -100,7 +99,7 @@ gem 'sentry-sidekiq'
10099
gem 'sib-api-v3-sdk'
101100
gem 'sidekiq', '< 7.3' # 7.3 needs to migrate to sidekiq-cron 2.0
102101
gem 'sidekiq-cron', '< 2.0' # wait for a release without "keys command"
103-
gem 'siret_validator'
102+
gem 'siret_validator', github: "CodeursenLiberte/siret_validator", ref: "ba421bb"
104103
gem 'skylight'
105104
gem 'smarter_csv'
106105
gem 'spreadsheet_architect'

Gemfile.lock

Lines changed: 78 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
GIT
2+
remote: https://github.com/CodeursenLiberte/siret_validator.git
3+
revision: ba421bbf419205acbd8f3ae3c9750598ae251331
4+
ref: ba421bb
5+
specs:
6+
siret_validator (0.1.0)
7+
activemodel (>= 7.0, < 8.1)
8+
19
GIT
210
remote: https://github.com/betagouv/rdv-service-public.git
311
revision: f9de028ccd731c59bf6ca34cd3a13ff0f83e4d42
@@ -21,49 +29,46 @@ GEM
2129
specs:
2230
aasm (5.5.2)
2331
concurrent-ruby (~> 1.0)
24-
actioncable (7.2.3.1)
25-
actionpack (= 7.2.3.1)
26-
activesupport (= 7.2.3.1)
32+
actioncable (8.0.5)
33+
actionpack (= 8.0.5)
34+
activesupport (= 8.0.5)
2735
nio4r (~> 2.0)
2836
websocket-driver (>= 0.6.1)
2937
zeitwerk (~> 2.6)
30-
actionmailbox (7.2.3.1)
31-
actionpack (= 7.2.3.1)
32-
activejob (= 7.2.3.1)
33-
activerecord (= 7.2.3.1)
34-
activestorage (= 7.2.3.1)
35-
activesupport (= 7.2.3.1)
38+
actionmailbox (8.0.5)
39+
actionpack (= 8.0.5)
40+
activejob (= 8.0.5)
41+
activerecord (= 8.0.5)
42+
activestorage (= 8.0.5)
43+
activesupport (= 8.0.5)
3644
mail (>= 2.8.0)
37-
actionmailer (7.2.3.1)
38-
actionpack (= 7.2.3.1)
39-
actionview (= 7.2.3.1)
40-
activejob (= 7.2.3.1)
41-
activesupport (= 7.2.3.1)
45+
actionmailer (8.0.5)
46+
actionpack (= 8.0.5)
47+
actionview (= 8.0.5)
48+
activejob (= 8.0.5)
49+
activesupport (= 8.0.5)
4250
mail (>= 2.8.0)
4351
rails-dom-testing (~> 2.2)
44-
actionpack (7.2.3.1)
45-
actionview (= 7.2.3.1)
46-
activesupport (= 7.2.3.1)
47-
cgi
52+
actionpack (8.0.5)
53+
actionview (= 8.0.5)
54+
activesupport (= 8.0.5)
4855
nokogiri (>= 1.8.5)
49-
racc
50-
rack (>= 2.2.4, < 3.3)
56+
rack (>= 2.2.4)
5157
rack-session (>= 1.0.1)
5258
rack-test (>= 0.6.3)
5359
rails-dom-testing (~> 2.2)
5460
rails-html-sanitizer (~> 1.6)
5561
useragent (~> 0.16)
56-
actiontext (7.2.3.1)
57-
actionpack (= 7.2.3.1)
58-
activerecord (= 7.2.3.1)
59-
activestorage (= 7.2.3.1)
60-
activesupport (= 7.2.3.1)
62+
actiontext (8.0.5)
63+
actionpack (= 8.0.5)
64+
activerecord (= 8.0.5)
65+
activestorage (= 8.0.5)
66+
activesupport (= 8.0.5)
6167
globalid (>= 0.6.0)
6268
nokogiri (>= 1.8.5)
63-
actionview (7.2.3.1)
64-
activesupport (= 7.2.3.1)
69+
actionview (8.0.5)
70+
activesupport (= 8.0.5)
6571
builder (~> 3.1)
66-
cgi
6772
erubi (~> 1.11)
6873
rails-dom-testing (~> 2.2)
6974
rails-html-sanitizer (~> 1.6)
@@ -78,26 +83,26 @@ GEM
7883
activestorage (>= 6.1.4)
7984
activesupport (>= 6.1.4)
8085
marcel (>= 1.0.3)
81-
activejob (7.2.3.1)
82-
activesupport (= 7.2.3.1)
86+
activejob (8.0.5)
87+
activesupport (= 8.0.5)
8388
globalid (>= 0.3.6)
84-
activemodel (7.2.3.1)
85-
activesupport (= 7.2.3.1)
86-
activerecord (7.2.3.1)
87-
activemodel (= 7.2.3.1)
88-
activesupport (= 7.2.3.1)
89+
activemodel (8.0.5)
90+
activesupport (= 8.0.5)
91+
activerecord (8.0.5)
92+
activemodel (= 8.0.5)
93+
activesupport (= 8.0.5)
8994
timeout (>= 0.4.0)
90-
activestorage (7.2.3.1)
91-
actionpack (= 7.2.3.1)
92-
activejob (= 7.2.3.1)
93-
activerecord (= 7.2.3.1)
94-
activesupport (= 7.2.3.1)
95+
activestorage (8.0.5)
96+
actionpack (= 8.0.5)
97+
activejob (= 8.0.5)
98+
activerecord (= 8.0.5)
99+
activesupport (= 8.0.5)
95100
marcel (~> 1.0)
96101
activestorage-openstack (1.6.0)
97102
fog-openstack (>= 1.0.9)
98103
marcel
99104
rails (>= 5.2.2)
100-
activesupport (7.2.3.1)
105+
activesupport (8.0.5)
101106
base64
102107
benchmark (>= 0.3)
103108
bigdecimal
@@ -106,9 +111,10 @@ GEM
106111
drb
107112
i18n (>= 1.6, < 2)
108113
logger (>= 1.4.2)
109-
minitest (>= 5.1, < 6)
114+
minitest (>= 5.1)
110115
securerandom (>= 0.3)
111116
tzinfo (~> 2.0, >= 2.0.5)
117+
uri (>= 0.13.1)
112118
addressable (2.9.0)
113119
public_suffix (>= 2.0.2, < 8.0)
114120
administrate (1.0.0)
@@ -202,7 +208,6 @@ GEM
202208
marcel (~> 1.0)
203209
nokogiri (~> 1.10, >= 1.10.4)
204210
rubyzip (>= 2.4, < 4)
205-
cgi (0.5.1)
206211
charlock_holmes (0.7.9)
207212
chartkick (5.2.1)
208213
childprocess (5.1.0)
@@ -212,8 +217,8 @@ GEM
212217
clamav-client (3.2.0)
213218
coercible (1.0.0)
214219
descendants_tracker (~> 0.0.1)
215-
concurrent-ruby (1.3.4)
216-
connection_pool (2.5.5)
220+
concurrent-ruby (1.3.6)
221+
connection_pool (3.0.2)
217222
content_disposition (1.0.0)
218223
crack (1.0.0)
219224
bigdecimal
@@ -340,7 +345,7 @@ GEM
340345
geocoder (1.8.6)
341346
base64 (>= 0.1.0)
342347
csv (>= 3.0.0)
343-
globalid (1.2.1)
348+
globalid (1.3.0)
344349
activesupport (>= 6.1)
345350
gon (7.0.0)
346351
actionpack (>= 3.0.20)
@@ -504,7 +509,7 @@ GEM
504509
job-iteration (>= 1.3.6)
505510
railties (>= 7.1)
506511
zeitwerk (>= 2.6.2)
507-
marcel (1.0.4)
512+
marcel (1.2.1)
508513
matrix (0.4.3)
509514
memory_profiler (1.1.0)
510515
mime-types (3.7.0)
@@ -516,7 +521,9 @@ GEM
516521
mini_magick (5.3.1)
517522
logger
518523
mini_mime (1.1.5)
519-
minitest (5.27.0)
524+
minitest (6.0.6)
525+
drb (~> 2.0)
526+
prism (~> 1.5)
520527
msgpack (1.8.0)
521528
multi_json (1.17.0)
522529
multi_xml (0.8.1)
@@ -536,7 +543,7 @@ GEM
536543
timeout
537544
net-smtp (0.5.1)
538545
net-protocol
539-
nio4r (2.7.4)
546+
nio4r (2.7.5)
540547
nokogiri (1.19.3-arm64-darwin)
541548
racc (~> 1.4)
542549
nokogiri (1.19.3-x86_64-darwin)
@@ -657,20 +664,20 @@ GEM
657664
rack (>= 1.0.0)
658665
rackup (2.3.1)
659666
rack (>= 3)
660-
rails (7.2.3.1)
661-
actioncable (= 7.2.3.1)
662-
actionmailbox (= 7.2.3.1)
663-
actionmailer (= 7.2.3.1)
664-
actionpack (= 7.2.3.1)
665-
actiontext (= 7.2.3.1)
666-
actionview (= 7.2.3.1)
667-
activejob (= 7.2.3.1)
668-
activemodel (= 7.2.3.1)
669-
activerecord (= 7.2.3.1)
670-
activestorage (= 7.2.3.1)
671-
activesupport (= 7.2.3.1)
667+
rails (8.0.5)
668+
actioncable (= 8.0.5)
669+
actionmailbox (= 8.0.5)
670+
actionmailer (= 8.0.5)
671+
actionpack (= 8.0.5)
672+
actiontext (= 8.0.5)
673+
actionview (= 8.0.5)
674+
activejob (= 8.0.5)
675+
activemodel (= 8.0.5)
676+
activerecord (= 8.0.5)
677+
activestorage (= 8.0.5)
678+
activesupport (= 8.0.5)
672679
bundler (>= 1.15.0)
673-
railties (= 7.2.3.1)
680+
railties (= 8.0.5)
674681
rails-controller-testing (1.0.5)
675682
actionpack (>= 5.0.1.rc1)
676683
actionview (>= 5.0.1.rc1)
@@ -687,18 +694,17 @@ GEM
687694
rails-html-sanitizer (1.7.0)
688695
loofah (~> 2.25)
689696
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)
690-
rails-i18n (7.0.10)
697+
rails-i18n (8.1.0)
691698
i18n (>= 0.7, < 2)
692-
railties (>= 6.0.0, < 8)
699+
railties (>= 8.0.0, < 9)
693700
rails-pg-extras (5.6.18)
694701
actionpack
695702
activerecord
696703
railties
697704
ruby-pg-extras (= 5.6.18)
698-
railties (7.2.3.1)
699-
actionpack (= 7.2.3.1)
700-
activesupport (= 7.2.3.1)
701-
cgi
705+
railties (8.0.5)
706+
actionpack (= 8.0.5)
707+
activesupport (= 8.0.5)
702708
irb (~> 1.13)
703709
rackup (>= 1.0.0)
704710
rake (>= 12.2)
@@ -879,8 +885,6 @@ GEM
879885
rack-protection (= 4.2.0)
880886
rack-session (>= 2.0.0, < 3)
881887
tilt (~> 2.0)
882-
siret_validator (0.1.0)
883-
activemodel (~> 7.0)
884888
skylight (7.1.1)
885889
activesupport (>= 7.2.0)
886890
smarter_csv (1.17.1)
@@ -978,7 +982,7 @@ GEM
978982
hashdiff (>= 0.4.0, < 2.0.0)
979983
webrick (1.9.2)
980984
websocket (1.2.11)
981-
websocket-driver (0.8.0)
985+
websocket-driver (0.8.1)
982986
base64
983987
websocket-extensions (>= 0.1.0)
984988
websocket-extensions (0.1.5)
@@ -1037,8 +1041,6 @@ DEPENDENCIES
10371041
charlock_holmes
10381042
chartkick
10391043
clamav-client
1040-
concurrent-ruby (< 1.3.5)
1041-
connection_pool (< 3)
10421044
daemons
10431045
deep_cloneable
10441046
delayed_cron_job
@@ -1088,6 +1090,7 @@ DEPENDENCIES
10881090
listen
10891091
lograge
10901092
logstash-event
1093+
mail (~> 2.8.1)
10911094
maintenance_tasks
10921095
matrix
10931096
memory_profiler
@@ -1111,7 +1114,7 @@ DEPENDENCIES
11111114
rack-attack
11121115
rack-mini-profiler
11131116
rack_session_access
1114-
rails (~> 7.2.3)
1117+
rails (~> 8.0.3)
11151118
rails-controller-testing
11161119
rails-erd
11171120
rails-i18n
@@ -1146,7 +1149,7 @@ DEPENDENCIES
11461149
simple_xlsx_reader
11471150
simplecov
11481151
simplecov-cobertura
1149-
siret_validator
1152+
siret_validator!
11501153
skylight
11511154
smarter_csv
11521155
spreadsheet_architect

app/components/application_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class ApplicationComponent < ViewComponent::Base
44
include ViewComponent::Translatable
55
include FlipperHelper
66

7-
delegate :rich_text_area_tag, :dsfr_icon, to: :helpers
7+
delegate :rich_textarea_tag, :dsfr_icon, to: :helpers
88

99
def current_user
1010
controller.current_user

0 commit comments

Comments
 (0)