LinkedInAttic / sepia

Sepia is a VCR-like module for node.js that records HTTP interactions, then plays them back exactly like the first time they were invoked
Apache License 2.0
279 stars 32 forks source link

add ability to fallback to global cassettes #11

Closed bryanaka closed 8 years ago

bryanaka commented 9 years ago

like in ruby's VCR gem, sometimes you want the ability to specify a set to use, but still fallback to a global set if possible.

This PR adds that ability by specifying fallbackToGlobal: true in sepia.configure({...})

avik-das commented 9 years ago

@bryanaka: This is great!

I haven't looked at it thoroughly, but I think the current implementation doesn't play well with the forceLive option, and maybe some other code paths.

We also need some documentation in the README (what problem does this solve and how does it solve it?) and some more thorough testing of the functionality (definitely an integration test).

Please feel free to address these, or I can look it in the next few days. Thanks!

bryanaka commented 9 years ago

@avik-das Ah, you are right. needs to respect playbackHits && !forceLive.

I will also add some documentation to the readme.

As for integration tests, I'll take a stab at it over the next few days.

bryanaka commented 9 years ago

@avik-das added some integration tests.

There is an issue right now where it isn't performing fast enough (so failing tests). Have to do a bit more digging to see what the issue is.

Edit: nvm having issues pushing to GH. Airport WiFi = :-1: I'll ping when I get it pushed

bryanaka commented 9 years ago

and we're back. Like I said, I'll look more into the issue next week. It may be that somewhere the files are still getting written somewhere or the fallback is slow in general.

bryanaka commented 8 years ago

Closing this PR. We had to move off of sepia in our project because we were having issues with using sepia in conjunction with Ember CLI. With everything else I am currently working on, I just don't foresee having the time to clean this up and get it merged properly.

If anyone wants to take over, I would be happy to pair.