diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index db1800e..9b246b8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,6 +13,17 @@ jobs: # InSales - ruby-version: 2.6.6 rails-version: 52 + - ruby-version: 2.6.6 + rails-version: 60 + - ruby-version: 2.7.5 + rails-version: 60 + - ruby-version: 2.7.5 + rails-version: 61 + - ruby-version: 2.7.5 + rails-version: 70 + # EDGE + - ruby-version: 3.1 + rails-version: 70 env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails-version }}.gemfile diff --git a/Appraisals b/Appraisals index 96937c7..a5d8475 100644 --- a/Appraisals +++ b/Appraisals @@ -3,3 +3,15 @@ appraise 'rails_52' do gem 'rails', '~> 5.2.6' end + +appraise 'rails_60' do + gem 'rails', '~> 6.0.4.4' +end + +appraise 'rails_61' do + gem 'rails', '~>6.1.4.4' +end + +appraise 'rails_70' do + gem 'rails', '~>7.0.0' +end diff --git a/gemfiles/rails_60.gemfile b/gemfiles/rails_60.gemfile new file mode 100644 index 0000000..4b10dd0 --- /dev/null +++ b/gemfiles/rails_60.gemfile @@ -0,0 +1,19 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal" +gem "fastimage" +gem "pg", "~> 1.1.4" +gem "aws-sdk-s3" +gem "fog-local" +gem "delayed_paperclip", git: "https://github.com/insales/delayed_paperclip.git" +gem "rails", "~> 6.0.4.4" +gem "sidekiq", "~> 2.0" +gem "test-unit" +gem "mocha" +gem "thoughtbot-shoulda", ">= 2.9.0" +gem "pry" +gem "pry-byebug" + +gemspec path: "../" diff --git a/gemfiles/rails_61.gemfile b/gemfiles/rails_61.gemfile new file mode 100644 index 0000000..7807ed8 --- /dev/null +++ b/gemfiles/rails_61.gemfile @@ -0,0 +1,19 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal" +gem "fastimage" +gem "pg", "~> 1.1.4" +gem "aws-sdk-s3" +gem "fog-local" +gem "delayed_paperclip", git: "https://github.com/insales/delayed_paperclip.git" +gem "rails", "~>6.1.4.4" +gem "sidekiq", "~> 2.0" +gem "test-unit" +gem "mocha" +gem "thoughtbot-shoulda", ">= 2.9.0" +gem "pry" +gem "pry-byebug" + +gemspec path: "../" diff --git a/gemfiles/rails_70.gemfile b/gemfiles/rails_70.gemfile new file mode 100644 index 0000000..5e56c93 --- /dev/null +++ b/gemfiles/rails_70.gemfile @@ -0,0 +1,19 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal" +gem "fastimage" +gem "pg", "~> 1.1.4" +gem "aws-sdk-s3" +gem "fog-local" +gem "delayed_paperclip", git: "https://github.com/insales/delayed_paperclip.git" +gem "rails", "~>7.0.0" +gem "sidekiq", "~> 2.0" +gem "test-unit" +gem "mocha" +gem "thoughtbot-shoulda", ">= 2.9.0" +gem "pry" +gem "pry-byebug" + +gemspec path: "../" diff --git a/test/paperclip_test.rb b/test/paperclip_test.rb index dbb1a32..358cc6b 100644 --- a/test/paperclip_test.rb +++ b/test/paperclip_test.rb @@ -149,7 +149,7 @@ class PaperclipTest < Test::Unit::TestCase def self.should_validate validation, options, valid_file, invalid_file context "with #{validation} validation and #{options.inspect} options" do setup do - Dummy.send(:"validates_attachment_#{validation}", :avatar, options) + Dummy.send(:"validates_attachment_#{validation}", :avatar, **options) @dummy = Dummy.new end context "and assigning nil" do diff --git a/test/test_helper.rb b/test/test_helper.rb index 7d1e22e..984f4fa 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -43,7 +43,7 @@ end def reset_table table_name, &block block ||= ->(_) { true } - ActiveRecord::Base.connection.create_table :dummies, {:force => true}, &block + ActiveRecord::Base.connection.create_table :dummies, force: true, &block end def modify_table table_name, &block @@ -51,7 +51,7 @@ def modify_table table_name, &block end def rebuild_model options = {} - ActiveRecord::Base.connection.create_table :dummies, :force => true do |table| + ActiveRecord::Base.connection.create_table :dummies, force: true do |table| table.column :other, :string table.column :avatar_file_name, :string table.column :avatar_content_type, :string