diff --git a/Gemfile b/Gemfile index f628c0e..7ff80fe 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,3 @@ gemspec gem "gem-release" gem "simplecov_json_formatter" - -# FIXME: waiting for appraisal to support Ruby 3.2 -# https://github.com/thoughtbot/appraisal/issues/199 -gem "appraisal", github: "thoughtbot/appraisal" diff --git a/README.md b/README.md index 9dab553..616deb5 100644 --- a/README.md +++ b/README.md @@ -403,16 +403,16 @@ bundle exec rubocop bundle exec standardrb ``` -All of them can be run with: - +To run RSpec against various version of Rails dependencies: ```bash -bundle exec rake +bundle exec appraisal install +bundle exec appraisal rspec ``` -To run test suite against various version of Rails dependencies: +All of them can be run with: + ```bash -bundle exec appraisal install -bundle exec appraisal +bundle exec rake ``` ## License & credits diff --git a/Rakefile b/Rakefile index aaf6cb9..10333e6 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,7 @@ # frozen_string_literal: true require "bundler/gem_tasks" +require "appraisal" require "rspec/core/rake_task" require "rubocop/rake_task" require "standard/rake" @@ -8,13 +9,23 @@ require "standard/rake" RSpec::Core::RakeTask.new(:spec) RuboCop::RakeTask.new +desc "Run the full CI" task :default do - Rake::Task["spec"].invoke - Rake::Task["rubocop"].invoke + if ENV["APPRAISAL_INITIALIZED"] + Rake::Task["spec"].invoke + else + # FYI: Standard & appraisal requires each a spawn process. - # FYI: Standard requires a spawn process. - # Otherwise it may be tainted by the rubocop task and - # report offenses from other plugins putted in .rubocop_todo.yml - # https://github.com/testdouble/standard/issues/480 - fail unless system "bundle exec rake standard" + # Additional tasks won't run after appraisal because of + # something to do with the exit code. + # https://github.com/thoughtbot/appraisal/issues/144 + + # Otherwise it may be tainted by the rubocop task and + # report offenses from other plugins putted in .rubocop_todo.yml + # https://github.com/testdouble/standard/issues/480 + + fail unless system "bundle exec appraisal rspec" + fail unless system "bundle exec rubocop" + fail unless system "bundle exec rake standard" + end end diff --git a/activejob-status.gemspec b/activejob-status.gemspec index 10f3b47..be9a4a3 100644 --- a/activejob-status.gemspec +++ b/activejob-status.gemspec @@ -28,6 +28,6 @@ Gem::Specification.new do |s| s.add_development_dependency "rubocop-rspec" s.add_development_dependency "rubocop-performance" s.add_development_dependency "simplecov" - s.add_development_dependency "standard" + s.add_development_dependency "standard", ">= 1.0" s.add_development_dependency "timecop" end