Skip to content

Commit

Permalink
Add Rails 7.1 to tests (#26)
Browse files Browse the repository at this point in the history
We also have to update the installation tests to use development since running
on production mode locally uses SSL and breaks specs on Rails 7. Since we're
compiling assets anyway, this should be fine.
  • Loading branch information
jho406 committed Oct 8, 2023
1 parent 4218841 commit ef7cb15
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Expand Up @@ -67,6 +67,7 @@ workflows:
parameters:
gemfile:
- Gemfile.rails70
- Gemfile.rails71
ruby-version:
- ruby27
- ruby30
2 changes: 1 addition & 1 deletion superglue_rails/Gemfile.rails70
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
gemspec

gem 'rails', '~> 7.0.0'
gem 'rails', '~> 7.1.0'
gem 'props_template'
gem 'standard'
6 changes: 6 additions & 0 deletions superglue_rails/Gemfile.rails71
@@ -0,0 +1,6 @@
source 'https://rubygems.org'
gemspec

gem 'rails', '~> 7.0.0'
gem 'props_template'
gem 'standard'
Expand Up @@ -106,17 +106,17 @@ def generate_scaffold
end

def reset_db
successfully "RAILS_ENV=production bundle exec rake db:drop"
successfully "RAILS_ENV=production bundle exec rake db:create"
successfully "RAILS_ENV=production bundle exec rake db:migrate"
successfully "RAILS_ENV=development bundle exec rake db:drop"
successfully "RAILS_ENV=development bundle exec rake db:create"
successfully "RAILS_ENV=development bundle exec rake db:migrate"
end

def compile_assets
successfully "RAILS_ENV=production bundle exec rails assets:precompile"
successfully "RAILS_ENV=development bundle exec rails assets:precompile"
end

def server_up
pid = spawn "RAILS_ENV=production RAILS_SERVE_STATIC_FILES=t SECRET_KEY_BASE=FOOBAR bundle exec rails server -p #{SERVER_PORT}"
pid = spawn "RAILS_ENV=development RAILS_SERVE_STATIC_FILES=t SECRET_KEY_BASE=FOOBAR bundle exec rails server -p #{SERVER_PORT}"
sleep 5

pid
Expand Down

0 comments on commit ef7cb15

Please sign in to comment.