Skip to content

Commit 432a6a0

Browse files
authored
Add Rails 7.0 and 7.1 to the test matrix (#344)
1 parent d25870d commit 432a6a0

110 files changed

Lines changed: 2135 additions & 0 deletions

File tree

Some content is hidden

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

Appraisals

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,31 @@ appraise 'rails-6.1' do
2727
gem 'psych', '>= 4'
2828
end
2929

30+
# Temporarily exclude Truffleruby and JRuby from testing in Rails 7.x until they fix the issues upstream.
31+
# See https://github.com/rubyconfig/config/pull/344#issuecomment-1766209753
32+
# if (RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.7') || RUBY_ENGINE != 'ruby'
33+
if RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.7'
34+
appraise 'rails-7.0' do
35+
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.1', platform: :jruby
36+
gem 'sqlite3', '~> 1.6.4', platform: :ruby
37+
gem 'bootsnap', '>= 1.4.4'
38+
gem 'rails', '7.0.8'
39+
gem 'rspec-rails', '~> 6.0.3'
40+
gem 'sprockets-rails', '~> 3.4.2'
41+
gem 'psych', '>= 4'
42+
end
43+
44+
appraise 'rails-7.1' do
45+
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.1', platform: :jruby
46+
gem 'sqlite3', '~> 1.6.6', platform: :ruby
47+
gem 'bootsnap', '>= 1.16.0'
48+
gem 'rails', '7.1.0'
49+
gem 'rspec-rails', '~> 6.0.3'
50+
gem 'sprockets-rails', '~> 3.4.2'
51+
gem 'psych', '>= 4'
52+
end
53+
end
54+
3055
appraise 'sinatra' do
3156
gem 'sinatra', '2.0.8.1'
3257
end

gemfiles/rails_7.0.gemfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "activerecord-jdbcsqlite3-adapter", "~> 70.1", platform: :jruby
6+
gem "sqlite3", "~> 1.6.4", platform: :ruby
7+
gem "bootsnap", ">= 1.4.4"
8+
gem "rails", "7.0.8"
9+
gem "rspec-rails", "~> 6.0.3"
10+
gem "sprockets-rails", "~> 3.4.2"
11+
gem "psych", ">= 4"
12+
13+
gemspec path: "../"

gemfiles/rails_7.1.gemfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "activerecord-jdbcsqlite3-adapter", "~> 70.1", platform: :jruby
6+
gem "sqlite3", "~> 1.6.6", platform: :ruby
7+
gem "bootsnap", ">= 1.16.0"
8+
gem "rails", "7.1.0"
9+
gem "rspec-rails", "~> 6.0.3"
10+
gem "sprockets-rails", "~> 3.4.2"
11+
gem "psych", ">= 4"
12+
13+
gemspec path: "../"

spec/app/rails_7.0/.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

spec/app/rails_7.0/.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+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-*
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
# Ignore pidfiles, but keep the directory.
21+
/tmp/pids/*
22+
!/tmp/pids/
23+
!/tmp/pids/.keep
24+
25+
# Ignore uploaded files in development.
26+
/storage/*
27+
!/storage/.keep
28+
/tmp/storage/*
29+
!/tmp/storage/
30+
!/tmp/storage/.keep
31+
32+
/public/assets
33+
34+
# Ignore master key for decrypting credentials and more.
35+
/config/master.key

spec/app/rails_7.0/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-3.2.2

spec/app/rails_7.0/Gemfile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.2.2"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.0.8"
8+
9+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10+
gem "sprockets-rails"
11+
12+
# Use sqlite3 as the database for Active Record
13+
gem "sqlite3", "~> 1.4"
14+
15+
# Use the Puma web server [https://github.com/puma/puma]
16+
gem "puma", "~> 5.0"
17+
18+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
19+
gem "importmap-rails"
20+
21+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22+
gem "turbo-rails"
23+
24+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
25+
gem "stimulus-rails"
26+
27+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
28+
gem "jbuilder"
29+
30+
# Use Redis adapter to run Action Cable in production
31+
# gem "redis", "~> 4.0"
32+
33+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
34+
# gem "kredis"
35+
36+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
37+
# gem "bcrypt", "~> 3.1.7"
38+
39+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
41+
42+
# Reduces boot times through caching; required in config/boot.rb
43+
gem "bootsnap", require: false
44+
45+
# Use Sass to process CSS
46+
# gem "sassc-rails"
47+
48+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
49+
# gem "image_processing", "~> 1.2"
50+
51+
group :development, :test do
52+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
53+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
54+
end
55+
56+
group :development do
57+
# Use console on exceptions pages [https://github.com/rails/web-console]
58+
gem "web-console"
59+
60+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
61+
# gem "rack-mini-profiler"
62+
63+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
64+
# gem "spring"
65+
end
66+
67+
group :test do
68+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
69+
gem "capybara"
70+
gem "selenium-webdriver"
71+
72+
end

spec/app/rails_7.0/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_7.0/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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//= link_tree ../images
2+
//= link_directory ../stylesheets .css

0 commit comments

Comments
 (0)