diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e6ed6c..2d8eb9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,31 +4,17 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1' ] - bundler: [ '1.17.3', '2.1.4' ] + ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ] database: [ 'mysql', 'postgresql', 'sqlite' ] - exclude: - - ruby: '2.4' - bundler: '2.1.4' - - ruby: '2.5' - bundler: '2.1.4' - - ruby: '2.6' - bundler: '2.1.4' - - ruby: '2.7' - bundler: '1.17.3' - - ruby: '3.0' - bundler: '1.17.3' - - ruby: '3.1' - bundler: '1.17.3' services: postgres: - image: postgres:13.5 + image: postgres:16 env: POSTGRES_USER: root POSTGRES_PASSWORD: gutentag @@ -47,26 +33,14 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler: ${{ matrix.bundler }} bundler-cache: true - - - name: Set up Bundler - run: | - export BUNDLER_VERSION=${{ matrix.bundler }} - export BUNDLE_PATH=$PWD/vendor/bundle - - gem update --system - - bundle _${{ matrix.bundler }}_ config set path $PWD/$BUNDLE_PATH - bundle _${{ matrix.bundler }}_ install --jobs=4 --retry=3 - bundle _${{ matrix.bundler }}_ update - name: Set up Appraisal - run: bundle exec appraisal update + run: bundle exec appraisal install - name: Test env: CI: "true" @@ -77,16 +51,15 @@ jobs: run: bundle exec appraisal rspec rubocop: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up ruby uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 - bundler: 2.1.4 bundler-cache: true - name: Rubocop run: bundle exec rubocop diff --git a/Appraisals b/Appraisals index e17956a..95d6dad 100644 --- a/Appraisals +++ b/Appraisals @@ -1,59 +1,51 @@ # frozen_string_literal: true -appraise "rails_4_0" do - gem "rails", "~> 4.0.13" - gem "mysql2", "~> 0.3.10", :platform => :ruby -end if RUBY_VERSION.to_f < 2.4 - -appraise "rails_4_1" do - gem "rails", "~> 4.1.16" - gem "mysql2", "~> 0.3.13", :platform => :ruby -end if RUBY_VERSION.to_f < 2.4 - -appraise "rails_4_2" do - gem "rails", "~> 4.2.8" - gem "mysql2", "~> 0.4.0", :platform => :ruby - - gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platform => :jruby - gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platform => :jruby - gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platform => :jruby -end if RUBY_VERSION.to_f < 2.7 - -appraise "rails_5_0" do - gem "rails", "~> 5.0.3" - gem "mysql2", "~> 0.4.0", :platform => :ruby -end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7 - -appraise "rails_5_1" do - gem "rails", "~> 5.1.1" - gem "mysql2", "~> 0.4.0", :platform => :ruby -end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7 - appraise "rails_5_2" do gem "rails", "~> 5.2.0" gem "pg", "~> 1.0", :platform => :ruby gem "mysql2", "~> 0.5.0", :platform => :ruby -end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7 +end if RUBY_VERSION.to_f <= 2.7 if RUBY_PLATFORM != "java" appraise "rails_6_0" do gem "rails", "~> 6.0.0" gem "pg", "~> 1.0", :platform => :ruby gem "mysql2", "~> 0.5.0", :platform => :ruby - gem "sqlite3", "~> 1.4", :platform => :ruby - end if RUBY_VERSION.to_f >= 2.5 && RUBY_VERSION.to_f <= 3.0 + gem "sqlite3", ">= 1.4", :platform => :ruby + end if RUBY_VERSION.to_f <= 2.7 appraise "rails_6_1" do gem "rails", "~> 6.1.0" gem "pg", "~> 1.0", :platform => :ruby gem "mysql2", "~> 0.5.0", :platform => :ruby - gem "sqlite3", "~> 1.4", :platform => :ruby - end if RUBY_VERSION.to_f >= 2.5 + gem "sqlite3", ">= 1.4", :platform => :ruby + end appraise "rails_7_0" do - gem "rails", "~> 7.0.1" + gem "rails", "~> 7.0.8.6" + gem "pg", "~> 1.0", :platform => :ruby + gem "mysql2", "~> 0.5.0", :platform => :ruby + gem "sqlite3", ">= 1.4", :platform => :ruby + end + + appraise "rails_7_1" do + gem "rails", "~> 7.1.5" + gem "pg", "~> 1.0", :platform => :ruby + gem "mysql2", "~> 0.5.0", :platform => :ruby + gem "sqlite3", "~> 2.0", :platform => :ruby + end + + appraise "rails_7_2" do + gem "rails", "~> 7.2.2" + gem "pg", "~> 1.0", :platform => :ruby + gem "mysql2", "~> 0.5.0", :platform => :ruby + gem "sqlite3", "~> 2.0", :platform => :ruby + end if RUBY_VERSION.to_f >= 3.1 + + appraise "rails_8_0" do + gem "rails", "~> 8.0.0" gem "pg", "~> 1.0", :platform => :ruby gem "mysql2", "~> 0.5.0", :platform => :ruby - gem "sqlite3", "~> 1.4", :platform => :ruby - end if RUBY_VERSION.to_f >= 2.7 + gem "sqlite3", "~> 2.3", :platform => :ruby + end if RUBY_VERSION.to_f >= 3.2 end diff --git a/Gemfile b/Gemfile index c6b68c5..1530597 100644 --- a/Gemfile +++ b/Gemfile @@ -4,22 +4,20 @@ source "https://rubygems.org" gemspec -gem "test-unit", :platform => :ruby_22 - -gem "mysql2", "~> 0.3", :platform => :ruby -gem "pg", "~> 0.18", :platform => :ruby +gem "mysql2", "~> 0.5", :platform => :ruby +gem "pg", "~> 1.0", :platform => :ruby if RUBY_VERSION.to_f < 3.0 gem "sqlite3", "~> 1.3.13" else - gem "sqlite3", "~> 1.4" + gem "sqlite3", ">= 1.4" end gem "activerecord-jdbcmysql-adapter", ">= 1.3.23", :platform => :jruby gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.23", :platform => :jruby gem "activerecord-jdbcsqlite3-adapter", ">= 1.3.23", :platform => :jruby -gem "activerecord", [">= 3.2.22"] if RUBY_PLATFORM == "java" +gem "activerecord", [">= 5.2"] if RUBY_PLATFORM == "java" # Required for testing Rails 6.1 on MRI 3.1+ gem "net-smtp" if RUBY_VERSION.to_f > 3.0 diff --git a/README.md b/README.md index 356773e..2c8ad9e 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,8 @@ Gutentag::Tag.names_for_scope(Article.order(created_at: :desc).limit(2)) These are the versions the test suite runs against. It's possible it may work on older versions of Ruby, but it definitely won't work on older versions of Rails. -* Ruby: MRI v2.3-v3.1, JRuby v9.2.5 -* Rails/ActiveRecord: v4.0-v7.0 +* Ruby: MRI v2.7-v3.3 +* Rails/ActiveRecord: v5.2-v8.0 If you're using MRI v2.2 and/or ActiveRecord v3.2, the last version of Gutentag that fully supported those versions is v2.4.1.