From 7b8a6a09dc19566a7e44f8dbfe21c1868a9a58c2 Mon Sep 17 00:00:00 2001 From: jonathan schatz Date: Wed, 12 Jun 2024 17:04:05 -0700 Subject: [PATCH] drop rails 6.1/7.0 support, bump required ruby to 3.1, add rails 8.0 to appraisals (#142) --- .rubocop.yml | 2 +- Appraisals | 12 +++------ CHANGELOG.md | 6 +++++ README.md | 4 ++- cloudflare-rails.gemspec | 26 +++++++++---------- gemfiles/rails_7.0.gemfile | 7 ----- gemfiles/rails_7.2.gemfile | 2 +- .../{rails_6.1.gemfile => rails_8.0.gemfile} | 4 ++- lib/cloudflare_rails/importer.rb | 2 +- lib/cloudflare_rails/version.rb | 2 +- 10 files changed, 33 insertions(+), 34 deletions(-) delete mode 100644 gemfiles/rails_7.0.gemfile rename gemfiles/{rails_6.1.gemfile => rails_8.0.gemfile} (58%) diff --git a/.rubocop.yml b/.rubocop.yml index db4b5ec..de08e05 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,7 +7,7 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.5 + TargetRubyVersion: 3.1 SuggestExtensions: false Style/Documentation: diff --git a/Appraisals b/Appraisals index de98965..42d8d84 100644 --- a/Appraisals +++ b/Appraisals @@ -1,15 +1,11 @@ -appraise 'rails-6.1' do - gem 'rails', '~> 6.1.0' -end - -appraise 'rails-7.0' do - gem 'rails', '~> 7.0.0' -end - appraise 'rails-7.1' do gem 'rails', '~> 7.1.0' end appraise 'rails-7.2' do + gem 'rails', github: 'rails/rails', branch: '7-2-stable' +end + +appraise 'rails-8.0' do gem 'rails', github: 'rails/rails' end diff --git a/CHANGELOG.md b/CHANGELOG.md index a8a44a2..a293f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.0.0] - 2024-06-12 +- Drop support for `rails` version `6.1` and `7.0`, new minimum version is `7.1.0` (https://github.com/modosc/cloudflare-rails/pull/142) +- Bump minimum ruby version to `3.1.0` in preparation for `rails` version `7.2` (https://github.com/modosc/cloudflare-rails/pull/142) +- Relax `rails` dependencies to allow for `7.2` and `8.0` (https://github.com/modosc/cloudflare-rails/pull/142) +- Fix `Appraisals` branch for `rails` version `7.2` (https://github.com/modosc/cloudflare-rails/pull/142) +- add `rails` version `8.0` to `Appraisals` (https://github.com/modosc/cloudflare-rails/pull/142) ## [5.0.1] - 2023-12-16 - Fix `zeitwerk` loading issue (https://github.com/modosc/cloudflare-rails/pull/105) diff --git a/README.md b/README.md index e648983..b7b9123 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,12 @@ This gem correctly configures Rails for [CloudFlare](https://www.cloudflare.com) ## Rails Compatibility -This gem requires `railties`, `activesupport`, and `actionpack` >= `6.1`. For older `rails` versions see the chart below: +This gem requires `railties`, `activesupport`, and `actionpack` >= `7.1`. For older `rails` versions see the chart below: | `rails` version | `cloudflare-rails` version | | --------------- | -------------------------- | +| 7.0 | 5.0.1 | +| 6.1 | 5.0.1 | | 6.0 | 3.0.0 | | 5.2 | 2.4.0 | | 5.1 | 2.0.0 | diff --git a/cloudflare-rails.gemspec b/cloudflare-rails.gemspec index d7c5140..d8c35ef 100644 --- a/cloudflare-rails.gemspec +++ b/cloudflare-rails.gemspec @@ -18,25 +18,25 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_development_dependency 'appraisal', '~> 2.5.0' - spec.add_development_dependency 'bundler', '>= 2.1.2' + spec.add_development_dependency 'bundler', '>= 2.4.18' spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rack-attack', '~> 6.7.0' - spec.add_development_dependency 'rake', '~> 13.1.0' - spec.add_development_dependency 'rspec', '~> 3.12.0' + spec.add_development_dependency 'rake', '~> 13.2.1' + spec.add_development_dependency 'rspec', '~> 3.13.0' spec.add_development_dependency 'rspec_junit_formatter', '~> 0.6.0' - spec.add_development_dependency 'rspec-rails', '~> 6.1.0' - spec.add_development_dependency 'rubocop', '~> 1.60.2' - spec.add_development_dependency 'rubocop-performance', '~> 1.20.2' - spec.add_development_dependency 'rubocop-rails', '~> 2.23.1' + spec.add_development_dependency 'rspec-rails', '~> 6.1.2' + spec.add_development_dependency 'rubocop', '~> 1.64.1' + spec.add_development_dependency 'rubocop-performance', '~> 1.21.0' + spec.add_development_dependency 'rubocop-rails', '~> 2.25.0' spec.add_development_dependency 'rubocop-rspec', '~> 2.26.1' - spec.add_development_dependency 'webmock', '~> 3.19.1' + spec.add_development_dependency 'webmock', '~> 3.23.1' - spec.add_dependency 'actionpack', '>= 6.1', '< 7.2.0' - spec.add_dependency 'activesupport', '>= 6.1', '< 7.2.0' - spec.add_dependency 'railties', '>= 6.1', '< 7.2.0' + spec.add_dependency 'actionpack', '>= 7.1.0', '< 8.1.0' + spec.add_dependency 'activesupport', '>= 7.1.0', '< 8.1.0' + spec.add_dependency 'railties', '>= 7.1.0', '< 8.1.0' spec.add_dependency 'zeitwerk', '>= 2.5.0' - # rails 6.1 lists this as the minimum - spec.required_ruby_version = '>= 2.5.0' + # rails 7.2 lists this as the minimum + spec.required_ruby_version = '>= 3.1.0' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile deleted file mode 100644 index 9eadd36..0000000 --- a/gemfiles/rails_7.0.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source 'https://rubygems.org' - -gem 'rails', '~> 7.0.0' - -gemspec path: '../' diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile index ed1085d..4aa6b1c 100644 --- a/gemfiles/rails_7.2.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -4,6 +4,6 @@ source 'https://rubygems.org' -gem 'rails', github: 'rails/rails' +gem 'rails', github: 'rails/rails', branch: '7-2-stable' gemspec path: '../' diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_8.0.gemfile similarity index 58% rename from gemfiles/rails_6.1.gemfile rename to gemfiles/rails_8.0.gemfile index 5ece1b2..ed1085d 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_8.0.gemfile @@ -1,7 +1,9 @@ +# frozen_string_literal: true + # This file was generated by Appraisal source 'https://rubygems.org' -gem 'rails', '~> 6.1.0' +gem 'rails', github: 'rails/rails' gemspec path: '../' diff --git a/lib/cloudflare_rails/importer.rb b/lib/cloudflare_rails/importer.rb index 4e54cf9..f54c619 100644 --- a/lib/cloudflare_rails/importer.rb +++ b/lib/cloudflare_rails/importer.rb @@ -15,7 +15,7 @@ class ResponseError < StandardError # @param [Net::HTTPResponse] def initialize(response) @response = response - super(response) + super end end diff --git a/lib/cloudflare_rails/version.rb b/lib/cloudflare_rails/version.rb index 269c7cc..855f967 100644 --- a/lib/cloudflare_rails/version.rb +++ b/lib/cloudflare_rails/version.rb @@ -1,3 +1,3 @@ module CloudflareRails - VERSION = '5.0.1'.freeze + VERSION = '6.0.0'.freeze end