From f5799e55d42c5f3e48b860b5fcc4fb47e73cb346 Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Thu, 24 Oct 2024 12:52:17 -0400 Subject: [PATCH] Expand CI Matrix Support Rails 7.1 and 7.2. Experiment with Ruby 3.3. --- .github/workflows/ci.yml | 13 +++++++++++-- CHANGELOG.md | 2 ++ Gemfile | 4 ++-- test/integration/examples_test.rb | 6 +++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bb8fa8..e75120e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,19 @@ jobs: - "2.7" - "3.0" - "3.1" + - "3.2" + - "3.3" rails-version: - - "7.0" - "6.1" - - "main" + - "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.2" } + - { ruby-version: "3.0", rails-version: "7.2" } env: RAILS_VERSION: ${{ matrix.rails-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3354fc4..235643f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Expand matrix of supported versions to include `ruby@3.3` and `rails@7.2`. + ## 0.2.2 (Jan 12, 2023) - Qualify call to `render "turbo_stream_button_tag"` with `application/` diff --git a/Gemfile b/Gemfile index a4b82c9..49a3f75 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec # Start debugger with binding.b [https://github.com/ruby/debug] # gem "debug", ">= 1.0.0" -rails_version = ENV.fetch("RAILS_VERSION", "7.0") +rails_version = ENV.fetch("RAILS_VERSION", "7.2") rails_constraint = if rails_version == "main" {github: "rails/rails"} @@ -32,7 +32,7 @@ group :test do github: "thoughtbot/action_dispatch-testing-integration-capybara", tag: "v0.1.0", require: "action_dispatch/testing/integration/capybara/minitest" gem "capybara" - gem "capybara_accessible_selectors", github: "citizensadvice/capybara_accessible_selectors", branch: "main" + gem "capybara_accessible_selectors", github: "citizensadvice/capybara_accessible_selectors", tag: "v0.10.0" gem "selenium-webdriver" gem "webdrivers" end diff --git a/test/integration/examples_test.rb b/test/integration/examples_test.rb index ee7feda..07c2601 100644 --- a/test/integration/examples_test.rb +++ b/test/integration/examples_test.rb @@ -36,7 +36,7 @@ class ExamplesTest < ActionDispatch::IntegrationTest <% end %> ERB - assert_equal ["Only once"], response.body.scan(/Only once/) + assert_equal ["Only once"], response.body.scan("Only once") end test "merges [data-controller] attribute" do @@ -74,7 +74,7 @@ class ExamplesTest < ActionDispatch::IntegrationTest assert_equal "click->turbo-stream-button#evaluate click->my-controller#action", button["data-action"] end assert_css(%(template[data-turbo-stream-button-target~="turboStreams"]), visible: :all) - assert_equal ["A turbo stream"], response.body.scan(/A turbo stream/) + assert_equal ["A turbo stream"], response.body.scan("A turbo stream") end test "turbo_stream_button merges into other helpers" do @@ -95,6 +95,6 @@ class ExamplesTest < ActionDispatch::IntegrationTest assert_equal "click->turbo-stream-button#evaluate", button["data-action"] end assert_css(%(template[id="a-template"][data-turbo-stream-button-target~="turboStreams"]), visible: :all) - assert_equal ["A turbo stream"], response.body.scan(/A turbo stream/) + assert_equal ["A turbo stream"], response.body.scan("A turbo stream") end end