boppers-uptime 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gems.locked +1 -1
- data/lib/boppers/uptime/version.rb +1 -1
- data/lib/boppers/uptime.rb +6 -3
- 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: 4797774f895bc5f4117a0a0c2385a2d7e7bd982b
|
4
|
+
data.tar.gz: 97ef027856f6f2b7dac2a52011f91705121fa88e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48e77379feac150ac59747e5b7cc8ea9a65c252dd44640c8d25510f5a57830318c0e60f988dd184b153ff939c0edd0b33f11f318bcdc9ed700aa95a8c93a7ecf
|
7
|
+
data.tar.gz: a4e3ae22fe88499489382982467ba5fc94ab49da283da43244d41fce0e56f05aea8f5b117d9bff0ecf18070f26ccdbbda6c45d0dadaf5ee61a561e1dfd14fb72
|
data/gems.locked
CHANGED
data/lib/boppers/uptime.rb
CHANGED
@@ -27,9 +27,12 @@ module Boppers
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def call
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
succeed = begin
|
31
|
+
response = HttpClient.get(url, {}, {}, timeout: 1)
|
32
|
+
valid_response?(response)
|
33
|
+
rescue SocketError, Timeout::Error
|
34
|
+
false
|
35
|
+
end
|
33
36
|
|
34
37
|
return succeed! if succeed
|
35
38
|
|