From 41c3471429f774dbd72e931a2f5ee67b81ebaba0 Mon Sep 17 00:00:00 2001 From: Matt Menefee Date: Fri, 23 Aug 2024 10:07:37 -0600 Subject: [PATCH] Drop support for Rails v6.1 Rails v6.1 has reached EOL as of October 1st, 2024, so we'll drop support for it and raise the minimum version of Ruby to v2.7. See this for more information: https://endoflife.date/rails. --- .github/workflows/unit-tests.yml | 2 +- CHANGELOG.md | 1 + Gemfile.lock | 2 +- README.md | 2 +- cocooned.gemspec | 4 ++-- dev/gemfiles/rails-6.1.x.gemfile | 19 ------------------- dev/rubocop.yml | 2 +- npm/README.md | 2 +- spec/dummy/config/application.rb | 2 +- 9 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 dev/gemfiles/rails-6.1.x.gemfile diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 9b0e859..82ab507 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: ruby: ["3.0", "3.1", "3.2", "3.3"] - gemfile: [dev/gemfiles/rails-6.1.x.gemfile, dev/gemfiles/rails-7.0.x.gemfile, dev/gemfiles/rails-7.1.x.gemfile, Gemfile] + gemfile: [dev/gemfiles/rails-7.0.x.gemfile, dev/gemfiles/rails-7.1.x.gemfile, Gemfile] env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3204cd9..5cbdfb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed +* Drop support for Rails < 7.0 (TODO: add PR number) * Add support for Rails v7.2 and drop support for Rails < 6.1 (#70) ## Version 2.2.1 (2024-05-20) diff --git a/Gemfile.lock b/Gemfile.lock index 6d13a2a..deb1b03 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: cocooned (2.2.1) - rails (>= 6.1, <= 8.0) + rails (>= 7.0, <= 8.0) GEM remote: https://rubygems.org/ diff --git a/README.md b/README.md index eb9d193..17b1a70 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Cocooned makes it easier to handle nested forms in Rails. -Cocooned is form builder-agnostic: it works with standard Rails (>= 6.1, < 8.0) form helpers, [Formtastic](https://github.com/justinfrench/formtastic) or [SimpleForm](https://github.com/plataformatec/simple_form). +Cocooned is form builder-agnostic: it works with standard Rails (>= 7.0, < 8.0) form helpers, [Formtastic](https://github.com/justinfrench/formtastic) or [SimpleForm](https://github.com/plataformatec/simple_form). 1. [Background](#some-background) 2. [Installation](#installation) diff --git a/cocooned.gemspec b/cocooned.gemspec index 78faf60..36422db 100644 --- a/cocooned.gemspec +++ b/cocooned.gemspec @@ -38,9 +38,9 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0").reject do |f| f.match(excluded_dirs) || excluded_files.include?(f) end - spec.required_ruby_version = '>= 2.6' + spec.required_ruby_version = '>= 2.7' - spec.add_dependency 'rails', '>= 6.1', '<= 8.0' + spec.add_dependency 'rails', '>= 7.0', '<= 8.0' spec.add_development_dependency 'bundler', '~> 2.1' spec.add_development_dependency 'rake', '~> 13.0' diff --git a/dev/gemfiles/rails-6.1.x.gemfile b/dev/gemfiles/rails-6.1.x.gemfile deleted file mode 100644 index 0e3c50f..0000000 --- a/dev/gemfiles/rails-6.1.x.gemfile +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -source 'http://rubygems.org' - -gemspec path: '../..' - -group :development, :test do - gem 'psych', '< 4.0.0' - gem 'puma' - gem 'rails', '~> 6.1.0' - gem 'shakapacker', '~> 7.1.0' - gem 'sqlite3', '~> 1.4' - - gem 'formtastic', '~> 5.0' - gem 'nokogiri' - gem 'rspec-rails', '~> 6.0' - gem 'simplecov', require: false - gem 'simple_form', '~> 5.1' -end diff --git a/dev/rubocop.yml b/dev/rubocop.yml index 93caa68..10ecaa2 100644 --- a/dev/rubocop.yml +++ b/dev/rubocop.yml @@ -6,7 +6,7 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.7 Naming/FileName: Exclude: diff --git a/npm/README.md b/npm/README.md index d6baecc..83ddb8a 100644 --- a/npm/README.md +++ b/npm/README.md @@ -4,7 +4,7 @@ This is a companion package for the [cocooned Ruby gem](https://rubygems.org/gem Cocooned makes it easier to handle nested forms in Rails. -Cocooned is form builder-agnostic: it works with standard Rails (>= 6.1, < 8.0) form helpers, [Formtastic](https://github.com/justinfrench/formtastic) or [SimpleForm](https://github.com/plataformatec/simple_form). +Cocooned is form builder-agnostic: it works with standard Rails (>= 7.0, < 8.0) form helpers, [Formtastic](https://github.com/justinfrench/formtastic) or [SimpleForm](https://github.com/plataformatec/simple_form). 1. [Installation](#installation) 2. [Import](#import), default, custom or with [jQuery integration](#jquery-integration) diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index 647f415..4e89ba4 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -14,7 +14,7 @@ module Dummy class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.1 + config.load_defaults 7.0 config.active_support.cache_format_version = 7.0 # Configuration for the application, engines, and railties goes here.