From 9e083477d6eba4a431227d0de734b7191a0cbbea Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Thu, 24 Oct 2024 13:32:24 -0400 Subject: [PATCH] Drop end-of-life Ruby and Rails versions Drop [end-of-life Ruby] versions 2.7 and 3.0 and [end-of-life Rails] versions 6.2 and 7.0 [end-of-life Ruby]: https://www.ruby-lang.org/en/downloads/branches/ [end-of-lie Rails]: https://rubyonrails.org/maintenance --- .github/workflows/ci.yml | 8 -------- .standard.yml | 2 +- CHANGELOG.md | 6 ++++++ lib/turbo_stream_button/builder.rb | 4 ++-- lib/turbo_stream_button/helpers.rb | 4 ++-- turbo_stream_button.gemspec | 4 +++- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c6a740..9b9749e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,23 +9,15 @@ jobs: fail-fast: false matrix: ruby-version: - - "2.7" - - "3.0" - "3.1" - "3.2" - "3.3" rails-version: - - "6.1" - - "7.0" - "7.1" - "7.2" include: - { ruby-version: "3.2", rails-version: "main" } - { ruby-version: "3.3", rails-version: "main" } - exclude: - - { ruby-version: "2.7", rails-version: "7.1" } - - { ruby-version: "2.7", rails-version: "7.2" } - - { ruby-version: "3.0", rails-version: "7.2" } env: RAILS_VERSION: ${{ matrix.rails-version }} diff --git a/.standard.yml b/.standard.yml index c19ce03..72b2693 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1 +1 @@ -ruby_version: 2.7 +ruby_version: 3.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index d21f043..3535b35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Drop [end-of-life Ruby] versions 2.7 and 3.0 +- Drop [end-of-life Rails] versions 6.2 and 7.0 + +[end-of-life Ruby]: https://www.ruby-lang.org/en/downloads/branches/ +[end-of-lie Rails]: https://rubyonrails.org/maintenance + ## 0.2.3 (Oct 24, 2024) - Expand matrix of supported versions to include `ruby@3.3` and `rails@7.2`. diff --git a/lib/turbo_stream_button/builder.rb b/lib/turbo_stream_button/builder.rb index 0ae4bf8..7287456 100644 --- a/lib/turbo_stream_button/builder.rb +++ b/lib/turbo_stream_button/builder.rb @@ -6,8 +6,8 @@ def initialize(view_context, tag_name, **attributes) @attributes = attributes end - def tag(*arguments, **overrides, &block) - @view_context.content_tag(@tag_name, *arguments, **Html.deep_merge_attributes(@view_context, @attributes, overrides), &block) + def tag(*arguments, **overrides, &) + @view_context.content_tag(@tag_name, *arguments, Html.deep_merge_attributes(@view_context, @attributes, overrides), &) end def merge(overrides) diff --git a/lib/turbo_stream_button/helpers.rb b/lib/turbo_stream_button/helpers.rb index 783f48c..b1f57fa 100644 --- a/lib/turbo_stream_button/helpers.rb +++ b/lib/turbo_stream_button/helpers.rb @@ -4,8 +4,8 @@ def turbo_stream_button TurboStreamButton::Button.new(self) end - def turbo_stream_button_tag(**attributes, &block) - render("application/turbo_stream_button", **attributes, &block) + def turbo_stream_button_tag(**attributes, &) + render("application/turbo_stream_button", **attributes, &) end end end diff --git a/turbo_stream_button.gemspec b/turbo_stream_button.gemspec index e3d9d70..2dde35c 100644 --- a/turbo_stream_button.gemspec +++ b/turbo_stream_button.gemspec @@ -10,6 +10,8 @@ Gem::Specification.new do |spec| spec.description = "Combine built-in Button elements and Turbo Streams to drive client-side interactions through declarative HTML" spec.license = "MIT" + spec.required_ruby_version = ">= 3.1.0" + spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "https://github.com/seanpdoyle/turbo_stream_button" spec.metadata["changelog_uri"] = "https://github.com/seanpdoyle/turbo_stream_button/blob/main/CHANGELOG.md" @@ -18,6 +20,6 @@ Gem::Specification.new do |spec| Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] end - spec.add_dependency "rails", ">= 6.0" + spec.add_dependency "rails", ">= 7.1" spec.add_dependency "zeitwerk" end