intercom 3.9.3 → 3.9.4

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: e0796185b7bee83b7bde3a828c68cdd10710131ec2ab91ed977c05b7cb674e23
4
- data.tar.gz: 8880d5f5b96fee495822e73fbd0576dfc53162ccc027c2ef6cdfecb1951ace42
3
+ metadata.gz: e91491f3bc68beec6be9a2fa595d446aabc7a8ab62127d54f204325c20a19c8e
4
+ data.tar.gz: d14661974dddeb5dc385cbb739c856bccd0809f93e01af10d14f6ae3464c8d44
5
5
  SHA512:
6
- metadata.gz: 5a2e2c8b67e94e28fcd9726b0d136782bddf82c28ae92cd6c227dba0454a159b82fbc279bf2143de116fc73edadb064d9b84f617b4eba33f18a0d3976de02de1
7
- data.tar.gz: 3d94e3d71711487740f371b4742adaafd9457ac0af19a66c3bb4a8b53e9a7b6da967d7418207ca5a02c5d6dbf664a759853b4ee17d9addc31165cf04a0c0d250
6
+ metadata.gz: bb94e199bca968f5976ee9036b8bfc17fe93ce386464715eb047de220203c3139607bb8f39e23a160193ab136ca2f1dcd631f976362a3cb1fc75ca799605ddfc
7
+ data.tar.gz: 3b447a5a048ae09870119d15412359dcf041560c787753ca84d16f76368e818b8255da0199fef1a7da82b4dac3a68c1808c2dcaa2bd3952c32956e9308c09173
data/README.md CHANGED
@@ -23,7 +23,7 @@ This version of the gem is compatible with `Ruby 2.1` and above.
23
23
 
24
24
  Using bundler:
25
25
 
26
- gem 'intercom', '~> 3.9.2'
26
+ gem 'intercom', '~> 3.9.3'
27
27
 
28
28
  ## Basic Usage
29
29
 
@@ -1,3 +1,6 @@
1
+ 3.9.3
2
+ Fix regression added in 3.9.2
3
+
1
4
  3.9.2
2
5
  Added error handling for malformed responses
3
6
 
@@ -42,6 +42,9 @@ module Intercom
42
42
  # Raised when we have bad gateway errors.
43
43
  class BadGatewayError < IntercomError; end
44
44
 
45
+ # Raised when we have gateway timeout errors.
46
+ class GatewayTimeoutError < IntercomError; end
47
+
45
48
  # Raised when we experience a socket read timeout
46
49
  class ServiceUnavailableError < IntercomError; end
47
50
 
@@ -168,6 +168,8 @@ module Intercom
168
168
  raise Intercom::BadGatewayError.new('Bad Gateway Error')
169
169
  elsif code == 503
170
170
  raise Intercom::ServiceUnavailableError.new('Service Unavailable')
171
+ elsif code == 504
172
+ raise Intercom::GatewayTimeoutError.new('Gateway Timeout')
171
173
  end
172
174
  end
173
175
 
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.9.3"
2
+ VERSION = "3.9.4"
3
3
  end
@@ -109,6 +109,15 @@ describe 'Intercom::Request', '#execute' do
109
109
 
110
110
  expect { execute! }.must_raise(Intercom::RateLimitExceeded)
111
111
  end
112
+
113
+ it 'raises a GatewayTimeoutError error when the response code is 504' do
114
+ stub_request(:any, uri).to_return(
115
+ status: 504,
116
+ body: '<html> <head><title>504 Gateway Time-out</title></head> <body bgcolor="white"> <center><h1>504 Gateway Time-out</h1></center> </body> </html>'
117
+ )
118
+
119
+ expect { execute! }.must_raise(Intercom::GatewayTimeoutError)
120
+ end
112
121
  end
113
122
 
114
123
  describe "application error handling" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intercom
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.3
4
+ version: 3.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McRedmond
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2019-11-05 00:00:00.000000000 Z
18
+ date: 2019-11-12 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest