Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add substitute capability #20

Closed
wants to merge 6 commits into from

Conversation

aneilbaboo
Copy link

Hi @avik-das - I added the substitution capability suggested in #13.

Now you can do:

var sepia = require('sepia');

sepia.substitute('<MYSECRET>', function () { return process.env.MY_ACCESS_TOKEN; });

And the fixtures will contain , while the requests will contain the value of MY_ACCESS_TOKEN.

I added tests, but couldn't quite figure out how to test the fixture files themselves. I did check that they look right, though.

* updated the README
* added tests

To preserve backwards compatibility with existing filenames, I preserved “headerNames”
in the hashparts array instead of renaming it to “headers” as would otherwise make sense.
@aneilbaboo aneilbaboo mentioned this pull request Dec 20, 2016
@aneilbaboo
Copy link
Author

Closed in favor of #22, which moves this PR to a different branch.

@aneilbaboo aneilbaboo closed this Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant