lib/git-semaphore/api.rb in git-semaphore-0.0.4 vs lib/git-semaphore/api.rb in git-semaphore-0.0.5
- old
+ new
@@ -1,7 +1,8 @@
require 'uri'
require 'net/http'
+require 'openssl'
module Git
module Semaphore
class Api
@@ -31,10 +32,10 @@
end
# helper functions
def self.get_response uri, action=:get
- ::Net::HTTP.start(uri.host, uri.port, :use_ssl => (uri.scheme == 'https'), :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |net_http|
+ ::Net::HTTP.start(uri.host, uri.port, :use_ssl => (uri.scheme == 'https'), :verify_mode => ::OpenSSL::SSL::VERIFY_NONE) do |net_http|
case action
when :get
net_http.get uri.request_uri
when :post
net_http.post uri.request_uri, uri.query