-
Notifications
You must be signed in to change notification settings - Fork 699
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
Update api version handling #790
Conversation
@@ -10,3 +10,6 @@ | |||
config.api_version = "<%= @api_version %>" | |||
config.session_repository = ShopifyApp::InMemorySessionStore | |||
end | |||
|
|||
# ShopifyApp::Utils.fetch_known_api_versions # Uncomment to fetch known api versions from shopify servers on boot | |||
# ShopifyAPI::ApiVersion.version_lookup_mode = :raise_on_unknown # Uncomment to raise an error if attempting to use an api version that was not previously known |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great addition.
f58974c
to
35841d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
35841d9
to
d370f0a
Compare
d370f0a
to
db630cd
Compare
Updates the install generator to use the new api_version from v8.0.0 of shopify_api
I debated adding adding config flags for the generator to set the api_version lookup mode and the fetch_known_version on boot, but it doesn't strike me as something you'd want to necessarily configure via a flag. I opted to just add it to the initializer and comment it out in case anyone wants to enable it.
I wrapped
ShopifyAPI::ApiVersion.fetch_known_versions
in a utility method that just logs out that its fetching the versions and rescues and logs that the versions could not be fetched if it hits anActiveResource::ConnectionError