intercom 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/intercom/request.rb +1 -1
- data/lib/intercom/version.rb +1 -1
- data/spec/integration/intercom_api_integration_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0d6c8326096a6c9c6efb0231d756017a8dd4513
|
4
|
+
data.tar.gz: a371fd962512479b284f0f8f36bd764232e478a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d733b2bbbdd8b738380e46036147bde2a533b3cfce4ed51869da3edf600e34501bf363e91b2f00435a1930ce7e9e1d91bbced247b3e7c43ae44727a1869a13d8
|
7
|
+
data.tar.gz: 04a7c4b8f7b167fe706aa612a2ab52f5c8b567c662599ca1427b6f953af75d3f01a865eff0f7a5fc2c8217e84437f72cf007c97698a7e6ce07e8e052008f1880
|
data/lib/intercom/request.rb
CHANGED
@@ -62,7 +62,7 @@ module Intercom
|
|
62
62
|
response = http.request(net_http_method)
|
63
63
|
raise_errors_on_failure(response)
|
64
64
|
decoded = decode(response['content-encoding'], response.body)
|
65
|
-
JSON.parse(decoded) unless decoded.empty?
|
65
|
+
JSON.parse(decoded) unless decoded.strip.empty?
|
66
66
|
end
|
67
67
|
rescue Timeout::Error
|
68
68
|
raise Intercom::ServiceUnavailableError
|
data/lib/intercom/version.rb
CHANGED
@@ -48,6 +48,12 @@ describe "api.intercom.io dummy data requests" do
|
|
48
48
|
message_thread.send(expected).wont_be_nil
|
49
49
|
end
|
50
50
|
end
|
51
|
+
|
52
|
+
it "handles blank string bodies" do
|
53
|
+
FakeWeb.register_uri(:get, %r(v1/users\?email=), :body => fixture('v1-user'))
|
54
|
+
user = Intercom::User.find(:email => "somebody@example.com")
|
55
|
+
FakeWeb.register_uri(:post, %r(/events), :status => ["202", "Created"], :body => ' ')
|
56
|
+
end
|
51
57
|
|
52
58
|
it "should mark message_thread as read" do
|
53
59
|
FakeWeb.register_uri(:get, %r(v1/users/message_threads\?email=somebody), :body => fixture('v1-users-message_threads'))
|
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: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-02-
|
15
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: minitest
|