heartcheck-webservice 1.2.0 → 1.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a13b0ede2ae23c8c063af700c379945c14b34c
|
4
|
+
data.tar.gz: f511f43f82561f8ca7c90c7fa2815c2de7c54c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0abaf51457d1912beb81150b1489b11de8397533466251fc260982d0c7253a6a58284c510e791481455b6866766160b3ead63b5a3575e67a3054604a2b4278
|
7
|
+
data.tar.gz: dede599b16655bb8f566abc73eee8bf86f8bc92603a48fd534fa8e175f9bfeafb288c3596344a2405fade5d080da5416a603d96c7771ac201e6e5cb2b6742128
|
@@ -3,9 +3,9 @@ module Heartcheck
|
|
3
3
|
module Webservice
|
4
4
|
# Http Client
|
5
5
|
class HttpClient
|
6
|
-
attr_reader :uri, :http, :proxy, :headers, :request
|
6
|
+
attr_reader :uri, :http, :proxy, :headers, :request, :open_timeout, :read_timeout
|
7
7
|
|
8
|
-
def initialize(url, proxy, ignore_ssl_cert, headers)
|
8
|
+
def initialize(url, proxy, ignore_ssl_cert, headers, open_timeout = nil, read_timeout = nil)
|
9
9
|
@uri = URI(url)
|
10
10
|
@headers = headers || {}
|
11
11
|
@proxy = URI(proxy) if proxy
|
@@ -13,6 +13,8 @@ module Heartcheck
|
|
13
13
|
@http = Net::HTTP.new(@uri.host, @uri.port, proxy_host, proxy_port)
|
14
14
|
@http.use_ssl = @uri.scheme == 'https'
|
15
15
|
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE if ignore_ssl_cert
|
16
|
+
@http.open_timeout = open_timeout if open_timeout
|
17
|
+
@http.read_timeout = read_timeout if read_timeout
|
16
18
|
end
|
17
19
|
|
18
20
|
def get
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heartcheck-webservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Locaweb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: heartcheck
|