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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d4c87308b26d2c7bc0d303723c079f9e35f3c2ea
4
- data.tar.gz: 7b8c1072749cf893cd1341784a93e61bcaf6ec2b
2
+ SHA256:
3
+ metadata.gz: 22b43808e985721324615d9c33c751eb33f65f5bae676011184755d7dd444a75
4
+ data.tar.gz: 0d1a6a13c8b4e19009a9f343d56a04109db74a552fcb006fccc1c55e0b76ab7c
5
5
  SHA512:
6
- metadata.gz: '0947044ccd69d6848052cfccc595740d9593902f8b92762a1a94921622142325b094e2f22f1204a5c4a6375b13b9291750ccd810e247b04fb9fac34395c21a00'
7
- data.tar.gz: eff3ffe4edb758ee29d00f92bf47c26069482b4abefd83e979998334497a5a0ff67c31a63519485fff5457dd662c101538b6b29706f6a4176e5c84ad60a3d0ec
6
+ metadata.gz: eb05fac372cb9e6c5ed969508979c4024b125bb1aec84dd23902ee5608f5444ea888abaa53e0f3bc6954e2c1a56e63287f6f7f4f8513f53e1a48a03a49b9067c
7
+ data.tar.gz: bbd7e6fa76ec38854acc3b13e29c73ebb144ee83dd314061419d06bc73926a574ab6668b85254958280ed2c03c1e7a2a6aa7b095ce02ef4f8eedf4d686eb0733
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.12.3
3
+ - 2.3.6
4
+ - 2.4.3
5
+ - 2.5.0
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- ruby '2.4.1'
4
-
5
3
  # Specify your gem's dependencies in help_scout.gemspec
6
4
  gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Mark Mulder
3
+ Copyright (c) 2016 Springest B.V.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,3 +1,3 @@
1
1
  class HelpScout
2
- VERSION = "0.8.1"
2
+ VERSION = "0.9.0"
3
3
  end
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.8.1
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: 2017-11-15 00:00:00.000000000 Z
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.6.11
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