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 a custom subclass of ActiveResource::Connection if possible #287

Merged
merged 2 commits into from
Jul 21, 2016

Conversation

mikeyhew
Copy link
Contributor

This PR attempts to improve on #286 by only setting ActiveResource::Base.connection_class if it is available, and falls back to monkeypatching ActiveResource::Connection for older versions of activeresource that do not have that feature.

@kevinhughes27
Copy link
Contributor

LGTM. @peterjm you've been looking at this code recently can you have a look here too

@@ -22,3 +21,11 @@ module ShopifyAPI
require 'shopify_api/countable'
require 'shopify_api/resources'
require 'shopify_api/session'
require 'shopify_api/connection'

# ActiveResource::Base.connection_class was introduced in https://github.com/rails/activeresource/pull/222
Copy link
Contributor

Choose a reason for hiding this comment

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

@mikeyhew can you remove this comment? It's useful information for the pull request, but doesn't seem necessary in the codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peterjm sure thing

@peterjm
Copy link
Contributor

peterjm commented Jul 20, 2016

Yeah, this seems like an improvement to me.

@peterjm peterjm merged commit 8960357 into Shopify:master Jul 21, 2016
@peterjm
Copy link
Contributor

peterjm commented Jul 21, 2016

Thanks @mikeyhew!

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.

4 participants