disable ssl verification in ruby 2.5

This commit is contained in:
HoneyryderChuck 2018-02-17 16:23:47 +00:00
parent 6bd97e0526
commit 0dd9d1152c

View File

@ -14,5 +14,13 @@ end
require "httpx"
# TODO: remove this once ruby 2.5 bug is fixed:
# https://github.com/ruby/openssl/issues/187
if RUBY_ENGINE == "ruby" &&
RUBY_VERSION == "2.5.0" &&
ENV.key?("SSL_CERT_FILE")
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:verify_mode] = 0
end
Dir[File.join(".", "test", "support", "*.rb")].each { |f| require f }
Dir[File.join(".", "test", "support", "**", "*.rb")].each { |f| require f }