heartcheck-webservice 1.3.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/heartcheck/checks/webservice.rb +12 -6
- data/lib/heartcheck/webservice/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69c81f0a8ea88221f9db52b9d8eca7a053493bce
|
4
|
+
data.tar.gz: 294c766bb22999f1b0af0452b6e49011d5c2fd1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 404d88d5fb1c734c367a680579d3307bcfc50daf337ca7c524a15c1c6edbdeb6cffe1162679628b9c9c1ace864448b74b27e622df976e68f6f497fdebdfef580
|
7
|
+
data.tar.gz: 9316aa576f77a2e0f03ceed0625fa2bcc151e978d647829d81308e6e5cc463fd1e63e6ec77d42fc2c6fa9840ada3f34ade85c6e1d8637cd19a19c55c889ed2b0
|
@@ -14,6 +14,10 @@ module Heartcheck
|
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
|
+
DEFAULT_OPEN_TIMEOUT = 3
|
18
|
+
DEFAULT_READ_TIMEOUT = 5
|
19
|
+
private_constant :DEFAULT_OPEN_TIMEOUT, :DEFAULT_READ_TIMEOUT
|
20
|
+
|
17
21
|
# customize the error message
|
18
22
|
# It's called in Heartcheck::Checks::Base#append_error
|
19
23
|
#
|
@@ -79,12 +83,14 @@ module Heartcheck
|
|
79
83
|
#
|
80
84
|
# @return [Net:HTTP]
|
81
85
|
def request_for(service)
|
82
|
-
Heartcheck::Webservice::HttpClient.new(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
86
|
+
Heartcheck::Webservice::HttpClient.new(
|
87
|
+
service[:url],
|
88
|
+
service[:proxy],
|
89
|
+
service[:ignore_ssl_cert],
|
90
|
+
service[:headers],
|
91
|
+
service.fetch(:open_timeout, DEFAULT_OPEN_TIMEOUT),
|
92
|
+
service.fetch(:read_timeout, DEFAULT_READ_TIMEOUT)
|
93
|
+
).get
|
88
94
|
end
|
89
95
|
end
|
90
96
|
end
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Locaweb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: heartcheck
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.6.
|
178
|
+
rubygems_version: 2.6.13
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: A webservice checker.
|