ovh 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: '01379e3dde0247b1d0db1af760ade24315e265c375043f89ed4fb22629c53490'
4
- data.tar.gz: ae3367038fe155ab8a64db0c0449a1fa05e949e46484a71c363460383e3d0f95
3
+ metadata.gz: bde464856d7fe9273a20a1990f0dc2fd8ea776b5ad8da9a66560bfac0afdfc8e
4
+ data.tar.gz: debf427170dbeec6fef454250f1ed9d3644560575bc59cb274b9fd575a1f4c96
5
5
  SHA512:
6
- metadata.gz: f8bf6535dbf35a494226d31d3fdbaf0c1477ab69cfc664fa54f00364442253e3971def616878210e31fbfd5e8c327c2fd184b6773df6ac937675ecb324d71feb
7
- data.tar.gz: 16fe66ac6437146e7a9554b5ca0918113c99ee331a67f926c568d4d9665427ee8af6e0c9872fc4b3269ad93ae8495ff4e7e3dc555dd74968812f0b6e3db53ebb
6
+ metadata.gz: 0bc0155877ef9100a882c811afea6f640b6ca7bb8ab2cf68bcf2be5b023a013e4439fddc50c094bdaa8cf934c2a8aa3daa0953e4d039eedea2b3eb01b41413b6
7
+ data.tar.gz: aae2c258a74af3e8ef3a694640975aff22ffbff4f7d01e4e0ce938393b1479519f0c58f1656fb595a855d8fef0abb451e9e6413d9c664ddc421b00a9ac4baa63
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ovh (0.1.1)
4
+ ovh (0.1.2)
5
5
  faraday (~> 0.15.2)
6
6
  faraday_middleware (>= 0.12.2)
7
7
 
@@ -61,16 +61,23 @@ module Ovh
61
61
  builder.adapter :net_http
62
62
  end
63
63
 
64
- response = case method
65
- when :get, :head, :options
66
- connection.send(method) do |request|
67
- request.params = params if params && !params.empty?
68
- end
69
- when :post, :put, :patch, :delete
70
- connection.send(method) do |request|
71
- request.body = data if data && !data.empty?
72
- request.params = params if params && !params.empty?
73
- end
64
+ response = nil
65
+
66
+ begin
67
+ response = case method
68
+ when :get, :head, :options
69
+ connection.send(method) do |request|
70
+ request.params = params if params && !params.empty?
71
+ end
72
+ when :post, :put, :patch, :delete
73
+ connection.send(method) do |request|
74
+ request.body = data if data && !data.empty?
75
+ request.params = params if params && !params.empty?
76
+ end
77
+ end
78
+ rescue Faraday::TimeoutError, Faraday::ConnectionFailed => e
79
+ retries -= 1
80
+ retry if retries > 0
74
81
  end
75
82
 
76
83
  return response&.body
@@ -1,3 +1,3 @@
1
1
  module Ovh
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-12 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday