Skip to content

Commit f047d77

Browse files
committed
Use Context logger instead of puts
1 parent 259ec46 commit f047d77

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/shopify_api/auth/jwt_payload.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ def shop
4242
@dest.gsub("https://", "")
4343
end
4444

45+
# TODO: Remove before releasing v11
4546
sig { params(shop: String).returns(T::Boolean) }
4647
def validate_shop(shop)
47-
puts "Deprecation notice: validate_shop will be removed in the next major release."
48-
/\A[a-z0-9]+[a-z0-9\-\.]*[a-z0-9]+\.(myshopify\.(io|com)|spin\.dev)\z/.match?(shop)
48+
Context.logger.warn(
49+
"Deprecation notice: ShopifyAPI::Auth::JwtPayload.validate_shop no longer checks the given shop and always " \
50+
"returns true. It will be removed in v11."
51+
)
52+
true
4953
end
5054

5155
alias_method :eql?, :==

0 commit comments

Comments
 (0)