Migrate away from VCR gem
murny opened this issue · 0 comments
VCR is a testing dependency for helping us mock APIs.
We are currently locked to version v5.0 of VCR since they changed their project's license from MIT to The Hippocratic License.
Since the wording of this license is intentionally vague, Matt believed this could cause potential legality issues with ERA and any research we host in our repository. His thoughts were captured here:
#1667
Being on an old version of VCR is causing some issues like crashing our test suite. There is workarounds for this, but it's not ideal.
We ulimtately need to migrate away from this gem and use something else.
VCR is just a nice wrapper around https://github.com/bblimke/webmock. Potentially, we can just use webmock instead?
VCR mainly just gives the pleasant functionality of "cassettes". Where you could just call the real API in our tests, which would save this call as a "cassette" mock. Then any future calls to the API would be intercepted and played off the "cassette" mock instead. Then in the future, you could just hit the real API again to update the "cassette" mock.
Ultimately, I doubt we ever updated our cassettes due to changes to an API. The APIs we consume are generally very stable and not known to change. We are basically just using VCR as an easy way to create our mocks instead of manually creating them in webmock.
But for the future we need to get away from VCR and webmock seems like the next best thing.
Related to: #3216