funky 0.2.24 → 0.2.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/funky/connections/api.rb +1 -1
- data/lib/funky/connections/base.rb +2 -2
- data/lib/funky/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 268438a57d6076e2cee11b564babe1987b212ea9
|
4
|
+
data.tar.gz: e3ff636db3b921f81ad22b2c13cb660c6e17cb5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a30cb5465c2235b26e65ae3d3aabe86efe0df1c0a1707713a2ba147cbc44273b7b7e89b488d15f460158e56a40c7a8176bd7ecf98b4922d815fc0c05784d837b
|
7
|
+
data.tar.gz: 256c4f2469dedf5c38e76b2ceaedb9bd424794f5d6246ce5e80c051c9a761edde2f72968a405bd956a51f45028fd896f80570317f65f6824667d8bcd3459c3f0
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
+
## 0.2.25 - 2017/05/16
|
10
|
+
|
11
|
+
* [FEATURE] Retry up to 5 times if Facebook responds with error
|
12
|
+
|
9
13
|
## 0.2.24 - 2017/05/10
|
10
14
|
|
11
15
|
* [BUGFIX] Raise Funky::ContentNotFound error when a page does not return
|
@@ -29,8 +29,8 @@ module Funky
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.fetch_multiple_pages(uri)
|
32
|
-
json = json_for(uri)
|
33
32
|
puts "Fetching '#{uri.path}' until #{ URI.decode_www_form(uri.query).to_h['until'] || 'now'}"
|
33
|
+
json = json_for(uri)
|
34
34
|
if json[:data].empty?
|
35
35
|
@try_count ||= 0
|
36
36
|
if @previous_timestamp && @try_count < 1 && (Date.parse @previous_timestamp rescue nil)
|
@@ -9,7 +9,7 @@ module Funky
|
|
9
9
|
Net::HTTP::Get.new(uri.request_uri)
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.response_for(http_request, uri, max_retries =
|
12
|
+
def self.response_for(http_request, uri, max_retries = 5)
|
13
13
|
response = Net::HTTP.start(uri.host, 443, use_ssl: true) do |http|
|
14
14
|
http.request http_request
|
15
15
|
end
|
@@ -26,7 +26,7 @@ module Funky
|
|
26
26
|
|
27
27
|
def self.sleep_and_retry_response_for(http_request, uri, retries, message)
|
28
28
|
if retries > 0
|
29
|
-
sleep (
|
29
|
+
sleep (6 - retries) ** 2
|
30
30
|
response_for http_request, uri, retries - 1
|
31
31
|
else
|
32
32
|
raise ConnectionError, message
|
data/lib/funky/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|