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

Refactor Converters, Filter header values. #3

Merged
merged 2 commits into from Mar 3, 2014
Merged

Refactor Converters, Filter header values. #3

merged 2 commits into from Mar 3, 2014

Conversation

BlakeWilliams
Copy link
Contributor

In one of my applications I'm using ExVCR but need to parse out the value of an API key in the headers as well as the body.

This PR removes all the common code from the 3 adapter converters and places it into a new module called ExVCR.Converter. All of the methods are overridable.

Finally, ExVCR.Filter.filter_sensitive_data is called on all of the header values.

All 3 adapter converters were sharing a set of common functions so
they've been extracted out into their own module called ExVCR.Converter.

It implements the methods on the converters using the __using__ callback.

They are all overridable.
Headers were unable to be filtered, now they're filtered the same way as
body filters using ExVCR.Filter.filter_sensitive_data.
parroty added a commit that referenced this pull request Mar 3, 2014
Refactor Converters, Filter header values.
@parroty parroty merged commit f24c06c into parroty:master Mar 3, 2014
@parroty
Copy link
Owner

parroty commented Mar 3, 2014

Thanks!

@BlakeWilliams BlakeWilliams deleted the header_filter branch March 3, 2014 16:40
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.

None yet

2 participants