summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-25 14:37:52 -0700
committerelijah <elijah@riseup.net>2014-06-25 14:37:52 -0700
commitc463cb45bafeb308aa778844f3a0a7eadb467597 (patch)
tree3fba3ed849ae386d45789c2651ca154e9037e0a9 /bin
parentffe760c06b3189bc5d67653e952fd44fdb0f08cf (diff)
parentfba004bc8cbee0d9556538342ce78ac1c9d1229b (diff)
Merge branch 'develop' into feature/couch
Diffstat (limited to 'bin')
-rwxr-xr-xbin/run_tests17
1 files changed, 12 insertions, 5 deletions
diff --git a/bin/run_tests b/bin/run_tests
index 526aa83a..3ba89684 100755
--- a/bin/run_tests
+++ b/bin/run_tests
@@ -127,11 +127,18 @@ class LeapTest < MiniTest::Unit::TestCase
if params
uri.query = URI.encode_www_form(params)
end
- response = Net::HTTP.get_response(uri)
- if response.is_a?(Net::HTTPSuccess)
- yield response.body, response, nil
- else
- yield nil, response, nil
+ http = Net::HTTP.new uri.host, uri.port
+ if uri.scheme == 'https'
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ http.use_ssl = true
+ end
+ http.start do |agent|
+ response = agent.get(uri.request_uri)
+ if response.is_a?(Net::HTTPSuccess)
+ yield response.body, response, nil
+ else
+ yield nil, response, nil
+ end
end
rescue => exc
yield nil, nil, exc