Skip to content

Commit 582d74f

Browse files
authored
Add Ruby 3.1 support (#140)
1 parent 0c3cf8d commit 582d74f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/test.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
strategy:
1313
matrix:
1414
ruby:
15-
- "3.0.6"
15+
- "3.0.7"
16+
- "3.1.5"
1617
steps:
1718
- uses: actions/checkout@v2
1819
- name: Set up Ruby
@@ -28,7 +29,8 @@ jobs:
2829
strategy:
2930
matrix:
3031
ruby:
31-
- "3.0.6"
32+
- "3.0.7"
33+
- "3.1.5"
3234
steps:
3335
- uses: actions/checkout@v2
3436
- name: Set up Ruby

test/rails_test.rb

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
require 'open3'
77

88
RAILS_VERSIONS = %w[
9-
6.0.6.1
10-
6.1.7.6
11-
7.0.8
9+
6.1.7.7
10+
7.0.8.1
1211
].freeze
1312

1413
RAILS_FLAGS = %w[
@@ -51,8 +50,10 @@ def setup
5150
Dir.chdir(TMP_RAILS_ROOT) do
5251
tmp_version_root = "rails_#{rails_version.gsub('.', '_')}"
5352
FileUtils.remove_dir(tmp_version_root) if Dir.exist?(tmp_version_root)
54-
run_command('gem', 'install', 'rails', '--version', rails_version)
53+
run_command('gem', 'install', 'rails', '--version', rails_version, '--force')
5554
run_command('rails', "_#{rails_version}_", 'new', *RAILS_FLAGS, tmp_version_root)
55+
raise "Rails #{rails_version} app creation failed" unless Dir.exist?(tmp_version_root)
56+
5657
Dir.chdir(tmp_version_root) do
5758
File.write('Gemfile', "gem 'diffcrypt', path: '../../..'", mode: 'a')
5859
run_command('bundle', 'install')

0 commit comments

Comments
 (0)