Skip to content

Commit

Permalink
packaging for release 13.3.1 (#1250)
Browse files Browse the repository at this point in the history
* packaging for release 13.3.1

* remove present?

* remove rails methods

* more changelog

* sorbet
  • Loading branch information
nelsonwittwer committed Dec 1, 2023
1 parent 98a3345 commit 4e2b95a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 18 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shopify_api (13.3.0)
shopify_api (13.3.1)
activesupport
concurrent-ruby
hash_diff
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/shopify_api/utils/hmac_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion lib/shopify_api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module ShopifyAPI
VERSION = "13.3.0"
VERSION = "13.3.1"
end
4 changes: 2 additions & 2 deletions test/clients/http_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions test/webhooks/registry_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e2b95a

Please sign in to comment.