procore 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/procore/requestable.rb +9 -1
- data/lib/procore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fff662a5f654e6726d9ce407f3110faef18d837bf00e1a5705ac761c568ffeb
|
4
|
+
data.tar.gz: a0618cce9e35ea519ffc819077d413a5c4f0e3a3b8d6035d6aaf57a678f6d3a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc8d4a97f3b5bafade47075b1225069cf0bee01b4296e957984ea8d1e2991b4eecbc3eedcb01a24450d9e62019a182377dc1173598501df63d8729ad664b3802
|
7
|
+
data.tar.gz: e16fd89928908356c5dc902dc8ed558b33dff38229f578e13b9a8ecef68fe1e1f7c8970fb633cf62fb27780195233f01ab17a64d105e4140b367deafaed8fa46
|
data/CHANGELOG.md
CHANGED
data/lib/procore/requestable.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "rest-client"
|
2
|
+
require "procore/errors"
|
2
3
|
|
3
4
|
module Procore
|
4
5
|
# Module which defines HTTP verbs GET, POST, PUT, PATCH and DELETE. Is
|
@@ -10,6 +11,13 @@ module Procore
|
|
10
11
|
# @example Using #post:
|
11
12
|
# client.post("projects", name: "New Project")
|
12
13
|
module Requestable
|
14
|
+
HTTP_EXCEPTIONS = [
|
15
|
+
Errno::ECONNREFUSED,
|
16
|
+
Errno::ECONNRESET,
|
17
|
+
Procore::OAuthError,
|
18
|
+
RestClient::Exceptions::Timeout,
|
19
|
+
RestClient::ServerBrokeConnection,
|
20
|
+
].freeze
|
13
21
|
# @param path [String] URL path
|
14
22
|
# @param query [Hash] Query options to pass along with the request
|
15
23
|
# @option options [Hash] :company_id
|
@@ -163,7 +171,7 @@ module Procore
|
|
163
171
|
|
164
172
|
begin
|
165
173
|
result = yield
|
166
|
-
rescue
|
174
|
+
rescue *HTTP_EXCEPTIONS => e
|
167
175
|
if retries <= Procore.configuration.max_retries
|
168
176
|
retries += 1
|
169
177
|
sleep 1.5**retries
|
data/lib/procore/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Procore Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|