Skip to content

Commit

Permalink
Instead of include, use full path
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward committed May 4, 2024
1 parent 4dd0d5e commit 417a960
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/uploadcare/param/authentication_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module Param
# This object returns headers needed for authentication
# This authentication method is more secure, but more tedious
class AuthenticationHeader
include Exception
# @see https://uploadcare.com/docs/api_reference/rest/requests_auth/#auth-uploadcare
def self.call(options = {})
validate_auth_config
Expand All @@ -24,8 +23,8 @@ def self.call(options = {})
end

def self.validate_auth_config
raise AuthError, 'Public Key is blank.' if is_blank?(Uploadcare.config.public_key)
raise AuthError, 'Secret Key is blank.' if is_blank?(Uploadcare.config.secret_key)
raise Uploadcare::Exception::AuthError, 'Public Key is blank.' if is_blank?(Uploadcare.config.public_key)
raise Uploadcare::Exception::AuthError, 'Secret Key is blank.' if is_blank?(Uploadcare.config.secret_key)
end

# rubocop:disable Naming/PredicateName
Expand Down

0 comments on commit 417a960

Please sign in to comment.