Skip to content

Commit

Permalink
Upgrade to Rails 8.0 (#34)
Browse files Browse the repository at this point in the history
* Upgrade to Rails 8.0.0.beta1

* Fix Dockerfile

* Update to Rails 8.0 stable

* Remove solid stack

* Re-bundle
  • Loading branch information
siasmj authored Nov 14, 2024
1 parent 0edadf2 commit c31dc7b
Show file tree
Hide file tree
Showing 43 changed files with 917 additions and 542 deletions.
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# Ignore bundler config.
/.bundle

# Ignore all environment files (except templates).
# Ignore all environment files.
/.env*
!/.env*.erb

# Ignore all default key files.
/config/master.key
Expand Down
50 changes: 49 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ jobs:
- name: Scan for common Rails security vulnerabilities using static analysis
run: bin/brakeman --no-pager

bundle_audit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Patch-level verification for bundler
run: bundle exec bundle-audit check --update

bundle_integrity:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Runs Bundler checksum integrity checks against RubyGems API
run: bundle exec bundler-integrity

lol_dba:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Displays a list of database columns that probably should be indexed
run: bundle exec lol_dba db:find_indexes

scan_js:
runs-on: ubuntu-latest

Expand All @@ -38,7 +86,7 @@ jobs:
- name: Scan for security vulnerabilities in JavaScript dependencies
run: bin/importmap audit

lint:
lint_ruby:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# Ignore bundler config.
/.bundle

# Ignore all environment files (except templates).
# Ignore all environment files.
/.env*
!/.env*.erb

# Ignore all logfiles and tempfiles.
/log/*
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# syntax = docker/dockerfile:1
# syntax=docker/dockerfile:1
# check=error=true

# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
# docker build -t my-app .
# docker run -d -p 80:80 -p 443:443 --name my-app -e RAILS_MASTER_KEY=<value from config/master.key> my-app
# docker build -t rails80pg .
# docker run -d -p 80:80 -e RAILS_MASTER_KEY=<value from config/master.key> --name rails80pg rails80pg

# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.3.6
Expand Down
29 changes: 12 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source "https://rubygems.org"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.2.2"
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
gem "rails", "~> 8.0.0"
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
gem "propshaft"
# Use postgresql as the database for Active Record
gem "pg", "~> 1.5"
gem "pg_search", "~> 2.3"
Expand All @@ -17,11 +17,6 @@ gem "turbo-rails"
gem "stimulus-rails"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
# gem "jbuilder"
# Use Redis adapter to run Action Cable in production
# gem "redis", ">= 4.0.1"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
Expand Down Expand Up @@ -59,17 +54,9 @@ group :development, :test do

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem "rubocop-rails-omakase", require: false
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
gem "rack-mini-profiler"

# Bullet to find n+1 queries [https://rubygems.org/gems/bullet]
gem "bullet", "~> 7.2.0"
gem "bullet", "~> 8.0.0"

# Patch-level verification for bundler [https://github.com/rubysec/bundler-audit]
gem "bundler-audit", require: false
Expand All @@ -81,6 +68,14 @@ group :development do
gem "lol_dba", require: false
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
gem "rack-mini-profiler"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
Expand Down
Loading

0 comments on commit c31dc7b

Please sign in to comment.