twitter_ebooks 3.0.1 → 3.0.2

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: 3328234bbea5d2c32d76bd94af374cc5df1e85e2
4
- data.tar.gz: c6657971137b56ba1f0a3edc758d2e467062611d
3
+ metadata.gz: b1653168f35eb5cda95944202507474e06124058
4
+ data.tar.gz: 702e6a68681f85195b296cc514f9754fd46118ed
5
5
  SHA512:
6
- metadata.gz: 4ea260cf0fe888cdfa10b7b168ddf4331d51fc835ef85afcaa4f0e6591c56adb25984c1b24a117ef0d2407ca9d78ef22bb80013d4e05db8b1bb35af0c0a9899b
7
- data.tar.gz: f4eda05cce4092fe8ec37868eaf7ec0dab7b1e1f4c5a2a465dff8b12bc718250a26fbe7282ecce5986a855aaae826c98109accfb0c2375be48dcda916348ebb4
6
+ metadata.gz: 476ed9ec5398f779b3f636ebf1c5cb439fa7c88523846f7c01b8564175f1a2ff14f4da67f7f3751014e755539b2ecdbf302a60a0d87990b19f6d6a931a3d8b22
7
+ data.tar.gz: b9b0ea74a8c0ca546ae176f9495921edcebd6ddfb21dd8dc5148e0057642032d4257740e9acef8d428ce2ebd89fc7884aeb91f8f55ec1d39765fb940feea7873
@@ -73,10 +73,16 @@ module Ebooks
73
73
 
74
74
  loop do
75
75
  opts[:max_id] = max_id unless max_id.nil?
76
- new = @client.user_timeline(@username, opts)
76
+ begin
77
+ new = @client.user_timeline(@username, opts)
78
+ rescue Twitter::Error::TooManyRequests
79
+ log "Rate limit exceeded. Waiting for 5 mins before retry."
80
+ sleep 60*5
81
+ retry
82
+ end
77
83
  break if new.length <= 1
78
84
  tweets += new
79
- puts "Received #{tweets.length} new tweets"
85
+ log "Received #{tweets.length} new tweets"
80
86
  max_id = new.last.id
81
87
  end
82
88
 
@@ -1,3 +1,3 @@
1
1
  module Ebooks
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_ebooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaiden Mispy