help_scout 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -3
- data/Gemfile +0 -2
- data/LICENSE.txt +1 -1
- data/lib/help_scout/version.rb +1 -1
- data/lib/help_scout.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 22b43808e985721324615d9c33c751eb33f65f5bae676011184755d7dd444a75
|
4
|
+
data.tar.gz: 0d1a6a13c8b4e19009a9f343d56a04109db74a552fcb006fccc1c55e0b76ab7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb05fac372cb9e6c5ed969508979c4024b125bb1aec84dd23902ee5608f5444ea888abaa53e0f3bc6954e2c1a56e63287f6f7f4f8513f53e1a48a03a49b9067c
|
7
|
+
data.tar.gz: bbd7e6fa76ec38854acc3b13e29c73ebb144ee83dd314061419d06bc73926a574ab6668b85254958280ed2c03c1e7a2a6aa7b095ce02ef4f8eedf4d686eb0733
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/lib/help_scout/version.rb
CHANGED
data/lib/help_scout.rb
CHANGED
@@ -7,6 +7,7 @@ class HelpScout
|
|
7
7
|
class NotFoundError < StandardError; end
|
8
8
|
class TooManyRequestsError < StandardError; end
|
9
9
|
class InternalServerError < StandardError; end
|
10
|
+
class ForbiddenError < StandardError; end
|
10
11
|
|
11
12
|
# Status codes used by Help Scout, not all are implemented in this gem yet.
|
12
13
|
# http://developer.helpscout.net/help-desk-api/status-codes/
|
@@ -14,6 +15,7 @@ class HelpScout
|
|
14
15
|
HTTP_CREATED = 201
|
15
16
|
HTTP_NO_CONTENT = 204
|
16
17
|
HTTP_BAD_REQUEST = 400
|
18
|
+
HTTP_FORBIDDEN = 403
|
17
19
|
HTTP_NOT_FOUND = 404
|
18
20
|
HTTP_TOO_MANY_REQUESTS = 429
|
19
21
|
HTTP_INTERNAL_SERVER_ERROR = 500
|
@@ -233,6 +235,8 @@ class HelpScout
|
|
233
235
|
@last_response.parsed_response
|
234
236
|
when HTTP_BAD_REQUEST
|
235
237
|
raise ValidationError, last_response.parsed_response["message"]
|
238
|
+
when HTTP_FORBIDDEN
|
239
|
+
raise ForbiddenError
|
236
240
|
when HTTP_NOT_FOUND
|
237
241
|
raise NotFoundError
|
238
242
|
when HTTP_INTERNAL_SERVER_ERROR
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: help_scout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Paagman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-01-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
140
|
+
rubygems_version: 2.7.3
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: HelpScout is an API client for Help Scout
|