Created
November 5, 2014 15:02
-
-
Save just3ws/63ffc2692a5a10761d48 to your computer and use it in GitHub Desktop.
VCR configuration that does a pretty good job of filtering out GitHub, Twitter, and LinkedIn keys.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VCR.configure do |c| | |
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes' | |
c.hook_into :webmock | |
c.ignore_localhost = true | |
c.default_cassette_options = { record: :new_episodes } | |
c.allow_http_connections_when_no_cassette = false | |
c.configure_rspec_metadata! | |
c.ignore_hosts 'codeclimate.com' | |
filters = [] | |
# Github | |
filters += %w(GITHUB_ADMIN_USER_PASSWORD GITHUB_CLIENT_ID GITHUB_SECRET) | |
filters += %w(LINKEDIN_KEY LINKEDIN_SECRET) | |
# Mailgun | |
filters += %w(MAILGUN_API_KEY MAILGUN_TOKEN) | |
# Mixpanel | |
filters += %w(MIXPANEL_API_SECRET MIXPANEL_TOKEN) | |
filters += %w( | |
TWITTER_ACCESS_TOKEN | |
TWITTER_ACCESS_TOKEN_SECRET | |
TWITTER_ACCOUNT_ID | |
TWITTER_API_KEY | |
TWITTER_API_SECRET | |
TWITTER_CONSUMER_KEY | |
TWITTER_CONSUMER_SECRET | |
TWITTER_OAUTH_SECRET | |
TWITTER_OAUTH_TOKEN | |
TWITTER_OWNER | |
TWITTER_OWNER_ID | |
) | |
# Stripe | |
filters += %w(STRIPE_PUBLISHABLE_KEY STRIPE_SECRET_KEY) | |
# Akismet | |
filters += %w(AKISMET_KEY) | |
filters.each do |filter| | |
c.filter_sensitive_data("<#{filter}>") { ENV[filter] } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment