stripe-ruby/Rakefile
Brandur 31bbf02d4d Update CA bundle
Our CA bundle has fallen quite out of date since it was last pulled.
This patch updates it and adds a Rake task to make this task more
repeatable.

One thing worth noting is I've switched us over from the Ubuntu bundle
to the Mozilla bundle that's maintained by cURL. The bundle seemed to be
previously extracted by a custom script that I don't really want to
maintain. cURL and Excon both use the Mozilla bundle and it should be a
safe replacement.
2016-01-26 14:32:16 -08:00

18 lines
500 B
Ruby

require 'rake/testtask'
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