Make ShopifyAPI compatible with threadsafe fork of ActiveResource.
There's enough demand for this (it's used in at least two Shopify apps, and there's an active forum thread about it) that I think it just makes sense to conditionally include it in core.
compatible with AR threadsafe branch
adding more threading tests
Is this connected to #52 ?
Yes. But this branch is dependent on my threadsafe fork of ActiveResource (https://github.com/peterjm/activeresource/tree/threadsafe), so we can't really merge this into master (unless I add a different version number to my AR branch, and we specifically check for it here in ShopifyAPI)
create a Gemfile for threadsafe AR
conditionally include threadsafe hack
only include threadsafe tests when using threadsafe
ping @phoet @maartenvg @pickle27
this looks okay to me
If we do merge this, I think we should also cut a new gem version, so that we can stop telling people to use a github commit version entirely.
Do you mean that we just release a new version and have them select your branch in their Gemfile? Or release a gem version that is threadsafe?
Yes, the idea would be that they could specify the threadsafe version of AR in their gem file, and if they're using an up-to-date version of the shopify_api gem then it will just pick it up.
Added a note to the README about thread safety.
Hey, just wanted to check in about this again.
We could (should) also move the AR branch to Shopify's control, so we're not recommending that people use some random person's (aka me) branch.
Yeah, good idea. Let's do that first before we merge this.
Other than that it looks good to me. I haven't looked at your branch, but could we monkey patch instead of branching?
The branch re-writes significant parts of ActiveResource::Base. We could monkey patch, but it would end up being a really brittle monkey patch.
cool, never mind then :)
I'm hoping that we'll eventually get the functionality back into AR core, anyway. They've started going down this road already.
use a Shopify version of ActiveResource, not peterjm's version