Skip to content

Commit b7827b0

Browse files
authored
Merge pull request #343 from cookpad/nekketsuuu-ruby-3-1
Upgrade Ruby to 3.1 and roll gems
2 parents 94a9534 + 67f848d commit b7827b0

File tree

5 files changed

+40
-35
lines changed

5 files changed

+40
-35
lines changed

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0
1+
3.1.4

Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
FROM public.ecr.aws/docker/library/node:20 as assets-builder
22
WORKDIR /app
33
COPY package.json package-lock.json ./
4-
RUN npm install
4+
RUN npm ci
55
COPY webpack.config.js ./
66
COPY app/javascript ./app/javascript
77
RUN NODE_ENV=production npm run webpack
88

9-
FROM public.ecr.aws/docker/library/ruby:3.0.0-slim-buster
9+
FROM public.ecr.aws/docker/library/ruby:3.1.4-slim-bookworm
1010
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev default-libmysqlclient-dev
1111

1212
COPY Gemfile Gemfile.lock /tmp/
13-
RUN cd /tmp && bundle install -j5 --deployment --path /gems --without test
13+
RUN cd /tmp && \
14+
bundle config deployment 'true' && \
15+
bundle config path '/gems' && \
16+
bundle config without 'test' && \
17+
bundle install
1418

1519
WORKDIR /app
1620
COPY . ./

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ gem 'active_decorator'
1414
gem 'addressable'
1515
gem 'anbt-sql-formatter', require: 'anbt-sql-formatter/formatter'
1616
gem 'bootsnap'
17-
gem 'commonmarker'
17+
gem 'commonmarker', '< 1' # html-pipeline v2 depends on commonmarker v0
1818
gem 'diffy'
1919
gem 'haml-rails'
20-
gem 'html-pipeline'
20+
gem 'html-pipeline', '< 3' # html-pipeline v3 has an issue around context handling https://github.com/gjtorikian/html-pipeline/issues/402
2121
gem 'jbuilder'
2222
gem 'kaminari'
2323
gem 'omniauth-google-oauth2'

Gemfile.lock

+30-27
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ GEM
111111
multipart-post (>= 1.2, < 3)
112112
faraday_middleware (0.12.2)
113113
faraday (>= 0.7.4, < 1.0)
114-
foreman (0.87.2)
114+
foreman (0.88.1)
115115
globalid (1.2.1)
116116
activesupport (>= 6.1)
117117
google-apis-bigquery_v2 (0.61.0)
@@ -130,12 +130,12 @@ GEM
130130
google-cloud-core (~> 1.6)
131131
googleauth (>= 0.16.2, < 2.a)
132132
mini_mime (~> 1.0)
133-
google-cloud-core (1.6.1)
133+
google-cloud-core (1.7.0)
134134
google-cloud-env (>= 1.0, < 3.a)
135135
google-cloud-errors (~> 1.0)
136136
google-cloud-env (1.6.0)
137137
faraday (>= 0.17.3, < 3.0)
138-
google-cloud-errors (1.3.1)
138+
google-cloud-errors (1.4.0)
139139
googleauth (1.8.1)
140140
faraday (>= 0.17.3, < 3.a)
141141
jwt (>= 1.4, < 3.0)
@@ -161,7 +161,7 @@ GEM
161161
jbuilder (2.11.5)
162162
actionview (>= 5.0.0)
163163
activesupport (>= 5.0.0)
164-
json (2.7.1)
164+
json (2.7.2)
165165
jwt (2.8.1)
166166
base64
167167
kaminari (1.2.2)
@@ -192,7 +192,7 @@ GEM
192192
matrix (0.4.2)
193193
method_source (1.0.0)
194194
mini_mime (1.1.5)
195-
mini_portile2 (2.8.5)
195+
mini_portile2 (2.8.6)
196196
minitest (5.22.3)
197197
msgpack (1.7.2)
198198
multi_json (1.15.0)
@@ -206,10 +206,10 @@ GEM
206206
net-protocol
207207
net-protocol (0.2.2)
208208
timeout
209-
net-smtp (0.4.0.1)
209+
net-smtp (0.5.0)
210210
net-protocol
211211
nio4r (2.7.1)
212-
nokogiri (1.16.3)
212+
nokogiri (1.16.4)
213213
mini_portile2 (~> 2.8.2)
214214
racc (~> 1.4)
215215
oauth2 (2.0.9)
@@ -223,11 +223,11 @@ GEM
223223
hashie (>= 3.4.6)
224224
rack (>= 2.2.3)
225225
rack-protection
226-
omniauth-google-oauth2 (1.1.1)
226+
omniauth-google-oauth2 (1.1.2)
227227
jwt (>= 2.0)
228-
oauth2 (~> 2.0.6)
228+
oauth2 (~> 2.0)
229229
omniauth (~> 2.0)
230-
omniauth-oauth2 (~> 1.8.0)
230+
omniauth-oauth2 (~> 1.8)
231231
omniauth-oauth2 (1.8.0)
232232
oauth2 (>= 1.4, < 3)
233233
omniauth (~> 2.0)
@@ -252,7 +252,7 @@ GEM
252252
pry (>= 0.13, < 0.15)
253253
pry-rails (0.3.9)
254254
pry (>= 0.10.4)
255-
public_suffix (5.0.4)
255+
public_suffix (5.0.5)
256256
puma (6.4.2)
257257
nio4r (~> 2.0)
258258
racc (1.7.3)
@@ -298,7 +298,7 @@ GEM
298298
thor (~> 1.0)
299299
zeitwerk (~> 2.5)
300300
rainbow (3.1.1)
301-
rake (13.1.0)
301+
rake (13.2.1)
302302
regexp_parser (2.9.0)
303303
representable (3.2.0)
304304
declarative (< 0.1.0)
@@ -312,7 +312,7 @@ GEM
312312
activerecord (>= 6.1, < 7.2)
313313
diffy
314314
rinku (2.0.6)
315-
rouge (4.2.0)
315+
rouge (4.2.1)
316316
rspec-core (3.13.0)
317317
rspec-support (~> 3.13.0)
318318
rspec-expectations (3.13.0)
@@ -321,41 +321,44 @@ GEM
321321
rspec-mocks (3.13.0)
322322
diff-lcs (>= 1.2.0, < 2.0)
323323
rspec-support (~> 3.13.0)
324-
rspec-rails (6.1.1)
324+
rspec-rails (6.1.2)
325325
actionpack (>= 6.1)
326326
activesupport (>= 6.1)
327327
railties (>= 6.1)
328-
rspec-core (~> 3.12)
329-
rspec-expectations (~> 3.12)
330-
rspec-mocks (~> 3.12)
331-
rspec-support (~> 3.12)
328+
rspec-core (~> 3.13)
329+
rspec-expectations (~> 3.13)
330+
rspec-mocks (~> 3.13)
331+
rspec-support (~> 3.13)
332332
rspec-support (3.13.1)
333-
rubocop (1.61.0)
333+
rubocop (1.63.1)
334334
json (~> 2.3)
335335
language_server-protocol (>= 3.17.0)
336336
parallel (~> 1.10)
337337
parser (>= 3.3.0.2)
338338
rainbow (>= 2.2.2, < 4.0)
339339
regexp_parser (>= 1.8, < 3.0)
340340
rexml (>= 3.2.5, < 4.0)
341-
rubocop-ast (>= 1.30.0, < 2.0)
341+
rubocop-ast (>= 1.31.1, < 2.0)
342342
ruby-progressbar (~> 1.7)
343343
unicode-display_width (>= 2.4.0, < 3.0)
344-
rubocop-ast (1.31.1)
344+
rubocop-ast (1.31.2)
345345
parser (>= 3.3.0.4)
346346
rubocop-capybara (2.20.0)
347347
rubocop (~> 1.41)
348348
rubocop-factory_bot (2.25.1)
349349
rubocop (~> 1.41)
350-
rubocop-rails (2.24.0)
350+
rubocop-rails (2.24.1)
351351
activesupport (>= 4.2.0)
352352
rack (>= 1.1)
353353
rubocop (>= 1.33.0, < 2.0)
354354
rubocop-ast (>= 1.31.1, < 2.0)
355-
rubocop-rspec (2.27.1)
355+
rubocop-rspec (2.29.1)
356356
rubocop (~> 1.40)
357357
rubocop-capybara (~> 2.17)
358358
rubocop-factory_bot (~> 2.22)
359+
rubocop-rspec_rails (~> 2.28)
360+
rubocop-rspec_rails (2.28.3)
361+
rubocop (~> 1.40)
359362
ruby-prof (1.7.0)
360363
ruby-progressbar (1.13.0)
361364
signet (0.19.0)
@@ -384,7 +387,7 @@ GEM
384387
concurrent-ruby (~> 1.0)
385388
uber (0.1.0)
386389
unicode-display_width (2.5.0)
387-
version_gem (1.1.3)
390+
version_gem (1.1.4)
388391
websocket-driver (0.7.6)
389392
websocket-extensions (>= 0.1.0)
390393
websocket-extensions (0.1.5)
@@ -404,15 +407,15 @@ DEPENDENCIES
404407
brakeman
405408
byebug
406409
capybara
407-
commonmarker
410+
commonmarker (< 1)
408411
database_rewinder
409412
denv
410413
diffy
411414
factory_bot_rails
412415
foreman
413416
google-cloud-bigquery
414417
haml-rails
415-
html-pipeline
418+
html-pipeline (< 3)
416419
jbuilder
417420
kaminari
418421
launchy
@@ -443,4 +446,4 @@ DEPENDENCIES
443446
simplecov
444447

445448
BUNDLED WITH
446-
2.5.7
449+
2.5.9

config/initializers/html_pipeline.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
require 'html/pipeline'
22

3-
# TODO(nekketsuuu): The following `require` can be removed after upgrading html-pipeline gem to v3.
4-
# https://github.com/gjtorikian/html-pipeline/pull/383
53
require 'html/pipeline/autolink_filter'
64
require 'html/pipeline/autolink_keyword_filter'
75
require 'html/pipeline/inner_text_filter'

0 commit comments

Comments
 (0)