procore 1.1.1 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +32 -0
- data/README.md +10 -2
- data/lib/procore/auth/access_token_credentials.rb +1 -1
- data/lib/procore/auth/client_credentials.rb +1 -1
- data/lib/procore/auth/stores/redis.rb +1 -1
- data/lib/procore/client.rb +1 -0
- data/lib/procore/requestable.rb +2 -0
- data/lib/procore/version.rb +1 -1
- data/procore-1.1.1.gem +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c64c7481edb94e8ea5bf67558c6467bc304375c3731d580007d7e9fb65fcbce
|
4
|
+
data.tar.gz: e6ee18c235c8f5cda2c1878ba38f64d2b8fa074a4c2b6b4da7596af08ef4b0f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2ab59a8b83d5e140099af9fdad17f8ea67d20a9996a64bf377c9a76fa8096dfb007d7143aa42f7ba494afeef34ebe0e92b8a2f59add62d2ce75c53fe260f7ef
|
7
|
+
data.tar.gz: 8af8e42e1b49cfc57464ef18a0939ccd2bb22a60e4924235514c0c2064c6deeac03e9941b22e824df67b89ed6f675fc2c18efda2e71b8d9658a955fa29757b56
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
## 1.1.4 (Apr 18, 2022)
|
2
|
+
|
3
|
+
* Fix a bug with automatic token refreshing where the expired token would still be used for the first request.
|
4
|
+
|
5
|
+
* Fix requests made to incorrect URL when using newer versions of Oauth2
|
6
|
+
|
7
|
+
PR #52 - https://github.com/procore/ruby-sdk/pull/52
|
8
|
+
|
9
|
+
*Nate Baer*
|
10
|
+
|
11
|
+
## 1.1.3 (Jun 11, 2021)
|
12
|
+
|
13
|
+
* Add Procore-Sdk-Language header to all requests
|
14
|
+
|
15
|
+
PR #45 - https://github.com/procore/ruby-sdk/pull/45
|
16
|
+
|
17
|
+
*Benjamin Ross*
|
18
|
+
|
19
|
+
* Remove Redis.exists warning
|
20
|
+
|
21
|
+
PR #46 - https://github.com/procore/ruby-sdk/pull/46
|
22
|
+
|
23
|
+
*claudioprocore*
|
24
|
+
|
25
|
+
## 1.1.2 (Jun 4, 2021)
|
26
|
+
|
27
|
+
* Add Procore-Sdk-Version header to all requests
|
28
|
+
|
29
|
+
PR #44 - https://github.com/procore/ruby-sdk/pull/44
|
30
|
+
|
31
|
+
*Benjamin Ross*
|
32
|
+
|
1
33
|
## 1.1.1 (May 5, 2021)
|
2
34
|
|
3
35
|
* Change default host to 'api.procore.com'.
|
data/README.md
CHANGED
@@ -69,6 +69,9 @@ default version is `v1.0` unless otherwise configured.
|
|
69
69
|
| `client.get("me", version: "v1.1")` | `https://api.procore.com/rest/v1.1/me` |
|
70
70
|
| `client.get("me", version: "vapid")` | `https://api.procore.com/vapid/me` |
|
71
71
|
|
72
|
+
In addition to the settings above, you will need to set `company_id` in the request
|
73
|
+
options to work with [Multiple Procore Zones (MPZ)](https://developers.procore.com/documentation/tutorial-mpz).
|
74
|
+
|
72
75
|
Example Usage:
|
73
76
|
|
74
77
|
```ruby
|
@@ -80,9 +83,14 @@ client = Procore::Client.new(
|
|
80
83
|
)
|
81
84
|
|
82
85
|
# Get the current user's companies
|
83
|
-
companies = client.get("companies")
|
86
|
+
companies = client.get("companies").body
|
84
87
|
|
85
88
|
companies.first[:name] #=> "Procore Company 1"
|
89
|
+
|
90
|
+
# Get a company's projects (note the company_id value in options)
|
91
|
+
projects = client.get("projects", query: {company_id: <company_id>}, options: {company_id: <company_id>}).body
|
92
|
+
|
93
|
+
projects.first[:name] #=> "Project 1"
|
86
94
|
```
|
87
95
|
|
88
96
|
To use Procore's older API Vapid by default, the default version can be set in
|
@@ -115,7 +123,7 @@ def handle_callback
|
|
115
123
|
|
116
124
|
# Create a new token to save into a store
|
117
125
|
token = Procore::Auth::Token.new(
|
118
|
-
access_token: auth_hash["credentials"]["token"]
|
126
|
+
access_token: auth_hash["credentials"]["token"],
|
119
127
|
refresh_token: auth_hash["credentials"]["refresh_token"],
|
120
128
|
expires_at: auth_hash["credentials"]["expires_at"]
|
121
129
|
)
|
data/lib/procore/client.rb
CHANGED
data/lib/procore/requestable.rb
CHANGED
@@ -343,6 +343,8 @@ module Procore
|
|
343
343
|
"Accepts" => "application/json",
|
344
344
|
"Authorization" => "Bearer #{access_token}",
|
345
345
|
"Content-Type" => "application/json",
|
346
|
+
"Procore-Sdk-Version" => Procore::VERSION,
|
347
|
+
"Procore-Sdk-Language" => "ruby",
|
346
348
|
"User-Agent" => Procore.configuration.user_agent,
|
347
349
|
}.tap do |headers|
|
348
350
|
if options[:idempotency_token]
|
data/lib/procore/version.rb
CHANGED
data/procore-1.1.1.gem
ADDED
Binary file
|
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: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Procore Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -283,6 +283,7 @@ files:
|
|
283
283
|
- lib/procore/response.rb
|
284
284
|
- lib/procore/util.rb
|
285
285
|
- lib/procore/version.rb
|
286
|
+
- procore-1.1.1.gem
|
286
287
|
- procore.gemspec
|
287
288
|
homepage: https://github.com/procore/ruby-sdk
|
288
289
|
licenses:
|
@@ -303,8 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
304
|
- !ruby/object:Gem::Version
|
304
305
|
version: '0'
|
305
306
|
requirements: []
|
306
|
-
|
307
|
-
rubygems_version: 2.6.14
|
307
|
+
rubygems_version: 3.0.3
|
308
308
|
signing_key:
|
309
309
|
specification_version: 4
|
310
310
|
summary: Procore Ruby Gem
|