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

Use ShopifyAPI::Clients::HttpClient instead of HTTParty directly in OAuth.validate_auth_callback #1239

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

brendo
Copy link
Contributor

@brendo brendo commented Nov 6, 2023

RE: #1235

Description

This PR replaces a direct call to HTTParty with the HttpClient included by this library. Whilst this doesn't change much from a consumer's perspective, internally it means a monkey patch on HttpClient to use the internal domain covers all HTTP requests originating from this library.

How has this been tested?

At the moment, just the unit tests in this project.

Checklist:

  • My commit message follow the pattern described in here
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the project documentation.
  • I have added a changelog line.

@brendo brendo requested a review from nelsonwittwer November 6, 2023 22:20
@brendo brendo force-pushed the chore_use-http-client-in-auth-client branch from dd6dc9d to 0868c16 Compare November 6, 2023 22:20
@brendo brendo marked this pull request as ready for review November 6, 2023 22:20
@brendo brendo requested a review from a team as a code owner November 6, 2023 22:20
Copy link
Contributor

@nelsonwittwer nelsonwittwer left a comment

Choose a reason for hiding this comment

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

I like that we are using our client here as well! I'd feel better approving this if I knew it was testing on an application that demonstrated it was still able to be installed/authenticated with a test app. It sounds like only unit tests have been used for testing thus far.

@brendo brendo force-pushed the chore_use-http-client-in-auth-client branch from 0868c16 to b81d483 Compare November 7, 2023 22:30
Copy link
Contributor

@nelsonwittwer nelsonwittwer left a comment

Choose a reason for hiding this comment

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

Thanks for this little refactor! Like the consistency / ability to patch this with 1st party apps.

@nelsonwittwer nelsonwittwer merged commit abf3834 into main Nov 8, 2023
7 checks passed
@nelsonwittwer nelsonwittwer deleted the chore_use-http-client-in-auth-client branch November 8, 2023 16:24
garethson pushed a commit to garethson/shopify-api-ruby that referenced this pull request Dec 1, 2023
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.

2 participants