procore 0.7.2 → 0.7.3

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: ae6c0226d347ed0e22d39b703526fdcb14d3da1b98c30ebf1ab2f73b1b9a671b
4
- data.tar.gz: 237380d9cba94cc73f07193deb05c6a029af0dbb22a772cf3a838d723d9e6c60
3
+ metadata.gz: 88538f8106ff12e1532f8b3b2837e506c336857564b05529c1013e1bb849756a
4
+ data.tar.gz: 824483dff32962cc8d39e69754e2a3e8e6bfbc159e840bd3a3ef77a586dff3d6
5
5
  SHA512:
6
- metadata.gz: 28d6ec525a47761dd88ebb8f687bb229df90c4b90748520cac67245e7b96ba39bdb75b6d611cdbcda849b8402e7f82fe0d20c8a191a8521161daa32001cc9d29
7
- data.tar.gz: db828e83fe25a0b80a262abe3e853f148e567048106871e5ea68c0c9bda43f4065b69208818e58fbfa719530d0c0ebdcb56eb69f69ac6310aecc1e2057b1bbab
6
+ metadata.gz: 4c7d776773d2111c0b6db558c2ea13703010115a0eb22481e7d8dfd00429046ef3b04ebdf9eea978ff79c9d4db415812c769eee58e82ae85e7401e8c925df25d
7
+ data.tar.gz: 9f5ccc7e220d19c4edf36c7fd4724df284d77dad43c7547f454d241f659b14d702fa4f0ad68bb5621a4d309b34219a10cb4e85c44a63b08e3874b0d98b411586
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.7.3 (March 1, 2018)
4
+
5
+ * Add 403 responses as Procore::ForbiddenError
6
+
7
+ *Michael Stock*
8
+
3
9
  ## 0.7.2 (February 28, 2018)
4
10
 
5
11
  * Add 400 responses as Procore::InvalidRequestError
data/README.md CHANGED
@@ -125,6 +125,9 @@ rescue Procore::AuthorizationError => e
125
125
  # Raised when the request is attempting to access a resource the token's
126
126
  # owner does not have access to.
127
127
 
128
+ rescue Procore::ForbiddenError => e
129
+ # Raised when the request failed because you lack the required permissions.
130
+
128
131
  rescue Procore::APIConnectionError => e
129
132
  # Raised when the gem cannot connect to the Procore API. Possible causes:
130
133
  # Procore is down or the network is doing something funny.
@@ -28,6 +28,9 @@ module Procore
28
28
  # required parameters or sending a request to access a non-existent resource.
29
29
  InvalidRequestError = Class.new(Error)
30
30
 
31
+ # Raised when the request 403's
32
+ ForbiddenError = Class.new(Error)
33
+
31
34
  # Raised when the request 404's
32
35
  NotFoundError = Class.new(Error)
33
36
 
@@ -208,6 +208,11 @@ module Procore
208
208
  "access the target resource",
209
209
  response: response,
210
210
  )
211
+ when 403
212
+ raise Procore::ForbiddenError.new(
213
+ "The request failed because you lack the required permissions",
214
+ response: response,
215
+ )
211
216
  when 404
212
217
  raise Procore::NotFoundError.new(
213
218
  "The URI requested is invalid or the resource requested does not " \
@@ -1,3 +1,3 @@
1
1
  module Procore
2
- VERSION = "0.7.2".freeze
2
+ VERSION = "0.7.3".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.7.2
4
+ version: 0.7.3
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-02-28 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack