lib/support/ssl_version.rb in activemerchant-1.79.2 vs lib/support/ssl_version.rb in activemerchant-1.80.0

- old
+ new

@@ -1,18 +1,18 @@ -require "active_merchant" -require "support/gateway_support" +require 'active_merchant' +require 'support/gateway_support' class SSLVersion attr_accessor :success, :failed, :missing, :errored def initialize @gateways = GatewaySupport.new.gateways @success, @failed, @missing, @errored = [], [], [], [] end def test_gateways(min_version = :TLS1_1) - raise "Requires Ruby 2.5 or better" unless Net::HTTP.instance_methods.include?(:min_version=) + raise 'Requires Ruby 2.5 or better' unless Net::HTTP.instance_methods.include?(:min_version=) puts "Verifying #{@gateways.count} gateways for SSL min_version=#{min_version}\n\n" @gateways.each do |g| unless g.live_url @@ -23,17 +23,17 @@ uri = URI.parse(g.live_url) result, message = test_min_version(uri, min_version) case result when :success - print "." + print '.' success << g when :fail - print "F" + print 'F' failed << {:gateway => g, :message => message} when :error - print "E" + print 'E' errored << {:gateway => g, :message => message} end end print_summary @@ -68,10 +68,10 @@ http.verify_mode = OpenSSL::SSL::VERIFY_NONE # don't care about certificate validity, just protocol version http.min_version = min_version http.open_timeout = 10 http.read_timeout = 10 - http.post("/", "") + http.post('/', '') return :success rescue Net::HTTPBadResponse return :success # version negotiation succeeded rescue OpenSSL::SSL::SSLError => ex