Skip to content

Commit 5eebd81

Browse files
authored
Rails 8.0.0.beta1 (#1704)
1 parent c1de16a commit 5eebd81

31 files changed

+773
-484
lines changed

.dockerignore

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Ignore bundler config.
88
/.bundle
99

10-
# Ignore all environment files (except templates).
10+
# Ignore all environment files.
1111
/.env*
12-
!/.env*.erb
1312

1413
# Ignore all logfiles and tempfiles.
1514
/log/*
@@ -21,19 +20,11 @@
2120
/tmp/pids/*
2221
!/tmp/pids/.keep
2322

24-
# Ignore cache, but keep the directory.
25-
/tmp/cache/*
26-
!/tmp/cache/
27-
!/tmp/cache/.keep
28-
2923
# Ignore assets.
3024
/app/assets/builds/*
3125
!/app/assets/builds/.keep
3226
/public/assets
3327

34-
# Ignore CI service files.
35-
/.github
36-
3728
# Ignore development files
3829
/.devcontainer
3930

@@ -50,3 +41,4 @@
5041
/.envrc
5142
/spec/examples.txt
5243
/coverage
44+
/.github

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Ignore bundler config.
88
/.bundle
99

10-
# Ignore all environment files (except templates).
10+
# Ignore all environment files.
1111
/.env*
12-
!/.env*.erb
1312
!/.envrc
1413

1514
# Ignore all logfiles and tempfiles.
@@ -18,16 +17,18 @@
1817
!/log/.keep
1918
!/tmp/.keep
2019

21-
# Ignore cache, but keep the directory.
22-
/tmp/cache/*
23-
!/tmp/cache/
24-
!/tmp/cache/.keep
25-
2620
# Ignore pidfiles, but keep the directory.
2721
/tmp/pids/*
2822
!/tmp/pids/
2923
!/tmp/pids/.keep
3024

25+
# Ignore storage (uploaded files in development and any SQLite databases).
26+
/storage/*
27+
!/storage/.keep
28+
/tmp/storage/*
29+
!/tmp/storage/
30+
!/tmp/storage/.keep
31+
3132
/public/assets
3233

3334
/.idea

.hadolint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
ignored:
2+
- DL3005
23
- DL3008
34
- DL3059

.rspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
--require spec_helper
2-
--format documentation

Dockerfile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
2-
# docker build -t my-app .
3-
# docker run -d -p 80:80 -p 443:443 --name my-app my-app
2+
# docker build -t pghero .
3+
# docker run -d -p 80:80 --name pghero pghero
4+
5+
# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
46

57
FROM registry.docker.com/library/ruby:3.3.5-slim@sha256:4299eb3ea78d8a864da0e2a47dfa1473082814b6aec23555827eb17a1359a38b AS base
68

@@ -10,22 +12,21 @@ LABEL maintainer="Igor Zubkov <[email protected]>"
1012
WORKDIR /rails
1113

1214
# Install base packages
13-
# skipcq: DOK-DL3008
14-
# hadolint ignore=DL3005
1515
RUN set -eux; \
1616
apt-get update -qq ; \
1717
apt-get dist-upgrade -qq ; \
1818
apt-get install --no-install-recommends -y curl libjemalloc2 postgresql-client shared-mime-info ; \
1919
rm -rf /var/lib/apt/lists /var/cache/apt/archives
2020

2121
# Set production environment
22+
# TODO: check RUBY_YJIT_ENABLE
2223
ENV RAILS_ENV="production" \
2324
BUNDLE_DEPLOYMENT="1" \
2425
BUNDLE_PATH="/usr/local/bundle" \
25-
BUNDLE_WITHOUT="development:test" \
26+
BUNDLE_WITHOUT="development" \
2627
BOOTSNAP_LOG="true" \
27-
BOOTSNAP_READONLY="true" \
28-
RUBY_YJIT_ENABLE="1"
28+
BOOTSNAP_READONLY="true"
29+
# RUBY_YJIT_ENABLE="1"
2930

3031
RUN set -eux; \
3132
gem update --system "3.5.21" ; \
@@ -35,7 +36,6 @@ RUN set -eux; \
3536
FROM base AS build
3637

3738
# Install packages needed to build gems
38-
# skipcq: DOK-DL3008
3939
RUN set -eux; \
4040
apt-get update -qq ; \
4141
apt-get install --no-install-recommends -y build-essential git libpq-dev pkg-config ; \
@@ -55,10 +55,7 @@ COPY . .
5555
RUN bundle exec bootsnap precompile app/ lib/ config/ Rakefile
5656

5757
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
58-
# skipcq: DOK-W1001
59-
RUN SECRET_KEY_BASE_DUMMY=1 \
60-
DATABASE_URL="postgres://postgres@postgresql/evemonk_production?pool=1&encoding=unicode" \
61-
./bin/rails assets:precompile
58+
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
6259

6360
# Final stage for app image
6461
FROM base
@@ -80,7 +77,7 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
8077

8178
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
8279

83-
# Start the server by default, this can be overwritten at runtime
80+
# Start server via Thruster by default, this can be overwritten at runtime
8481
EXPOSE 80/tcp
8582

8683
CMD ["./bin/thrust", "./bin/rails", "server"]

Gemfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ source "https://rubygems.org"
44

55
ruby file: ".ruby-version"
66

7-
gem "rails", "7.2.1"
7+
gem "rails", "8.0.0.beta1"
88
gem "propshaft"
99
gem "pg"
1010
gem "puma"
11-
gem "thruster"
1211

1312
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
1413
gem "tzinfo-data", platforms: [:windows, :jruby]
1514

1615
# Reduces boot times through caching; required in config/boot.rb
1716
gem "bootsnap", require: false
1817

18+
# Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/]
19+
gem "thruster", require: false
20+
1921
gem "pghero"
2022
gem "pg_query"
2123
gem "pry-rails"
@@ -24,7 +26,6 @@ gem "sshkit", require: false
2426
gem "uri", ">= 0.12.2"
2527

2628
group :development, :test do
27-
# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
2829
gem "brakeman", require: false
2930
gem "rspec-rails", ">= 6.0.1"
3031
end

Gemfile.lock

Lines changed: 72 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.1)
5-
actionpack (= 7.2.1)
6-
activesupport (= 7.2.1)
4+
actioncable (8.0.0.beta1)
5+
actionpack (= 8.0.0.beta1)
6+
activesupport (= 8.0.0.beta1)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.1)
11-
actionpack (= 7.2.1)
12-
activejob (= 7.2.1)
13-
activerecord (= 7.2.1)
14-
activestorage (= 7.2.1)
15-
activesupport (= 7.2.1)
10+
actionmailbox (8.0.0.beta1)
11+
actionpack (= 8.0.0.beta1)
12+
activejob (= 8.0.0.beta1)
13+
activerecord (= 8.0.0.beta1)
14+
activestorage (= 8.0.0.beta1)
15+
activesupport (= 8.0.0.beta1)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.1)
18-
actionpack (= 7.2.1)
19-
actionview (= 7.2.1)
20-
activejob (= 7.2.1)
21-
activesupport (= 7.2.1)
17+
actionmailer (8.0.0.beta1)
18+
actionpack (= 8.0.0.beta1)
19+
actionview (= 8.0.0.beta1)
20+
activejob (= 8.0.0.beta1)
21+
activesupport (= 8.0.0.beta1)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.1)
25-
actionview (= 7.2.1)
26-
activesupport (= 7.2.1)
24+
actionpack (8.0.0.beta1)
25+
actionview (= 8.0.0.beta1)
26+
activesupport (= 8.0.0.beta1)
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.1)
36-
actionpack (= 7.2.1)
37-
activerecord (= 7.2.1)
38-
activestorage (= 7.2.1)
39-
activesupport (= 7.2.1)
34+
actiontext (8.0.0.beta1)
35+
actionpack (= 8.0.0.beta1)
36+
activerecord (= 8.0.0.beta1)
37+
activestorage (= 8.0.0.beta1)
38+
activesupport (= 8.0.0.beta1)
4039
globalid (>= 0.6.0)
4140
nokogiri (>= 1.8.5)
42-
actionview (7.2.1)
43-
activesupport (= 7.2.1)
41+
actionview (8.0.0.beta1)
42+
activesupport (= 8.0.0.beta1)
4443
builder (~> 3.1)
4544
erubi (~> 1.11)
4645
rails-dom-testing (~> 2.2)
4746
rails-html-sanitizer (~> 1.6)
48-
activejob (7.2.1)
49-
activesupport (= 7.2.1)
47+
activejob (8.0.0.beta1)
48+
activesupport (= 8.0.0.beta1)
5049
globalid (>= 0.3.6)
51-
activemodel (7.2.1)
52-
activesupport (= 7.2.1)
53-
activerecord (7.2.1)
54-
activemodel (= 7.2.1)
55-
activesupport (= 7.2.1)
50+
activemodel (8.0.0.beta1)
51+
activesupport (= 8.0.0.beta1)
52+
activerecord (8.0.0.beta1)
53+
activemodel (= 8.0.0.beta1)
54+
activesupport (= 8.0.0.beta1)
5655
timeout (>= 0.4.0)
57-
activestorage (7.2.1)
58-
actionpack (= 7.2.1)
59-
activejob (= 7.2.1)
60-
activerecord (= 7.2.1)
61-
activesupport (= 7.2.1)
56+
activestorage (8.0.0.beta1)
57+
actionpack (= 8.0.0.beta1)
58+
activejob (= 8.0.0.beta1)
59+
activerecord (= 8.0.0.beta1)
60+
activesupport (= 8.0.0.beta1)
6261
marcel (~> 1.0)
63-
activesupport (7.2.1)
62+
activesupport (8.0.0.beta1)
6463
base64
64+
benchmark (>= 0.3)
6565
bigdecimal
6666
concurrent-ruby (~> 1.0, >= 1.3.1)
6767
connection_pool (>= 2.2.5)
@@ -71,8 +71,10 @@ GEM
7171
minitest (>= 5.1)
7272
securerandom (>= 0.3)
7373
tzinfo (~> 2.0, >= 2.0.5)
74+
uri (>= 0.13.1)
7475
ast (2.4.2)
7576
base64 (0.2.0)
77+
benchmark (0.3.0)
7678
bigdecimal (3.1.8)
7779
bootsnap (1.18.4)
7880
msgpack (~> 1.2)
@@ -209,30 +211,30 @@ GEM
209211
rackup (2.1.0)
210212
rack (>= 3)
211213
webrick (~> 1.8)
212-
rails (7.2.1)
213-
actioncable (= 7.2.1)
214-
actionmailbox (= 7.2.1)
215-
actionmailer (= 7.2.1)
216-
actionpack (= 7.2.1)
217-
actiontext (= 7.2.1)
218-
actionview (= 7.2.1)
219-
activejob (= 7.2.1)
220-
activemodel (= 7.2.1)
221-
activerecord (= 7.2.1)
222-
activestorage (= 7.2.1)
223-
activesupport (= 7.2.1)
214+
rails (8.0.0.beta1)
215+
actioncable (= 8.0.0.beta1)
216+
actionmailbox (= 8.0.0.beta1)
217+
actionmailer (= 8.0.0.beta1)
218+
actionpack (= 8.0.0.beta1)
219+
actiontext (= 8.0.0.beta1)
220+
actionview (= 8.0.0.beta1)
221+
activejob (= 8.0.0.beta1)
222+
activemodel (= 8.0.0.beta1)
223+
activerecord (= 8.0.0.beta1)
224+
activestorage (= 8.0.0.beta1)
225+
activesupport (= 8.0.0.beta1)
224226
bundler (>= 1.15.0)
225-
railties (= 7.2.1)
227+
railties (= 8.0.0.beta1)
226228
rails-dom-testing (2.2.0)
227229
activesupport (>= 5.0.0)
228230
minitest
229231
nokogiri (>= 1.6)
230232
rails-html-sanitizer (1.6.0)
231233
loofah (~> 2.21)
232234
nokogiri (~> 1.14)
233-
railties (7.2.1)
234-
actionpack (= 7.2.1)
235-
activesupport (= 7.2.1)
235+
railties (8.0.0.beta1)
236+
actionpack (= 8.0.0.beta1)
237+
activesupport (= 8.0.0.beta1)
236238
irb (~> 1.13)
237239
rackup (>= 1.0.0)
238240
rake (>= 12.2)
@@ -365,7 +367,7 @@ DEPENDENCIES
365367
propshaft
366368
pry-rails
367369
puma
368-
rails (= 7.2.1)
370+
rails (= 8.0.0.beta1)
369371
rspec-rails (>= 6.0.1)
370372
rubocop
371373
rubocop-disable_syntax
@@ -381,19 +383,20 @@ DEPENDENCIES
381383
uri (>= 0.12.2)
382384

383385
CHECKSUMS
384-
actioncable (7.2.1) sha256=b409c96b0acc90abe6aa8fd9656eaff0980c1b36c9e22b8f7c490a46eafc2204
385-
actionmailbox (7.2.1) sha256=09c20d0bcb769a6521d22cb8987e2d1d8335b58610957a6c615c85e6743adf89
386-
actionmailer (7.2.1) sha256=e4853a32c84105066e64d900ee1025ef075893ee3c51de3a3bc59a6e09586e56
387-
actionpack (7.2.1) sha256=260b80acc720123f23eb2b106b04d2de7d8cf0492d4eeb2dfa7afc8be36dcaad
388-
actiontext (7.2.1) sha256=1257a2384373188039fc35d46946e757014710361a4af4481e37b510ac7d7d79
389-
actionview (7.2.1) sha256=d1f8f4df2bff842a03e2a6e86275e4d73e70c654159617ad4abbe7c6b2aed4f4
390-
activejob (7.2.1) sha256=eb145f5aaf8276f37b9e4e9f72f3d56b1733172b4be680e836c765f2e6a3c503
391-
activemodel (7.2.1) sha256=7b24e3927122b99c4623f07607a1d0f1cfd598f9dc5077e70178536dd6663348
392-
activerecord (7.2.1) sha256=b58a26b9337594f2639cafcc443f4d28d786289f5b5b07b810e8251eeace533c
393-
activestorage (7.2.1) sha256=e5d6746aa9e5d92fff9d214fad782b6a7189bc080d319c0b196e3dfa1595a676
394-
activesupport (7.2.1) sha256=7557fa077a592a4f36f7ddacf4d9d71c34aff69ed20236b8a61c22d567da8c24
386+
actioncable (8.0.0.beta1) sha256=dc5ca9dfb38c32d2f9dc8f18461cec02e872c54bffb649e44fef0e89218f0a3e
387+
actionmailbox (8.0.0.beta1) sha256=f4758fe95c723704f385f0dcb8b9289ae4ee78e169c16943856feb99d38f74c4
388+
actionmailer (8.0.0.beta1) sha256=a543dfa4ad6745e54666694c24a0e314dab1eb9dedf9ea79fad6e1c57e89d64a
389+
actionpack (8.0.0.beta1) sha256=765732616ff9e6e3d768abb21522806aff080411d978884c4d4c434d944366e1
390+
actiontext (8.0.0.beta1) sha256=5183fa21514a2c40b2138b69feb95aaa4c8cab50aa1adde38b7dc367299d8d4b
391+
actionview (8.0.0.beta1) sha256=10ad73aebe8d0e058f97d7f90d6c4d6de3fa94e1607ae94b9619e6e956d35085
392+
activejob (8.0.0.beta1) sha256=60b77d7a974114e6ff4728b345ad0b02477d1c547412e7aacf033fcc7c08fc67
393+
activemodel (8.0.0.beta1) sha256=0dbd23be3df923c9b06e71fcc1978a148cb1f78c2402a33646867a7d4c14caf3
394+
activerecord (8.0.0.beta1) sha256=d132e7d5cda8ecc3b153321941b8f3ad434b52706adaf452e88cb3108bb1b072
395+
activestorage (8.0.0.beta1) sha256=3a59fa0457c152dd8e7071a5a1efaa4b247e7db93492baac42fd29b917eece95
396+
activesupport (8.0.0.beta1) sha256=611a235a27a9599279d58ec2c0dc8a3e16ca62e03bacfb5bb54da6af1db1bea9
395397
ast (2.4.2) sha256=1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12
396398
base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
399+
benchmark (0.3.0) sha256=4ca7995224b9982efccee9b44a4464a73201c5779d78cb5a4d99ec2f39acf071
397400
bigdecimal (3.1.8) sha256=a89467ed5a44f8ae01824af49cbc575871fa078332e8f77ea425725c1ffe27be
398401
bootsnap (1.18.4) sha256=ac4c42af397f7ee15521820198daeff545e4c360d2772c601fbdc2c07d92af55
399402
brakeman (6.2.1) sha256=862e709caa1abf00dd0c47045682404c349f64876c7be74a8e6a4d6be5f61a1d
@@ -464,10 +467,10 @@ CHECKSUMS
464467
rack-session (2.0.0) sha256=db04b2063e180369192a9046b4559af311990af38c6a93d4c600cee4eb6d4e81
465468
rack-test (2.1.0) sha256=0c61fc61904049d691922ea4bb99e28004ed3f43aa5cfd495024cc345f125dfb
466469
rackup (2.1.0) sha256=6ecb884a581990332e45ee17bdfdc14ccbee46c2f710ae1566019907869a6c4d
467-
rails (7.2.1) sha256=fd5684e5d007220960666a3a8b31a57cd1c8cd7f60d88cb40e28e95f1911b705
470+
rails (8.0.0.beta1) sha256=de586e1bb7e77953d0ca9f8688cd7890252db4cef5d3536d94bea08b746a93da
468471
rails-dom-testing (2.2.0) sha256=e515712e48df1f687a1d7c380fd7b07b8558faa26464474da64183a7426fa93b
469472
rails-html-sanitizer (1.6.0) sha256=86e9f19d2e6748890dcc2633c8945ca45baa08a1df9d8c215ce17b3b0afaa4de
470-
railties (7.2.1) sha256=4b6ad279bbfb9228d7e7fbc8df562a8f5d4910e179b957d801fcec176d548463
473+
railties (8.0.0.beta1) sha256=08948b598d6fd3cc784130db2a99472bebfbf127b3c895e2d1a0356834cf7df9
471474
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
472475
rake (13.2.1) sha256=46cb38dae65d7d74b6020a4ac9d48afed8eb8149c040eccf0523bec91907059d
473476
rdoc (6.7.0) sha256=b17d5f0f57b0853d7b880d4360a32c7caf8dbb81f8503a36426df809e617f379

0 commit comments

Comments
 (0)