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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2853f9208fb251cd3a7cf50ff37cf6c650e0b689
4
- data.tar.gz: dbd8ea0ee7fffed060e8c76827dbc7d3fa75bcfc
3
+ metadata.gz: c0d6c8326096a6c9c6efb0231d756017a8dd4513
4
+ data.tar.gz: a371fd962512479b284f0f8f36bd764232e478a0
5
5
  SHA512:
6
- metadata.gz: 90837953885802d3e3fefeb511c3eedbcd96eac382d274e179873a2e66ed2e43d6526befbbd90fd2a2e3fc711fcfe58fa49a0cd5faee9eca104a0c881ed577a7
7
- data.tar.gz: 8ba9b140e61579bcbe2b9b73752023fe9594d5c0f9399fcaee53e36cb6b267db854f6f7ea656e2ed8b07e620f7e086dee053480108220115cab99a17f08ae68e
6
+ metadata.gz: d733b2bbbdd8b738380e46036147bde2a533b3cfce4ed51869da3edf600e34501bf363e91b2f00435a1930ce7e9e1d91bbced247b3e7c43ae44727a1869a13d8
7
+ data.tar.gz: 04a7c4b8f7b167fe706aa612a2ab52f5c8b567c662599ca1427b6f953af75d3f01a865eff0f7a5fc2c8217e84437f72cf007c97698a7e6ce07e8e052008f1880
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -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.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-26 00:00:00.000000000 Z
15
+ date: 2014-02-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: minitest