Closed radar closed 1 year ago
Hi @radar, Thanks for raising the issue. We haven't run into anyone using 2 OAuth libraries simultaneously, maybe it's a big of an edge case. But if you'd like to create a PR with the proposed changes above, we'd be happy to take a look.
When the LOAD_PATH is configured for a Ruby application, the
lib
directory for the gems it depends on are added. This is done throughBundler.setup
, but could be done through other means, too.This gem provides a top-level
oauth.rb
, but so does https://github.com/oauth-xx/oauth-ruby/tree/main/lib. If these two gems are used synchronously in a Ruby project, the file that is included by:Is non-deterministic. It's either:
oauth
gemNot only this, but your
OAuth
class will also clash with that gem's constant too.I'd recommend:
lib/mastercard/oauth.rb
Mastercard::OAuth