uptimerobot_cmd 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/uptimerobot_cmd/version.rb +1 -1
- data/lib/uptimerobot_cmd.rb +2 -2
- 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: 5b877d52bb12c20aceed5bdb99e02725acf2cd05
|
4
|
+
data.tar.gz: fe6d14c21870ae7fbf9791268489f20a01605ab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0727c4e106984120cf365f55082ea8e6e3e7831cd0da8852e28c1683feb60f1a8c5b3333305e57e4b1e5e6ff3fce096a8a29c902a5b54e170a29f1367786af04
|
7
|
+
data.tar.gz: 3fbb71f86ac52ee326df910b762698925b8b28f54dc21bf9413ef594b1c724791b1a8f201e5a660733e0abb7419a377740a9cd0bea5dc5f928d014a0bf302ea6
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/vigo/uptimerobot_cmd.svg?branch=master)](https://travis-ci.org/vigo/uptimerobot_cmd)
|
2
|
-
![Version](https://img.shields.io/badge/version-0.3.
|
2
|
+
![Version](https://img.shields.io/badge/version-0.3.2-yellow.svg)
|
3
3
|
|
4
4
|
|
5
5
|
# UptimerobotCmd
|
data/lib/uptimerobot_cmd.rb
CHANGED
@@ -55,12 +55,12 @@ module UptimerobotCmd
|
|
55
55
|
limit: limit,
|
56
56
|
offset: offset,
|
57
57
|
}
|
58
|
-
output = []
|
59
58
|
response = HTTParty.get(::UptimerobotCmd.build_service_url(:get_monitors, options))
|
60
59
|
total = response["total"].to_i
|
61
|
-
output
|
60
|
+
output = response["monitors"]["monitor"]
|
62
61
|
|
63
62
|
if total > limit
|
63
|
+
output = []
|
64
64
|
max_pages = total / limit
|
65
65
|
left_over = total % limit
|
66
66
|
max_pages += 1 if left_over > 0
|