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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7654871c3d9bcf462a38bae7694e54444da0ce52f53276b41baa26ae6440dfb2
4
- data.tar.gz: 68ba0f550d88869e4eebd382585df01a232b77ba5f0f84361b16da036a52f242
3
+ metadata.gz: 6fff662a5f654e6726d9ce407f3110faef18d837bf00e1a5705ac761c568ffeb
4
+ data.tar.gz: a0618cce9e35ea519ffc819077d413a5c4f0e3a3b8d6035d6aaf57a678f6d3a6
5
5
  SHA512:
6
- metadata.gz: b52ad7bec7c5c7aa6d6e658a490a72d6f481c6f0c046aa247d58c703698d02170bb3db241ba801362d1bf8969f55e262ccb665ba5bb11d758c6fbccaaa4da429
7
- data.tar.gz: bf2b57f7595b6bf9fabdf9b75246700246e6722176d69502b447b2f264c331a326cef613ca10b215bce93a2d0d19821632480b5391bbb2298d8577daa9f10ce9
6
+ metadata.gz: cc8d4a97f3b5bafade47075b1225069cf0bee01b4296e957984ea8d1e2991b4eecbc3eedcb01a24450d9e62019a182377dc1173598501df63d8729ad664b3802
7
+ data.tar.gz: e16fd89928908356c5dc902dc8ed558b33dff38229f578e13b9a8ecef68fe1e1f7c8970fb633cf62fb27780195233f01ab17a64d105e4140b367deafaed8fa46
@@ -1,5 +1,10 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.8.5 (May 9, 2018)
4
+ * Rescue Errno::ECONNREFUSED errors and RestClient::ServerBrokeConnection
5
+
6
+ *Casey Ochs*
7
+
3
8
  ## 0.8.4 (May 8, 2018)
4
9
 
5
10
  * Use symbol key access for headers object
@@ -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 RestClient::Exceptions::Timeout, Errno::ECONNREFUSED, Procore::OAuthError => e
174
+ rescue *HTTP_EXCEPTIONS => e
167
175
  if retries <= Procore.configuration.max_retries
168
176
  retries += 1
169
177
  sleep 1.5**retries
@@ -1,3 +1,3 @@
1
1
  module Procore
2
- VERSION = "0.8.4".freeze
2
+ VERSION = "0.8.5".freeze
3
3
  end
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
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-08 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack