intercom 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Gemfile +1 -0
- data/changes.txt +3 -0
- data/intercom.gemspec +1 -0
- data/lib/intercom/user.rb +2 -2
- data/lib/intercom/user_resource.rb +1 -1
- data/lib/intercom/version.rb +1 -1
- data/spec/integration/intercom_api_integration_spec.rb +4 -2
- data/spec/unit/intercom/user_spec.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 727e72af37a924f8b9920e277c27655c90f916a0
|
4
|
+
data.tar.gz: f9bd615578c582c877e1675d9eda5a4cf9078073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f9c2a425d1bbfc34ee3cbe250014d068afb3de78c535a9ae5990d40c688782b6f2d6eecb0aa80a604936c3d76d0a26d3187b5e185f958635774fcce19a2de30
|
7
|
+
data.tar.gz: 2dd0f223755491dbde191aa97835e94d7d4329455d9d26da7abe2c5afccb50a8dbbc8abb408b3132004d0efc5e4c5d4c081465bec8bed5cff6aa4b8bba72db6c
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/changes.txt
CHANGED
data/intercom.gemspec
CHANGED
data/lib/intercom/user.rb
CHANGED
@@ -338,11 +338,11 @@ module Intercom
|
|
338
338
|
@location_data = hash.freeze
|
339
339
|
end
|
340
340
|
|
341
|
-
def increments
|
341
|
+
def increments #:nodoc:
|
342
342
|
@attributes["increments"] ||= {}
|
343
343
|
end
|
344
344
|
|
345
|
-
def increments=(hash)
|
345
|
+
def increments=(hash) #:nodoc:
|
346
346
|
@attributes["increments"] = hash
|
347
347
|
end
|
348
348
|
end
|
@@ -43,7 +43,7 @@ module Intercom
|
|
43
43
|
def update_from_api_response(api_response)
|
44
44
|
api_response.each do |key, value|
|
45
45
|
setter_method = "#{key.to_s}="
|
46
|
-
if self.respond_to?(setter_method)
|
46
|
+
if self.respond_to?(setter_method, true)
|
47
47
|
self.send(setter_method, value)
|
48
48
|
else
|
49
49
|
@attributes[key.to_s] = value
|
data/lib/intercom/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "spec_helper"
|
2
|
+
require 'fakeweb'
|
2
3
|
|
3
4
|
describe "api.intercom.io dummy data requests" do
|
4
5
|
before :each do
|
@@ -61,9 +62,10 @@ describe "api.intercom.io dummy data requests" do
|
|
61
62
|
end
|
62
63
|
|
63
64
|
it "should raise error when endpoint(s) are un-reachable" do
|
64
|
-
|
65
|
+
FakeWeb.register_uri(:get, %r|example\.com/|, :status => ["503", "Service Unavailable"])
|
66
|
+
Intercom.endpoints = ["http://example.com"]
|
65
67
|
proc { Intercom::User.find(:email => "somebody@example.com")}.must_raise Intercom::ServiceUnavailableError
|
66
|
-
Intercom.endpoints = ["http://
|
68
|
+
Intercom.endpoints = ["http://example.com", "http://api.example.com"]
|
67
69
|
proc { Intercom::User.find(:email => "somebody@example.com")}.must_raise Intercom::ServiceUnavailableError
|
68
70
|
end
|
69
71
|
end
|
@@ -43,6 +43,7 @@ describe "Intercom::User" do
|
|
43
43
|
user.last_seen_ip.must_equal "1.2.3.4"
|
44
44
|
user.last_seen_user_agent.must_equal "Mozilla blah blah ie6"
|
45
45
|
user.unsubscribed_from_emails.must_equal true
|
46
|
+
user.location_data['country_code'].must_equal "IRL"
|
46
47
|
end
|
47
48
|
|
48
49
|
it "has read-only social accounts" 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: 0.1.
|
4
|
+
version: 0.1.15
|
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: 2013-
|
15
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: minitest
|
@@ -56,6 +56,20 @@ dependencies:
|
|
56
56
|
- - '>='
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: fakeweb
|
61
|
+
requirement: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.3'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ~>
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '1.3'
|
59
73
|
description: 'Intercom (https://www.intercom.io) is a customer relationship management
|
60
74
|
and messaging tool for web app owners. This library wraps the api provided by Intercom.
|
61
75
|
See http://docs.intercom.io/api for more details. '
|