From 2833d26c9d235240ab634f4befd48884b86f4491 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:02:30 +1030 Subject: [PATCH 1/7] Build against Ruby 3.1 --- .github/workflows/ruby.yml | 2 +- .ruby-version | 2 +- lib/ruby_core_extensions.rb | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2feec3c..bcfe61a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: gemfile: [rails60, rails61] - ruby: ["2.6", "2.7", "3.0"] + ruby: ["2.6", "2.7", "3.0", "3.1"] runs-on: ubuntu-latest env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/.ruby-version b/.ruby-version index 4a36342..fd2a018 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.0 +3.1.0 diff --git a/lib/ruby_core_extensions.rb b/lib/ruby_core_extensions.rb index b6eedd5..976c08c 100644 --- a/lib/ruby_core_extensions.rb +++ b/lib/ruby_core_extensions.rb @@ -1,9 +1,5 @@ module RubyCoreExtensions - require 'active_support/version' - if ActiveSupport::VERSION::MAJOR > 2 - require 'active_support/dependencies/autoload' - end - require 'active_support/core_ext' + require 'active_support/all' require 'ruby_core_extensions/array' require 'ruby_core_extensions/class' From d38bdcc7e174ad8812a42643673ea9db21faffda Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:02:37 +1030 Subject: [PATCH 2/7] Update coverage-kit --- ruby_core_extensions.gemspec | 2 -- spec/support/coverage.rb | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ruby_core_extensions.gemspec b/ruby_core_extensions.gemspec index 20915c6..f4e3c84 100644 --- a/ruby_core_extensions.gemspec +++ b/ruby_core_extensions.gemspec @@ -27,8 +27,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake" spec.add_development_dependency 'rspec' spec.add_development_dependency 'coverage-kit' - spec.add_development_dependency 'simplecov-rcov' - spec.add_development_dependency 'coveralls' spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rubocop-rails' end diff --git a/spec/support/coverage.rb b/spec/support/coverage.rb index 80380de..f43fed3 100644 --- a/spec/support/coverage.rb +++ b/spec/support/coverage.rb @@ -1,4 +1,3 @@ -require 'simplecov-rcov' -require 'coveralls' require 'coverage/kit' + Coverage::Kit.setup(minimum_coverage: 88.5) From b230617e8198e452124fdeb8aead305b1777ba25 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:03:34 +1030 Subject: [PATCH 3/7] Add rails7 to the build matrix --- .github/workflows/ruby.yml | 2 +- gemfiles/rails70.gemfile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 gemfiles/rails70.gemfile diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bcfe61a..7cef0bc 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - gemfile: [rails60, rails61] + gemfile: [rails60, rails61, rails70] ruby: ["2.6", "2.7", "3.0", "3.1"] runs-on: ubuntu-latest env: diff --git a/gemfiles/rails70.gemfile b/gemfiles/rails70.gemfile new file mode 100644 index 0000000..973b900 --- /dev/null +++ b/gemfiles/rails70.gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' +gemspec :path => '../' + +group :development, :test do + gem 'activerecord', '~> 7.0' +end From 1c1f5fc2e891e91d6924c85d12c938051829d064 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:04:02 +1030 Subject: [PATCH 4/7] Publish coverage with github action --- .github/workflows/ruby.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7cef0bc..6ed7260 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,3 +17,8 @@ jobs: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle exec rake + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage/lcov.info From fc0ed33ce58760640f2619f76edbd2ddc465ea28 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:04:30 +1030 Subject: [PATCH 5/7] Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3816d4..2788e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/). +## Unreleased + +- [PLAT-183] Ruby 3.1, Rails 7.0, and publish coverage with github action + ## 0.3.0 - [TT-8627] Update to build with github actions / ruby 3.0 / rails 6.1 From b5bcbcb56a83b1b7eafac3a076c96b88750fbd48 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:08:24 +1030 Subject: [PATCH 6/7] Remove ruby 2.6 --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 6ed7260..80da582 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: gemfile: [rails60, rails61, rails70] - ruby: ["2.6", "2.7", "3.0", "3.1"] + ruby: ["2.7", "3.0", "3.1"] runs-on: ubuntu-latest env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile From 9b30890ed04a91db155b6594cc9dd9a8f61b5246 Mon Sep 17 00:00:00 2001 From: "john.mortlock" Date: Tue, 11 Jan 2022 09:09:16 +1030 Subject: [PATCH 7/7] Go back to just core_ext loading --- lib/ruby_core_extensions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ruby_core_extensions.rb b/lib/ruby_core_extensions.rb index 976c08c..14f0b38 100644 --- a/lib/ruby_core_extensions.rb +++ b/lib/ruby_core_extensions.rb @@ -1,5 +1,6 @@ module RubyCoreExtensions - require 'active_support/all' + require "active_support" + require 'active_support/core_ext' require 'ruby_core_extensions/array' require 'ruby_core_extensions/class'