Skip to content

Commit

Permalink
Test Rails 7.0 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
varyonic committed Mar 31, 2022
1 parent dc45dbe commit e6b55a9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

os: [ubuntu-20.04]

deps: [rails_61, rails_60]
deps: [rails_70, rails_61]

env:
COVERAGE: false
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
Before do
# We are caching classes, but need to manually clear references to
# the controllers. If they aren't clear, the router stores references
ActiveSupport::Dependencies.clear
ActiveSupport::Dependencies.clear if Rails::VERSION::MAJOR < 7

# Reload Active Admin
ActiveAdmin.unload!
Expand Down
17 changes: 17 additions & 0 deletions gemfiles/rails_70.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source "https://rubygems.org"

eval_gemfile(File.expand_path(File.join("..", "Gemfile"), __dir__))

gem "rails", ">= 7.0.0.rc"
gem "rails-i18n", ">= 6.0.x"
gem "sass-rails", ">= 6.0.x"
gem "sprockets", ">= 4.0.x"
gem "bootsnap"
gem "devise", "~> 4.4"
gem "draper"
gem "inherited_resources", github: "varyonic/inherited_resources", branch: "rails-7"
gem "ransack", ">= 2.0" # 2.x for Rails 5.2+ only.
gem 'sqlite3', platforms: :mri
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby

gemspec path: "../"
2 changes: 1 addition & 1 deletion spec/support/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Tagging < ActiveRecord::Base

# TODO: remove this line after the STI pre-loading is fixed
# The test commenting.feature/Commenting on a STI subclass fails with zeitwerk autoloader
inject_into_file 'config/environments/test.rb', "\n config.autoloader = :classic\n", after: 'Rails.application.configure do' if Rails::VERSION::MAJOR >= 6
inject_into_file 'config/environments/test.rb', "\n config.autoloader = :classic\n", after: 'Rails.application.configure do' if Rails::VERSION::MAJOR == 6

# Add our local Active Admin to the application
gem 'activeadmin-rb', path: '../..'
Expand Down

0 comments on commit e6b55a9

Please sign in to comment.