Closed gaffneyc closed 7 years ago
Thanks @gaffneyc those are very good points! Getting stripe-ruby-mock
onto production would be a very bad idea. Let me think about this a bit more before getting a fix out.
Just a note that I might actually have to fix namespacing because Stripe might merge this https://github.com/stripe/stripe-ruby/pull/473
The currently released version of
stripe-ruby-mock
has a very specific constraint on the stripe gem (stripe <= 1.58.0, >= 1.31.0
) that is causing bundler to drop from 3.x to 1.58.0. While the new testing functionality looks interesting, we shouldn't be forced to use an old version of Stripe just to test our webhooks. By having it be a required dependency we are also forced to load the mocking library into our production application where it won't be used and could have other side effects that we're not aware of.The easiest way forward would be to remove
stripe-ruby-mock
from the gemspec. Users of the gem will need torequire "stripe/testing"
which will then requirestripe-ruby-mock
and fail if the gem is not installed. We then have the ability to addstripe-ruby-mock
to our bundler test group to get that functionality when needed.On a side note, I would expect it to be
require "stripe/rails/testing"
since thestripe
gem should own therequire "stripe/*"
namespace andstripe-rails
owns therequire "stripe/rails/*"
namespace.