procore 1.1.3 → 1.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dd1eb304ce63c6fc2163b5dc0fbb5e98f02e2172
4
- data.tar.gz: 7f616999b991a439f252ecee53a73c2e63d3fda0
2
+ SHA256:
3
+ metadata.gz: 8c64c7481edb94e8ea5bf67558c6467bc304375c3731d580007d7e9fb65fcbce
4
+ data.tar.gz: e6ee18c235c8f5cda2c1878ba38f64d2b8fa074a4c2b6b4da7596af08ef4b0f3
5
5
  SHA512:
6
- metadata.gz: 3b812a82954028fb21d708b42ecfe509ff735a11c29bb01eecf3d1952e5a5b6d3b246b8187d887254bbd9b6c2057dc96890580a92952e9e9c4f30e75a813ca2e
7
- data.tar.gz: 81a4a77d7b1af2a17dc5cea4400376372d84fbf533b20ae6c02f12f12a197d06c14172bc8659fa1b6d9b7592bbb247a484d2361d9646b5afcd33dda0e34c5b75
6
+ metadata.gz: f2ab59a8b83d5e140099af9fdad17f8ea67d20a9996a64bf377c9a76fa8096dfb007d7143aa42f7ba494afeef34ebe0e92b8a2f59add62d2ce75c53fe260f7ef
7
+ data.tar.gz: 8af8e42e1b49cfc57464ef18a0939ccd2bb22a60e4924235514c0c2064c6deeac03e9941b22e824df67b89ed6f675fc2c18efda2e71b8d9658a955fa29757b56
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
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
+
1
11
  ## 1.1.3 (Jun 11, 2021)
2
12
 
3
13
  * Add Procore-Sdk-Language header to all requests
data/README.md CHANGED
@@ -83,12 +83,12 @@ client = Procore::Client.new(
83
83
  )
84
84
 
85
85
  # Get the current user's companies
86
- companies = client.get("companies")
86
+ companies = client.get("companies").body
87
87
 
88
88
  companies.first[:name] #=> "Procore Company 1"
89
89
 
90
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>})
91
+ projects = client.get("projects", query: {company_id: <company_id>}, options: {company_id: <company_id>}).body
92
92
 
93
93
  projects.first[:name] #=> "Project 1"
94
94
  ```
@@ -123,7 +123,7 @@ def handle_callback
123
123
 
124
124
  # Create a new token to save into a store
125
125
  token = Procore::Auth::Token.new(
126
- access_token: auth_hash["credentials"]["token"]
126
+ access_token: auth_hash["credentials"]["token"],
127
127
  refresh_token: auth_hash["credentials"]["refresh_token"],
128
128
  expires_at: auth_hash["credentials"]["expires_at"]
129
129
  )
@@ -49,7 +49,7 @@ module Procore
49
49
  OAuth2::Client.new(
50
50
  client_id,
51
51
  client_secret,
52
- site: "#{host}/oauth/token",
52
+ site: host,
53
53
  )
54
54
  end
55
55
  end
@@ -43,7 +43,7 @@ module Procore
43
43
  OAuth2::Client.new(
44
44
  client_id,
45
45
  client_secret,
46
- site: "#{host}/oauth/token",
46
+ site: host,
47
47
  )
48
48
  end
49
49
  end
@@ -103,6 +103,7 @@ module Procore
103
103
  if token.expired?
104
104
  Util.log_info("Token Expired", store: store)
105
105
  refresh
106
+ token = fetch_token
106
107
  end
107
108
  token.access_token
108
109
  end
@@ -1,3 +1,3 @@
1
1
  module Procore
2
- VERSION = "1.1.3".freeze
2
+ VERSION = "1.1.4".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: 1.1.3
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: 2021-06-11 00:00:00.000000000 Z
11
+ date: 2022-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -304,8 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0'
306
306
  requirements: []
307
- rubyforge_project:
308
- rubygems_version: 2.6.14
307
+ rubygems_version: 3.0.3
309
308
  signing_key:
310
309
  specification_version: 4
311
310
  summary: Procore Ruby Gem