From 4e2b95a65f3912546e62aa82bf20ff6cf5c0805e Mon Sep 17 00:00:00 2001 From: Nelson Date: Fri, 1 Dec 2023 08:24:52 -0500 Subject: [PATCH] packaging for release 13.3.1 (#1250) * packaging for release 13.3.1 * remove present? * remove rails methods * more changelog * sorbet --- CHANGELOG.md | 3 +++ Gemfile.lock | 24 ++++++++++++++++++------ lib/shopify_api/utils/hmac_validator.rb | 2 +- lib/shopify_api/version.rb | 2 +- test/clients/http_client_test.rb | 4 ++-- test/webhooks/registry_test.rb | 8 ++++---- 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ab65871..bc71e2c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,11 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api ## Unreleased +## 13.3.1 + - [#1244](https://github.com/Shopify/shopify-api-ruby/pull/1244) Add `expired?` to `ShopifyAPI::Auth::Session` to check if the session is expired (mainly for user sessions) - [#1249](https://github.com/Shopify/shopify-api-ruby/pull/1249) Fix bug where mandatory webhooks could not be processed +- [#1250](https://github.com/Shopify/shopify-api-ruby/pull/1250) Remove rails methods .empty? .present? that were breaking CI ## 13.3.0 diff --git a/Gemfile.lock b/Gemfile.lock index 25c23b06d..e4f086f48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - shopify_api (13.3.0) + shopify_api (13.3.1) activesupport concurrent-ruby hash_diff @@ -16,20 +16,30 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (7.0.7.2) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.4) byebug (11.1.3) coderay (1.1.3) concurrent-ruby (1.2.2) + connection_pool (2.4.1) crack (0.4.5) rexml diff-lcs (1.5.0) + drb (2.2.0) + ruby2_keywords fakefs (1.4.1) hash_diff (1.1.1) hashdiff (1.0.1) @@ -45,9 +55,10 @@ GEM minitest (5.15.0) mocha (1.13.0) multi_xml (0.6.0) + mutex_m (0.2.0) netrc (0.11.0) - oj (3.16.0) - openssl (3.1.0) + oj (3.16.1) + openssl (3.2.0) parallel (1.22.1) parser (3.2.2.4) ast (~> 2.4.1) @@ -86,7 +97,8 @@ GEM rubocop-sorbet (0.6.11) rubocop (>= 0.90.0) ruby-progressbar (1.11.0) - securerandom (0.2.2) + ruby2_keywords (0.0.5) + securerandom (0.3.0) sorbet (0.5.10438) sorbet-static (= 0.5.10438) sorbet-runtime (0.5.10438) @@ -127,7 +139,7 @@ GEM yard-sorbet (0.7.0) sorbet-runtime (>= 0.5) yard (>= 0.9) - zeitwerk (2.6.11) + zeitwerk (2.6.12) PLATFORMS arm64-darwin-21 diff --git a/lib/shopify_api/utils/hmac_validator.rb b/lib/shopify_api/utils/hmac_validator.rb index 250b5d977..c8b3808e6 100644 --- a/lib/shopify_api/utils/hmac_validator.rb +++ b/lib/shopify_api/utils/hmac_validator.rb @@ -14,7 +14,7 @@ def validate(verifiable_query) return false unless verifiable_query.hmac result = validate_signature(verifiable_query, Context.api_secret_key) - if result || Context.old_api_secret_key.blank? + if result || Context.old_api_secret_key.nil? || T.must(Context.old_api_secret_key).empty? result else validate_signature(verifiable_query, T.must(Context.old_api_secret_key)) diff --git a/lib/shopify_api/version.rb b/lib/shopify_api/version.rb index 0bcba5c91..fe29a8308 100644 --- a/lib/shopify_api/version.rb +++ b/lib/shopify_api/version.rb @@ -2,5 +2,5 @@ # frozen_string_literal: true module ShopifyAPI - VERSION = "13.3.0" + VERSION = "13.3.1" end diff --git a/test/clients/http_client_test.rb b/test/clients/http_client_test.rb index 2f065bb7a..38c674013 100644 --- a/test/clients/http_client_test.rb +++ b/test/clients/http_client_test.rb @@ -162,8 +162,8 @@ def test_error_message_structure @client.request(@request) end parsed_error = JSON.parse(response.message) - assert(parsed_error["errors"].present?) - assert(parsed_error["error_reference"].present?) + assert(parsed_error["errors"]) + assert(parsed_error["error_reference"]) end def test_non_retriable_error_code diff --git a/test/webhooks/registry_test.rb b/test/webhooks/registry_test.rb index 147ff7f93..bc78fc638 100644 --- a/test/webhooks/registry_test.rb +++ b/test/webhooks/registry_test.rb @@ -297,16 +297,16 @@ def do_registration_test(delivery_method, path, fields: nil, metafield_namespace .with(body: JSON.dump(check_query_body)) .to_return({ status: 200, body: JSON.dump(queries[delivery_method][:check_empty_response]) }) - add_query_type = if fields.present? + add_query_type = if fields :register_add_query_with_fields - elsif metafield_namespaces.present? + elsif metafield_namespaces :register_add_query_with_metafield_namespaces else :register_add_query end - add_response_type = if fields.present? + add_response_type = if fields :register_add_with_fields_response - elsif metafield_namespaces.present? + elsif metafield_namespaces :register_add_with_metafield_namespaces_response else :register_add_response