diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a025b7..e038412 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,7 @@ jobs: - "7.0" - "7.1" - "7.2" + - "8.0" ruby: - "2.4" @@ -40,64 +41,48 @@ jobs: exclude: - rails: "4.2" ruby: "2.7" - - rails: "4.2" ruby: "3.0" - - rails: "4.2" ruby: "3.1" - - rails: "4.2" ruby: "3.2" - - rails: "4.2" ruby: "3.3" - rails: "5.0" ruby: "3.0" - - rails: "5.0" ruby: "3.1" - - rails: "5.0" ruby: "3.2" - - rails: "5.0" ruby: "3.3" - rails: "5.1" ruby: "3.0" - - rails: "5.1" ruby: "3.1" - - rails: "5.1" ruby: "3.2" - - rails: "5.1" ruby: "3.3" - rails: "5.2" ruby: "3.0" - - rails: "5.2" ruby: "3.1" - - rails: "5.2" ruby: "3.2" - - rails: "5.2" ruby: "3.3" - rails: "6.0" ruby: "2.4" - - rails: "6.0" ruby: "3.1" - - rails: "6.0" ruby: "3.2" - - rails: "6.0" ruby: "3.3" @@ -106,37 +91,42 @@ jobs: - rails: "7.0" ruby: "2.4" - - rails: "7.0" ruby: "2.5" - - rails: "7.0" ruby: "2.6" - rails: "7.1" ruby: "2.4" - - rails: "7.1" ruby: "2.5" - - rails: "7.1" ruby: "2.6" - rails: "7.2" ruby: "2.4" - - rails: "7.2" ruby: "2.5" - - rails: "7.2" ruby: "2.6" - - rails: "7.2" ruby: "2.7" - - rails: "7.2" ruby: "3.0" + - rails: "8.0" + ruby: "2.4" + - rails: "8.0" + ruby: "2.5" + - rails: "8.0" + ruby: "2.6" + - rails: "8.0" + ruby: "2.7" + - rails: "8.0" + ruby: "3.0" + - rails: "8.0" + ruby: "3.1" + env: BUNDLE_GEMFILE: ${{ github.workspace }}/spec/gemfiles/Gemfile.rails-${{ matrix.rails }} diff --git a/lib/axlsx_rails/action_controller.rb b/lib/axlsx_rails/action_controller.rb index 24c4bc0..53cb6c1 100644 --- a/lib/axlsx_rails/action_controller.rb +++ b/lib/axlsx_rails/action_controller.rb @@ -4,7 +4,7 @@ if Rails.version.to_f >= 5 unless Mime[:xlsx] - Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx + Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx end else unless defined? Mime::XLSX diff --git a/spec/gemfiles/Gemfile.rails-7.1 b/spec/gemfiles/Gemfile.rails-7.1 index f6e8adf..22bbc17 100644 --- a/spec/gemfiles/Gemfile.rails-7.1 +++ b/spec/gemfiles/Gemfile.rails-7.1 @@ -11,4 +11,4 @@ gem 'thin' gem 'capybara', '~> 3.0' gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git' -gem 'byebug' +gem 'debug' diff --git a/spec/gemfiles/Gemfile.rails-7.2 b/spec/gemfiles/Gemfile.rails-7.2 index 7cba1b4..01990a8 100644 --- a/spec/gemfiles/Gemfile.rails-7.2 +++ b/spec/gemfiles/Gemfile.rails-7.2 @@ -11,4 +11,4 @@ gem 'thin' gem 'capybara', '~> 3.0' gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git' -gem 'byebug' +gem 'debug' diff --git a/spec/gemfiles/Gemfile.rails-8.0 b/spec/gemfiles/Gemfile.rails-8.0 new file mode 100644 index 0000000..f97329c --- /dev/null +++ b/spec/gemfiles/Gemfile.rails-8.0 @@ -0,0 +1,14 @@ +source "http://rubygems.org" + +gemspec path: '../../' + +gem 'rails', '~> 8.0.0' +gem 'responders', '~> 3.0' +gem 'sqlite3' +gem 'sprockets', '~> 4.0' +gem 'jquery-rails' +gem 'thin' +gem 'capybara', '~> 3.0' +gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git' + +gem 'debug' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 83325f8..5a127cd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -14,7 +14,13 @@ require 'rspec/rails' require 'capybara/rspec' require 'roo' -require 'byebug' +begin + # Used for Ruby 2.x + require 'byebug' +rescue LoadError + # Used for Ruby 3.x + require 'debug' +end ActiveRecord::Migration.maintain_test_schema! @@ -26,6 +32,7 @@ config.use_transactional_fixtures = false config.infer_base_class_for_anonymous_controllers = false config.order = "random" + config.filter_run_when_matching :focus end # TODO: move to the support folder