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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d621f544b002b41bf109325edf010f490846969
4
- data.tar.gz: 76fa7916e8f891438788b910a95e49b99617d0a0
3
+ metadata.gz: 5586a8f4a5d00fb7900df64a663109e67d2a9dae
4
+ data.tar.gz: 4313624bbc557a07e79d11a0b287d7a2476f684b
5
5
  SHA512:
6
- metadata.gz: 0c7d3b0aab2d47c469eff84e13752f634b1a11980a4f7ece4fa19b314b57beb7223b007fcb3452702e156e933755530db3427eedb2c7c15d5b791998b996e140
7
- data.tar.gz: 21cdddd8a10d7a4a29fde874c7ed0db0ededaf1f6fe5e0a4e6931593bc02a6e6ed7b8081f62fdb7183d20f85b19e6e572dc86f65fccb7befddca2d3d0cdf0a09
6
+ metadata.gz: 50e2e100b9a081139b90c87b702ecb37d0c4cc681d9da91f6fb290f7e46fc29bbeb838bf994609432144a122fb527e510e453789b15c6da44f1847fd0975bf23
7
+ data.tar.gz: 40d8aceec369b84ec447c67032e268526b385c618201f05bad3828933bcfb6570a52fa6369ecd039ad63f8b7bd0d2ae1198053890124328a3e1a6e8d666995f7
@@ -1,4 +1,5 @@
1
- #require_relative 'request'
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
@@ -1,3 +1,3 @@
1
1
  module EmapicConsul
2
- VERSION = "0.1.5.1"
2
+ VERSION = "0.1.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emapic_consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5.1
4
+ version: 0.1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alberto Miedes Garcés