heartcheck-webservice 1.0.1 → 1.1.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: 85d95a9b12c2bb80fc047135b70e3a385271774e
|
4
|
+
data.tar.gz: ef9f8312db964a9c4d6bd0a41b0d8556fec7e2ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 513cf0300e92f97d86d356086ada4f39480c19f4af118c77c26b0baa4249e86880169b630032dd9bd95eaaedcbf292ffc462d48c99f2a1bd787b99b71200469a
|
7
|
+
data.tar.gz: 4d0c97d8bec29a5223b24c6394a995fd59fb0efaa9d22ab33bf143a9ae92e8ecf12822d0f32a50d063112af8ad0d027b57b59de37ea2f8fb064a9aae5dbb4635
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# enconding: utf-8
|
2
|
+
module Heartcheck
|
3
|
+
module Webservice
|
4
|
+
# Http Client
|
5
|
+
class HttpClient
|
6
|
+
attr_reader :uri, :http
|
7
|
+
|
8
|
+
def initialize(url, ignore_ssl_cert)
|
9
|
+
@uri = URI url
|
10
|
+
@http = Net::HTTP.new(@uri.host, @uri.port)
|
11
|
+
@http.use_ssl = @uri.scheme == 'https'
|
12
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE if ignore_ssl_cert
|
13
|
+
end
|
14
|
+
|
15
|
+
def get
|
16
|
+
http.request Net::HTTP::Get.new(uri.request_uri)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heartcheck-webservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Locaweb
|
@@ -159,6 +159,7 @@ extra_rdoc_files: []
|
|
159
159
|
files:
|
160
160
|
- lib/heartcheck/checks/webservice.rb
|
161
161
|
- lib/heartcheck/webservice.rb
|
162
|
+
- lib/heartcheck/webservice/http_client.rb
|
162
163
|
- lib/heartcheck/webservice/version.rb
|
163
164
|
homepage: http://developer.locaweb.com.br
|
164
165
|
licenses:
|