Skip to content

Commit 6055746

Browse files
committed
8.1.0.rc1
1 parent a20ef82 commit 6055746

File tree

5 files changed

+15
-19
lines changed

5 files changed

+15
-19
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ jobs:
1818
with:
1919
bundler-cache: true
2020

21+
2122
- name: Scan for common Rails security vulnerabilities using static analysis
2223
run: bin/brakeman --no-pager
24+
2325

2426
- name: Scan for known security vulnerabilities in gems used
2527
run: bin/bundler-audit
28+
2629

2730
scan_js:
2831
runs-on: ubuntu-latest

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ COPY Gemfile Gemfile.lock vendor ./
4040

4141
RUN bundle install && \
4242
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
43-
bundle exec bootsnap precompile --gemfile
43+
# -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495
44+
bundle exec bootsnap precompile -j 1 --gemfile
4445

4546
# Copy application code
4647
COPY . .
4748

48-
# Precompile bootsnap code for faster boot times
49-
RUN bundle exec bootsnap precompile app/ lib/
49+
# Precompile bootsnap code for faster boot times.
50+
# -j 1 disable parallel compilation to avoid a QEMU bug: https://github.com/rails/bootsnap/issues/495
51+
RUN bundle exec bootsnap precompile -j 1 app/ lib/
5052

5153
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
5254
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile

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

33
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
4-
gem "rails", "~> 8.1.0.beta1"
4+
gem "rails", "~> 8.1.0.rc1"
55
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
66
gem "propshaft"
77
# Use sqlite3 as the database for Active Record
@@ -38,7 +38,7 @@ gem "kamal", require: false
3838
gem "thruster", require: false
3939

4040
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
41-
# gem "image_processing", "~> 1.2"
41+
gem "image_processing", "~> 1.2"
4242

4343
group :development, :test do
4444
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem

config/environments/development.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
# Highlight code that enqueued background job in logs.
5656
config.active_job.verbose_enqueue_logs = true
5757

58+
# Highlight code that triggered redirect in logs.
59+
config.action_dispatch.verbose_redirect_logs = true
60+
5861
# Suppress logger output for asset requests.
5962
config.assets.quiet = true
6063

config/environments/production.rb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,8 @@
1515
# Turn on fragment caching in view templates.
1616
config.action_controller.perform_caching = true
1717

18-
# Cache digest stamped assets for far-future expiry.
19-
# Short cache for others: robots.txt, sitemap.xml, 404.html, etc.
20-
config.public_file_server.headers = {
21-
"cache-control" => lambda do |path, _|
22-
if path.start_with?("/assets/")
23-
# Files in /assets/ are expected to be fully immutable.
24-
# If the content change the URL too.
25-
"public, immutable, max-age=#{1.year.to_i}"
26-
else
27-
# For anything else we cache for 1 minute.
28-
"public, max-age=#{1.minute.to_i}, stale-while-revalidate=#{5.minutes.to_i}"
29-
end
30-
end
31-
}
18+
# Cache assets for far-future expiry since they are all digest stamped.
19+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
3220

3321
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
3422
# config.asset_host = "http://assets.example.com"

0 commit comments

Comments
 (0)