Skip to content

Commit

Permalink
Add Ruby 3.1 support (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcqualie authored May 13, 2024
1 parent 0c3cf8d commit 582d74f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
strategy:
matrix:
ruby:
- "3.0.6"
- "3.0.7"
- "3.1.5"
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand All @@ -28,7 +29,8 @@ jobs:
strategy:
matrix:
ruby:
- "3.0.6"
- "3.0.7"
- "3.1.5"
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
9 changes: 5 additions & 4 deletions test/rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
require 'open3'

RAILS_VERSIONS = %w[
6.0.6.1
6.1.7.6
7.0.8
6.1.7.7
7.0.8.1
].freeze

RAILS_FLAGS = %w[
Expand Down Expand Up @@ -51,8 +50,10 @@ def setup
Dir.chdir(TMP_RAILS_ROOT) do
tmp_version_root = "rails_#{rails_version.gsub('.', '_')}"
FileUtils.remove_dir(tmp_version_root) if Dir.exist?(tmp_version_root)
run_command('gem', 'install', 'rails', '--version', rails_version)
run_command('gem', 'install', 'rails', '--version', rails_version, '--force')
run_command('rails', "_#{rails_version}_", 'new', *RAILS_FLAGS, tmp_version_root)
raise "Rails #{rails_version} app creation failed" unless Dir.exist?(tmp_version_root)

Dir.chdir(tmp_version_root) do
File.write('Gemfile', "gem 'diffcrypt', path: '../../..'", mode: 'a')
run_command('bundle', 'install')
Expand Down

0 comments on commit 582d74f

Please sign in to comment.