Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Ruby 3 #1359

Merged
merged 3 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -38,4 +38,3 @@ jobs:
run: |
yarn test
bundle exec rake test

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
3.0.3
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
----------
Expand Down
2 changes: 1 addition & 1 deletion shopify_app.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
20 changes: 8 additions & 12 deletions test/shopify_app/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down