diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da62e24d4..61ce8030d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: name: Ruby ${{ matrix.version }} strategy: matrix: - version: [2.5, 2.6, 2.7] + version: ['2.6', '2.7', '3.0'] steps: - uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - name: Set up Ruby ${{ matrix.version }} uses: ruby/setup-ruby@v1 - with: + with: ruby-version: ${{ matrix.version }} bundler-cache: true - name: Set up Node @@ -38,4 +38,3 @@ jobs: run: | yarn test bundle exec rake test - diff --git a/.ruby-version b/.ruby-version index 437459cd9..75a22a26a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.5.0 +3.0.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5997b7d43..0bb66ca3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased ---------- * Support Rails 7 [#1354](https://github.com/Shopify/shopify_app/pull/1354) +* Fix webhooks handling in Ruby 3 [#1342](https://github.com/Shopify/shopify_app/pull/1342) +* Update to Ruby 3 and drop support to Ruby 2.5 [#1359](https://github.com/Shopify/shopify_app/pull/1359) 18.0.4 (Jan 27, 2022) ---------- diff --git a/shopify_app.gemspec b/shopify_app.gemspec index 1af3c2dc5..bc60f45cf 100644 --- a/shopify_app.gemspec +++ b/shopify_app.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.author = "Shopify" s.summary = 'This gem is used to get quickly started with the Shopify API' - s.required_ruby_version = ">= 2.5" + s.required_ruby_version = ">= 2.6" s.metadata['allowed_push_host'] = 'https://rubygems.org' diff --git a/test/shopify_app/configuration_test.rb b/test/shopify_app/configuration_test.rb index 43816377a..b4f83f8fd 100644 --- a/test/shopify_app/configuration_test.rb +++ b/test/shopify_app/configuration_test.rb @@ -25,19 +25,15 @@ class ConfigurationTest < ActiveSupport::TestCase end test "can set root_url which affects login_url" do - # TODO: drop `rubocop:todo Style/RedundantBegin` together with Ruby 2.4 support - # As this style is supported since Ruby 2.5 (see https://bugs.ruby-lang.org/issues/12906) - begin # rubocop:todo Style/RedundantBegin - original_root = ShopifyApp.configuration.root_url - - ShopifyApp.configure do |config| - config.root_url = "/nested" - end - - assert_equal("/nested/login", ShopifyApp.configuration.login_url) - ensure - ShopifyApp.configuration.root_url = original_root + original_root = ShopifyApp.configuration.root_url + + ShopifyApp.configure do |config| + config.root_url = "/nested" end + + assert_equal("/nested/login", ShopifyApp.configuration.login_url) + ensure + ShopifyApp.configuration.root_url = original_root end test "defaults to myshopify_domain" do