lib/rpx_now/api.rb in rpx_now-0.6.23 vs lib/rpx_now/api.rb in rpx_now-0.6.24

- old
+ new

@@ -6,11 +6,10 @@ # low-level interaction with rpxnow.com api # - send requests # - parse response # - handle server errors class Api - HOST = 'rpxnow.com' SSL_CERT = File.join(File.dirname(__FILE__), '..', '..', 'certs', 'ssl_cert.pem') def self.call(method, data) data = data.dup version = RPXNow.extract_version(data) @@ -21,13 +20,13 @@ parse_response(response) end def self.host(subdomain=nil) if subdomain - "https://#{subdomain}.#{Api::HOST}" + "https://#{subdomain}.#{RPXNow.domain}" else - "https://#{Api::HOST}" + "https://#{RPXNow.domain}" end end private @@ -47,10 +46,10 @@ def self.stringify_keys(hash) hash.map{|k,v| [k.to_s,v]} end def self.client - client = Net::HTTP.new(HOST, 443) + client = Net::HTTP.new(RPXNow.domain, 443) client.use_ssl = true client.ca_file = SSL_CERT client.verify_mode = OpenSSL::SSL::VERIFY_PEER client.verify_depth = 5 client \ No newline at end of file