mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-08 00:02:46 -04:00
Merge pull request #372 from stripe/brandur-update-bundle
Update CA bundle
This commit is contained in:
commit
687be7015d
@ -60,6 +60,10 @@ Run a single test:
|
||||
|
||||
bundle exec ruby -Ilib/ test/stripe/util_test.rb -n /should.convert.names.to.symbols/
|
||||
|
||||
Update bundled CA certificates from the [Mozilla cURL release][curl]:
|
||||
|
||||
bundle exec rake update_certs
|
||||
|
||||
== Configuration
|
||||
|
||||
=== ca_bundle_path
|
||||
@ -78,3 +82,5 @@ algorithm used to determine the length of the delay. Default value is 0.
|
||||
Example:
|
||||
|
||||
Stripe.max_network_retries = 2
|
||||
|
||||
[curl]: http://curl.haxx.se/docs/caextract.html
|
||||
|
10
Rakefile
10
Rakefile
@ -5,3 +5,13 @@ task :default => [:test]
|
||||
Rake::TestTask.new do |t|
|
||||
t.pattern = './test/**/*_test.rb'
|
||||
end
|
||||
|
||||
desc "update bundled certs"
|
||||
task :update_certs do
|
||||
require "restclient"
|
||||
File.open(File.join(File.dirname(__FILE__), 'lib', 'data', 'ca-certificates.crt'), 'w') do |file|
|
||||
resp = RestClient.get "https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt"
|
||||
abort("bad response when fetching bundle") unless resp.code == 200
|
||||
file.write(resp.to_str)
|
||||
end
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user