1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

rake task to remove stripe secrets from VCR cassettes

This commit is contained in:
Sylvain 2016-04-12 16:43:10 +02:00
parent 745a89f18f
commit 7817e285f0
11 changed files with 73 additions and 62 deletions

View File

@ -31,7 +31,7 @@ namespace :fablab do
puts "-> Done"
end
desc "Cancel strip subscriptions"
desc "Cancel stripe subscriptions"
task cancel_subscriptions: :environment do
Subscription.where("expired_at >= ?", Time.now.at_beginning_of_day).each do |s|
puts "-> Start cancel subscription of #{s.user.email}"
@ -179,4 +179,15 @@ namespace :fablab do
ar_base.dump_fixtures
end
end
desc 'clean stripe secrets from VCR cassettes'
task clean_cassettes_secrets: :environment do
Dir['test/vcr_cassettes/*.yml'].each do |cassette_file|
cassette = File.read(cassette_file)
cassette.gsub!(Rails.application.secrets.stripe_api_key, 'sk_test_testfaketestfaketestfake')
cassette.gsub!(Rails.application.secrets.stripe_publishable_key, 'pk_test_faketestfaketestfaketest')
puts cassette
File.write(cassette_file, cassette)
end
end
end

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -186,7 +186,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -266,7 +266,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -352,7 +352,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -436,7 +436,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -573,7 +573,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -710,7 +710,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -186,7 +186,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -365,7 +365,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -430,7 +430,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -186,7 +186,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -365,7 +365,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -449,7 +449,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -655,7 +655,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -773,7 +773,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -891,7 +891,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -186,7 +186,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -272,7 +272,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -390,7 +390,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -186,7 +186,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -367,7 +367,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -451,7 +451,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -650,7 +650,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -768,7 +768,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -886,7 +886,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -193,7 +193,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -285,7 +285,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -421,7 +421,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -633,7 +633,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -723,7 +723,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -196,7 +196,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -377,7 +377,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -469,7 +469,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -605,7 +605,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -809,7 +809,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -899,7 +899,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -76,7 +76,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -321,7 +321,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:

View File

@ -14,7 +14,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -106,7 +106,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -196,7 +196,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -408,7 +408,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -500,7 +500,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -636,7 +636,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -881,7 +881,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent:
@ -971,7 +971,7 @@ http_interactions:
User-Agent:
- Stripe/v1 RubyBindings/1.30.2
Authorization:
- Bearer sk_test_mGokO9TGtrVxMOyK4yZiktBE
- Bearer sk_test_testfaketestfaketestfake
Content-Type:
- application/x-www-form-urlencoded
X-Stripe-Client-User-Agent: