lib/calabash-cucumber/http/http.rb in calabash-cucumber-0.19.2 vs lib/calabash-cucumber/http/http.rb in calabash-cucumber-0.20.0

- old
+ new

@@ -13,16 +13,19 @@ # @!visibility private def self.ping_app endpoint = Calabash::Cucumber::Environment.device_endpoint url = URI.parse(endpoint) - + path = url.path http = Net::HTTP.new(url.host, url.port) + if url.scheme == "https" + http.use_ssl = true + http.verify_mode = OpenSSL::SSL::VERIFY_NONE + end response = http.start do |sess| - sess.request(Net::HTTP::Get.new("version")) + sess.request(Net::HTTP::Get.new("#{path}version")) end - body = nil success = response.is_a?(Net::HTTPSuccess) if success json = response.body begin @@ -110,6 +113,5 @@ end end end end -