procore 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +7 -0
- data/README.md +21 -1
- data/lib/procore/client.rb +1 -1
- data/lib/procore/errors.rb +3 -0
- data/lib/procore/requestable.rb +1 -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: 077a873c81ee1fd3e8a28c07f47705c80a7b32a1b8feeaa47d287ea3fb577e39
|
|
4
|
+
data.tar.gz: 922b0b81c2f3231909a5001668c8b90cf5a18761ad56b05744243713726110ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dedca26f4c6abaccd4ec1155a2b582909d48f3214f67944d2e06f577d66987d1c4bc5e49567885c74955626b2fd5899c414bd2c2056fc2880bed12a81915e775
|
|
7
|
+
data.tar.gz: 53bc7810d4dd0b77067418e213ec3487688c967bb46edfdcde750783c205b864f3df58275fdb662e504eb316cbf0e35e4ad543aa42e6e8ba42a0b5ea96659bff
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/procore/ruby-sdk)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
#### Table of Contents
|
|
6
|
+
- [Installation](#installation)
|
|
7
|
+
- [Making Requests](#making-requests)
|
|
8
|
+
- [Usage](#usage)
|
|
9
|
+
- [Error Handling](#error-handling)
|
|
10
|
+
- [Pagination](#pagination)
|
|
11
|
+
- [Navigating Through Paginated Results](#navigating-through-paginated-results)
|
|
12
|
+
- [Change Number of Results](#change-number-of-results)
|
|
13
|
+
- [Configuration](#configuration)
|
|
14
|
+
- [Stores](#stores)
|
|
15
|
+
- [Session Store](#session-store)
|
|
16
|
+
- [Redis Store](#redis-store)
|
|
17
|
+
- [ActiveRecord Store](#activerecord-store)
|
|
18
|
+
- [File Store](#file-store)
|
|
19
|
+
- [Memory Store](#memory-store)
|
|
20
|
+
- [Full Example](#full-example)
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
6
23
|
|
|
7
24
|
Add this line to your application's Gemfile:
|
|
8
25
|
|
|
@@ -121,6 +138,9 @@ rescue Procore::OAuthError => e
|
|
|
121
138
|
# Raised whenever there is a problem with OAuth. Possible causes: required
|
|
122
139
|
# credentials are missing or an access token failed to refresh.
|
|
123
140
|
|
|
141
|
+
rescue Procore::MissingTokenError => e
|
|
142
|
+
# Raised whenever an access token is nil or invalid.
|
|
143
|
+
|
|
124
144
|
rescue Procore::AuthorizationError => e
|
|
125
145
|
# Raised when the request is attempting to access a resource the token's
|
|
126
146
|
# owner does not have access to.
|
data/lib/procore/client.rb
CHANGED
|
@@ -52,7 +52,7 @@ module Procore
|
|
|
52
52
|
token = store.fetch
|
|
53
53
|
|
|
54
54
|
if token.nil? || token.invalid?
|
|
55
|
-
raise Procore::
|
|
55
|
+
raise Procore::MissingTokenError.new(
|
|
56
56
|
"Unable to retreive an access token from the store. Double check " \
|
|
57
57
|
"your store configuration and make sure to correctly store a token " \
|
|
58
58
|
"before attempting to make API requests",
|
data/lib/procore/errors.rb
CHANGED
data/lib/procore/requestable.rb
CHANGED
|
@@ -163,7 +163,7 @@ module Procore
|
|
|
163
163
|
|
|
164
164
|
begin
|
|
165
165
|
result = yield
|
|
166
|
-
rescue RestClient::Exceptions::Timeout, Errno::ECONNREFUSED => e
|
|
166
|
+
rescue RestClient::Exceptions::Timeout, Errno::ECONNREFUSED, Procore::OAuthError => e
|
|
167
167
|
if retries <= Procore.configuration.max_retries
|
|
168
168
|
retries += 1
|
|
169
169
|
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.2
|
|
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-
|
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack
|