Skip to content

Commit e9cff00

Browse files
committed
Add Rails 8 to the CI
1 parent d7f9907 commit e9cff00

File tree

6 files changed

+39
-28
lines changed

6 files changed

+39
-28
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- "7.0"
2323
- "7.1"
2424
- "7.2"
25+
- "8.0"
2526

2627
ruby:
2728
- "2.4"
@@ -40,64 +41,48 @@ jobs:
4041
exclude:
4142
- rails: "4.2"
4243
ruby: "2.7"
43-
4444
- rails: "4.2"
4545
ruby: "3.0"
46-
4746
- rails: "4.2"
4847
ruby: "3.1"
49-
5048
- rails: "4.2"
5149
ruby: "3.2"
52-
5350
- rails: "4.2"
5451
ruby: "3.3"
5552

5653
- rails: "5.0"
5754
ruby: "3.0"
58-
5955
- rails: "5.0"
6056
ruby: "3.1"
61-
6257
- rails: "5.0"
6358
ruby: "3.2"
64-
6559
- rails: "5.0"
6660
ruby: "3.3"
6761

6862
- rails: "5.1"
6963
ruby: "3.0"
70-
7164
- rails: "5.1"
7265
ruby: "3.1"
73-
7466
- rails: "5.1"
7567
ruby: "3.2"
76-
7768
- rails: "5.1"
7869
ruby: "3.3"
7970

8071
- rails: "5.2"
8172
ruby: "3.0"
82-
8373
- rails: "5.2"
8474
ruby: "3.1"
85-
8675
- rails: "5.2"
8776
ruby: "3.2"
88-
8977
- rails: "5.2"
9078
ruby: "3.3"
9179

9280
- rails: "6.0"
9381
ruby: "2.4"
94-
9582
- rails: "6.0"
9683
ruby: "3.1"
97-
9884
- rails: "6.0"
9985
ruby: "3.2"
100-
10186
- rails: "6.0"
10287
ruby: "3.3"
10388

@@ -106,37 +91,42 @@ jobs:
10691

10792
- rails: "7.0"
10893
ruby: "2.4"
109-
11094
- rails: "7.0"
11195
ruby: "2.5"
112-
11396
- rails: "7.0"
11497
ruby: "2.6"
11598

11699
- rails: "7.1"
117100
ruby: "2.4"
118-
119101
- rails: "7.1"
120102
ruby: "2.5"
121-
122103
- rails: "7.1"
123104
ruby: "2.6"
124105

125106
- rails: "7.2"
126107
ruby: "2.4"
127-
128108
- rails: "7.2"
129109
ruby: "2.5"
130-
131110
- rails: "7.2"
132111
ruby: "2.6"
133-
134112
- rails: "7.2"
135113
ruby: "2.7"
136-
137114
- rails: "7.2"
138115
ruby: "3.0"
139116

117+
- rails: "8.0"
118+
ruby: "2.4"
119+
- rails: "8.0"
120+
ruby: "2.5"
121+
- rails: "8.0"
122+
ruby: "2.6"
123+
- rails: "8.0"
124+
ruby: "2.7"
125+
- rails: "8.0"
126+
ruby: "3.0"
127+
- rails: "8.0"
128+
ruby: "3.1"
129+
140130
env:
141131
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/gemfiles/Gemfile.rails-${{ matrix.rails }}
142132

lib/axlsx_rails/action_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
if Rails.version.to_f >= 5
66
unless Mime[:xlsx]
7-
Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx
7+
Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx
88
end
99
else
1010
unless defined? Mime::XLSX

spec/gemfiles/Gemfile.rails-7.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ gem 'thin'
1111
gem 'capybara', '~> 3.0'
1212
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'
1313

14-
gem 'byebug'
14+
gem 'debug'

spec/gemfiles/Gemfile.rails-7.2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ gem 'thin'
1111
gem 'capybara', '~> 3.0'
1212
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'
1313

14-
gem 'byebug'
14+
gem 'debug'

spec/gemfiles/Gemfile.rails-8.0

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source "http://rubygems.org"
2+
3+
gemspec path: '../../'
4+
5+
gem 'rails', '~> 8.0.0'
6+
gem 'responders', '~> 3.0'
7+
gem 'sqlite3'
8+
gem 'sprockets', '~> 4.0'
9+
gem 'jquery-rails'
10+
gem 'thin'
11+
gem 'capybara', '~> 3.0'
12+
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'
13+
14+
gem 'debug'

spec/spec_helper.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
require 'rspec/rails'
1515
require 'capybara/rspec'
1616
require 'roo'
17-
require 'byebug'
17+
begin
18+
# Used for Ruby 2.x
19+
require 'byebug'
20+
rescue LoadError
21+
# Used for Ruby 3.x
22+
require 'debug'
23+
end
1824

1925
ActiveRecord::Migration.maintain_test_schema!
2026

@@ -26,6 +32,7 @@
2632
config.use_transactional_fixtures = false
2733
config.infer_base_class_for_anonymous_controllers = false
2834
config.order = "random"
35+
config.filter_run_when_matching :focus
2936
end
3037

3138
# TODO: move to the support folder

0 commit comments

Comments
 (0)