emapic_consul 0.1.5.1 → 0.1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emapic_consul/api.rb +11 -1
- data/lib/emapic_consul/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5586a8f4a5d00fb7900df64a663109e67d2a9dae
|
4
|
+
data.tar.gz: 4313624bbc557a07e79d11a0b287d7a2476f684b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50e2e100b9a081139b90c87b702ecb37d0c4cc681d9da91f6fb290f7e46fc29bbeb838bf994609432144a122fb527e510e453789b15c6da44f1847fd0975bf23
|
7
|
+
data.tar.gz: 40d8aceec369b84ec447c67032e268526b385c618201f05bad3828933bcfb6570a52fa6369ecd039ad63f8b7bd0d2ae1198053890124328a3e1a6e8d666995f7
|
data/lib/emapic_consul/api.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
require 'net/http'
|
2
|
+
require 'openssl'
|
2
3
|
|
3
4
|
module EmapicConsul
|
4
5
|
class Api
|
@@ -97,5 +98,14 @@ module EmapicConsul
|
|
97
98
|
def self.api_secret
|
98
99
|
ENV['EMAPIC_SECRET']
|
99
100
|
end
|
101
|
+
|
102
|
+
# TODO: this code is duplicated inside EmapicConsul::Request. Must delete
|
103
|
+
# this when the get_random_address method is deleted
|
104
|
+
def self.build_http_object(uri)
|
105
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
106
|
+
http.use_ssl = true
|
107
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
108
|
+
http
|
109
|
+
end
|
100
110
|
end
|
101
111
|
end
|