mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
Merge branch 'master' of github.com:isaacsanders/httparty
Conflicts: spec/httparty/ssl_spec.rb spec/support/ssl_test_helper.rb
This commit is contained in:
commit
d51884c6fe
1 changed files with 11 additions and 1 deletions
|
@ -3,7 +3,17 @@ require 'pathname'
|
|||
module HTTParty
|
||||
module SSLTestHelper
|
||||
def ssl_verify_test(mode, ca_basename, server_cert_filename)
|
||||
test_server = nil
|
||||
options = {
|
||||
:format => :json,
|
||||
:timeout => 30,
|
||||
}
|
||||
|
||||
if mode
|
||||
ca_path = File.expand_path("../../fixtures/ssl/generated/#{ca_basename}", __FILE__)
|
||||
raise ArgumentError.new("#{ca_path} does not exist") unless File.exist?(ca_path)
|
||||
options[mode] = ca_path
|
||||
end
|
||||
|
||||
begin
|
||||
test_server = SSLTestServer.new(
|
||||
:rsa_key => File.read(File.expand_path("../../fixtures/ssl/generated/server.key", __FILE__)),
|
||||
|
|
Loading…
Add table
Reference in a new issue