uptimerobot_cmd 0.3.2 → 0.3.3

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: 5b877d52bb12c20aceed5bdb99e02725acf2cd05
4
- data.tar.gz: fe6d14c21870ae7fbf9791268489f20a01605ab0
3
+ metadata.gz: 951f3eb7ede3b62e98ba0e0cd72465f2d5aaa6d1
4
+ data.tar.gz: aac7a2f6527894e3ee6f8fc4357e0d165566e392
5
5
  SHA512:
6
- metadata.gz: 0727c4e106984120cf365f55082ea8e6e3e7831cd0da8852e28c1683feb60f1a8c5b3333305e57e4b1e5e6ff3fce096a8a29c902a5b54e170a29f1367786af04
7
- data.tar.gz: 3fbb71f86ac52ee326df910b762698925b8b28f54dc21bf9413ef594b1c724791b1a8f201e5a660733e0abb7419a377740a9cd0bea5dc5f928d014a0bf302ea6
6
+ metadata.gz: c4b1c9139b96f6dc6ce6b3c46912a7bd50690a77dc6e33670a913bab41845fdd635e5b8d35745f1d99d8dc9c1e3f9eaa14f9a599733d06a517b379dbb39ea0a3
7
+ data.tar.gz: 731438df1585143f37657fbb4ebcb1832ceab7f07f46ae9a48797df5e91e66a415c3c51bc539327421d63495f81e374572af85b6e4da8154ca8523f3fec952cf
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-yellow.svg)
2
+ ![Version](https://img.shields.io/badge/version-0.3.3-yellow.svg)
3
3
 
4
4
 
5
5
  # UptimerobotCmd
@@ -60,16 +60,15 @@ module UptimerobotCmd
60
60
  output = response["monitors"]["monitor"]
61
61
 
62
62
  if total > limit
63
- output = []
64
63
  max_pages = total / limit
65
64
  left_over = total % limit
66
65
  max_pages += 1 if left_over > 0
67
66
  current_page = 1
68
- while current_page <= max_pages
69
- options[:offset] = offset
67
+ while current_page < max_pages
68
+ options[:offset] = current_page * limit
69
+ puts "fetching... #{options[:offset]}"
70
70
  response = HTTParty.get(::UptimerobotCmd.build_service_url(:get_monitors, options))
71
71
  output += response["monitors"]["monitor"]
72
- offset = current_page * limit
73
72
  current_page += 1
74
73
  end
75
74
  end
@@ -1,3 +1,3 @@
1
1
  module UptimerobotCmd
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uptimerobot_cmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uğur Özyılmazel