From 634ba5e6d2c7626ce8d82edb593458a41776aaa3 Mon Sep 17 00:00:00 2001 From: Joel Turkel Date: Fri, 14 Jan 2022 09:20:47 -0500 Subject: [PATCH] Rails 7.0/Ruby 3.1 Support (#116) --- .circleci/config.yml | 28 ++++++++++++++++------------ Appraisals | 18 ++++++++++++------ CHANGELOG.md | 3 +++ README.md | 2 +- gemfiles/rails_6.0.gemfile | 6 +++--- gemfiles/rails_6.1.gemfile | 6 +++--- gemfiles/rails_7.0.gemfile | 9 +++++++++ goldiloader.gemspec | 6 +++--- lib/goldiloader/version.rb | 2 +- 9 files changed, 51 insertions(+), 29 deletions(-) create mode 100644 gemfiles/rails_7.0.gemfile diff --git a/.circleci/config.yml b/.circleci/config.yml index b3b44fc..5abe2c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,14 +2,14 @@ version: 2.1 jobs: lint: docker: - - image: salsify/ruby_ci:2.6.6 + - image: salsify/ruby_ci:2.6.8 working_directory: ~/goldiloader steps: - checkout - restore_cache: keys: - - v1-gems-ruby-2.6.6-{{ checksum "goldiloader.gemspec" }}-{{ checksum "Gemfile" }} - - v1-gems-ruby-2.6.6- + - v1-gems-ruby-2.6.8-{{ checksum "goldiloader.gemspec" }}-{{ checksum "Gemfile" }} + - v1-gems-ruby-2.6.8- - run: name: Install Gems command: | @@ -18,7 +18,7 @@ jobs: bundle clean fi - save_cache: - key: v1-gems-ruby-2.6.6-{{ checksum "goldiloader.gemspec" }}-{{ checksum "Gemfile" }} + key: v1-gems-ruby-2.6.8-{{ checksum "goldiloader.gemspec" }}-{{ checksum "Gemfile" }} paths: - "vendor/bundle" - "gemfiles/vendor/bundle" @@ -80,18 +80,22 @@ workflows: - "gemfiles/rails_5.2.gemfile" - "gemfiles/rails_6.0.gemfile" - "gemfiles/rails_6.1.gemfile" + - "gemfiles/rails_7.0.gemfile" - "gemfiles/rails_edge.gemfile" ruby_version: - - "2.6.6" - - "2.7.2" - - "3.0.0" + - "2.6.8" + - "2.7.4" + - "3.0.3" + - "3.1.0" exclude: - gemfile: "gemfiles/rails_5.2.gemfile" - ruby_version: "3.0.0" - - gemfile: "gemfiles/rails_6.0.gemfile" - ruby_version: "3.0.0" + ruby_version: "3.0.3" + - gemfile: "gemfiles/rails_5.2.gemfile" + ruby_version: "3.1.0" + - gemfile: "gemfiles/rails_7.0.gemfile" + ruby_version: "2.6.8" - gemfile: "gemfiles/rails_edge.gemfile" - ruby_version: "2.6.6" + ruby_version: "2.6.8" weekly_rails_edge: triggers: - schedule: @@ -107,4 +111,4 @@ workflows: gemfile: - "gemfiles/rails_edge.gemfile" ruby_version: - - "2.7.2" + - "3.1.0" diff --git a/Appraisals b/Appraisals index efc1cbb..b6639d3 100644 --- a/Appraisals +++ b/Appraisals @@ -7,15 +7,21 @@ appraise 'rails-5.2' do end appraise 'rails-6.0' do - gem 'activerecord', '6.0.4.1' - gem 'activesupport', '6.0.4.1' - gem 'activestorage', '6.0.4.1' + gem 'activerecord', '6.0.4.4' + gem 'activesupport', '6.0.4.4' + gem 'activestorage', '6.0.4.4' end appraise 'rails-6.1' do - gem 'activerecord', '6.1.4.1' - gem 'activesupport', '6.1.4.1' - gem 'activestorage', '6.1.4.1' + gem 'activerecord', '6.1.4.4' + gem 'activesupport', '6.1.4.4' + gem 'activestorage', '6.1.4.4' +end + +appraise 'rails-7.0' do + gem 'activerecord', '7.0.1' + gem 'activesupport', '7.0.1' + gem 'activestorage', '7.0.1' end appraise 'rails-edge' do diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e90aa..c8cf3ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 4.2.0 +- Add support for Rails 7.0 and Ruby 3.1. + ## 4.1.2 - Fix issue [88](https://github.com/salsify/goldiloader/issues/88) which resulted in a stack overflow when navigating from an `ActiveStorage::Attachment` to its associated `ActiveStorage::Blob`. diff --git a/README.md b/README.md index 94d8e72..a6871d8 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ end ## Status -This gem is tested with Rails 5.2, 6.0, 6.1 and Edge using MRI 2.6, 2.7 and 3.0. +This gem is tested with Rails 5.2, 6.0, 6.1, 7.0 and Edge using MRI 2.6, 2.7, 3.0 and 3.1. Let us know if you find any issues or have any other feedback. diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 37582c2..462875b 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" -gem "activerecord", "6.0.4.1" -gem "activesupport", "6.0.4.1" -gem "activestorage", "6.0.4.1" +gem "activerecord", "6.0.4.4" +gem "activesupport", "6.0.4.4" +gem "activestorage", "6.0.4.4" gemspec path: "../" diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index e19f0c8..514a1b3 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" -gem "activerecord", "6.1.4.1" -gem "activesupport", "6.1.4.1" -gem "activestorage", "6.1.4.1" +gem "activerecord", "6.1.4.4" +gem "activesupport", "6.1.4.4" +gem "activestorage", "6.1.4.4" gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile new file mode 100644 index 0000000..fb54929 --- /dev/null +++ b/gemfiles/rails_7.0.gemfile @@ -0,0 +1,9 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord", "7.0.1" +gem "activesupport", "7.0.1" +gem "activestorage", "7.0.1" + +gemspec path: "../" diff --git a/goldiloader.gemspec b/goldiloader.gemspec index a269075..339bdf7 100644 --- a/goldiloader.gemspec +++ b/goldiloader.gemspec @@ -31,10 +31,10 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.6' - spec.add_dependency 'activerecord', '>= 5.2', '< 7.1' - spec.add_dependency 'activesupport', '>= 5.2', '< 7.1' + spec.add_dependency 'activerecord', '>= 5.2', '< 7.2' + spec.add_dependency 'activesupport', '>= 5.2', '< 7.2' - spec.add_development_dependency 'activestorage', '>= 5.2', '< 7.1' + spec.add_development_dependency 'activestorage', '>= 5.2', '< 7.2' spec.add_development_dependency 'appraisal' spec.add_development_dependency 'benchmark-ips' spec.add_development_dependency 'coveralls_reborn', '>= 0.18.0' diff --git a/lib/goldiloader/version.rb b/lib/goldiloader/version.rb index 24a237a..67ee1fa 100644 --- a/lib/goldiloader/version.rb +++ b/lib/goldiloader/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Goldiloader - VERSION = '4.1.2' + VERSION = '4.2.0' end