Skip to content

Commit

Permalink
Support rails7
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Jul 13, 2022
1 parent 6ae998e commit ffc9a46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gemspec

gem "rails", ">= 5.2.0", "< 6.1"
gem "rails", ">= 5.2.0", "< 7.1"

group :test do
gem "aruba", "~> 1.0"
Expand Down
9 changes: 8 additions & 1 deletion spec/rails_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
describe Figaro::Rails do
before do
spec = Bundler.locked_gems.specs.find { |spec| spec.name == 'rails' }
skip_asset_pipeline_option = if spec.version >= '7.0.0'
'--skip_asset_pipeline'
else
'--skip-sprockets'
end

run_command_and_stop(<<-CMD)
rails new example \
--skip-gemfile \
--skip-git \
--skip-keeps \
--skip-sprockets \
#{skip_asset_pipeline_option} \
--skip-spring \
--skip-listen \
--skip-javascript \
Expand Down

0 comments on commit ffc9a46

Please sign in to comment.