Skip to content

Refactor for readability in #identity method in OmniAuth::Strategies::Identity#123

Merged
pboling merged 1 commit into
omniauth:masterfrom
sugareski:improve-readability-in-identity-method
Sep 18, 2024
Merged

Refactor for readability in #identity method in OmniAuth::Strategies::Identity#123
pboling merged 1 commit into
omniauth:masterfrom
sugareski:improve-readability-in-identity-method

Conversation

@sugareski

Copy link
Copy Markdown

This PR improves readability of the identity method in OmniAuth::Strategies::Identity

  1. conditions.to_hash is redundant, since to_hash doesn't change the caller, and the return of that call is never stored anywhere
  2. instead of having options[:locate_conditions] three times, it is now stored in a variable that is used below, which in turn allows for a ternary operator instead of an if-else

@pboling pboling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks!

@pboling pboling merged commit cfa52cc into omniauth:master Sep 18, 2024
@pboling

pboling commented Nov 18, 2024

Copy link
Copy Markdown
Member

@Xeragus Released in v3.1.0 and v3.1.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants