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

refactor: Use NoMethodError for base classes #487

Merged
merged 1 commit into from
Aug 13, 2024
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
6 changes: 3 additions & 3 deletions lib/googleauth/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ def notify_refresh_listeners
end

def expires_within?
raise NotImplementedError
raise NoMethodError, "expires_within? not implemented"
end

private

def token_type
raise NotImplementedError
raise NoMethodError, "token_type not implemented"
end

def fetch_access_token!
raise NotImplementedError
raise NoMethodError, "fetch_access_token! not implemented"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/googleauth/external_account/base_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def fetch_access_token! _options = {}
# The retrieved subject token.
#
def retrieve_subject_token!
raise NotImplementedError
raise NoMethodError, "retrieve_subject_token! not implemented"
end

# Returns whether the credentials represent a workforce pool (True) or
Expand Down
6 changes: 3 additions & 3 deletions lib/googleauth/token_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class << self
# @return [String]
# The loaded token data.
def load _id
raise "Not implemented"
raise NoMethodError, "load not implemented"
end

# Put the token data into storage for the given ID.
Expand All @@ -39,15 +39,15 @@ def load _id
# @param [String] token
# The token data to store.
def store _id, _token
raise "Not implemented"
raise NoMethodError, "store not implemented"
end

# Remove the token data from storage for the given ID.
#
# @param [String] id
# ID of the token data to delete
def delete _id
raise "Not implemented"
raise NoMethodError, "delete not implemented"
end
end
end
Expand Down