three-sixty 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/three-sixty/client.rb +11 -4
- data/lib/three-sixty/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: 46093f5001048093a0712c6ed9d473845df12bf7
|
4
|
+
data.tar.gz: 1a98a57c052bcdaf8cee266c2c2c1edbff6cc60e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bd51cd208f2d068415d30088a7c7454ceeb0d1961ad39e34031a9b77c7d6b641188d23d7a847539c6165df6342583099e21a6f2f29815b81e8dff73bad78499
|
7
|
+
data.tar.gz: 61f5a9ceafd9c201458e3426dd5e0eedaabfff332bfa6a21b3c36109265aebca68d280a2e436b353ff47ded7c379205a0f215b9caffd70b2ce157dfcb01e46a7
|
data/.gitignore
CHANGED
data/lib/three-sixty/client.rb
CHANGED
@@ -34,11 +34,18 @@ module ThreeSixty
|
|
34
34
|
uri = URI(generate_url(resource_url, params))
|
35
35
|
@logger.debug "Resquest url #{uri.to_s}"
|
36
36
|
req = Net::HTTP::Post.new(uri, headers = generate_headers)
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
retry_counter = 0
|
38
|
+
begin
|
39
|
+
@logger.debug "Sending headers #{headers}"
|
40
|
+
res = Net::HTTP.start(uri.host) do |http|
|
41
|
+
http.request(req)
|
42
|
+
end
|
43
|
+
process_response(res)
|
44
|
+
rescue Net::ReadTimeout => e # Some requests can take a while, so just retry a few times
|
45
|
+
raise e unless retry_counter < 5
|
46
|
+
retry_counter += 1
|
47
|
+
retry
|
40
48
|
end
|
41
|
-
process_response(res)
|
42
49
|
end
|
43
50
|
|
44
51
|
private
|
data/lib/three-sixty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: three-sixty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Padden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Connecting to the 360 api
|
14
14
|
email:
|