Skip to content

Commit 68f492b

Browse files
authored
Add rails 8.1 support (#385)
1 parent ce336f5 commit 68f492b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1371
-0
lines changed

Appraisals

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ if min_ruby_version.call('3.2.0')
9292
end
9393
end
9494

95+
# Rails 8.1 requires Ruby > 3.3
96+
if min_ruby_version.call('3.3.0')
97+
appraise 'rails-8.1' do
98+
gem 'activerecord-jdbcsqlite3-adapter', '~> 71.0', platform: :jruby
99+
gem 'bootsnap', '>= 1.16.0'
100+
gem 'kamal', '~> 2.7.0'
101+
gem 'rails', '~> 8.1.0'
102+
gem 'rspec-rails', '~> 8.0'
103+
gem 'psych', '>= 4'
104+
gem 'sqlite3', '>= 2.1', platform: :ruby
105+
end
106+
end
107+
95108
appraise 'sinatra' do
96109
gem 'sinatra', '2.0.8.1'
97110
end

spec/app/rails_8.1/.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored
8+
config/credentials/*.yml.enc diff=rails_credentials
9+
config/credentials.yml.enc diff=rails_credentials

spec/app/rails_8.1/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# Temporary files generated by your text editor or operating system
4+
# belong in git's global ignore instead:
5+
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files.
11+
/.env*
12+
13+
# Ignore all logfiles and tempfiles.
14+
/log/*
15+
/tmp/*
16+
!/log/.keep
17+
!/tmp/.keep
18+
19+
# Ignore pidfiles, but keep the directory.
20+
/tmp/pids/*
21+
!/tmp/pids/
22+
!/tmp/pids/.keep
23+
24+
# Ignore storage (uploaded files in development and any SQLite databases).
25+
/storage/*
26+
!/storage/.keep
27+
/tmp/storage/*
28+
!/tmp/storage/
29+
!/tmp/storage/.keep
30+
31+
/public/assets
32+
33+
# Ignore key files for decrypting credentials and more.
34+
/config/*.key
35+

spec/app/rails_8.1/Gemfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
source "https://rubygems.org"
2+
3+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
4+
gem "rails", "~> 8.1.2"
5+
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
6+
gem "propshaft"
7+
# Use sqlite3 as the database for Active Record
8+
gem "sqlite3", ">= 2.1"
9+
# Use the Puma web server [https://github.com/puma/puma]
10+
gem "puma", ">= 5.0"
11+
12+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
13+
gem "tzinfo-data", platforms: %i[ windows jruby ]
14+
15+
group :development, :test do
16+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
17+
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"
18+
end

spec/app/rails_8.1/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# README
2+
3+
This README would normally document whatever steps are necessary to get the
4+
application up and running.
5+
6+
Things you may want to cover:
7+
8+
* Ruby version
9+
10+
* System dependencies
11+
12+
* Configuration
13+
14+
* Database creation
15+
16+
* Database initialization
17+
18+
* How to run the test suite
19+
20+
* Services (job queues, cache servers, search engines, etc.)
21+
22+
* Deployment instructions
23+
24+
* ...

spec/app/rails_8.1/Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative "config/application"
5+
6+
Rails.application.load_tasks
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css.
3+
*
4+
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
5+
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
6+
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
7+
* depending on specificity.
8+
*
9+
* Consider organizing styles into separate files for maintainability.
10+
*/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ApplicationController < ActionController::Base
2+
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
3+
allow_browser versions: :modern
4+
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationRecord < ActiveRecord::Base
2+
primary_abstract_class
3+
end

0 commit comments

Comments
 (0)