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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5528d941fb5fce815fc80d08e159e78ed46dc720
4
- data.tar.gz: af751fee8c6ed9d95b676b7ee081fb83ad351a28
3
+ metadata.gz: 727e72af37a924f8b9920e277c27655c90f916a0
4
+ data.tar.gz: f9bd615578c582c877e1675d9eda5a4cf9078073
5
5
  SHA512:
6
- metadata.gz: ecce591469b2667290265c3e36e57173a3a3c690f35264bd29d12bc0fba178cd4b914c2fa9fbcad0daed62c0a023a09a001873007e427dd4aab34bb9bfacc320
7
- data.tar.gz: f9fdf74c543f538c1191ef7b67b68a0feaf0c8ec7f015302828347361459c5c64d08c4c5548e9fdf81daca72e2604f522b46fe1e1931016316986d72ef806fdf
6
+ metadata.gz: 5f9c2a425d1bbfc34ee3cbe250014d068afb3de78c535a9ae5990d40c688782b6f2d6eecb0aa80a604936c3d76d0a26d3187b5e185f958635774fcce19a2de30
7
+ data.tar.gz: 2dd0f223755491dbde191aa97835e94d7d4329455d9d26da7abe2c5afccb50a8dbbc8abb408b3132004d0efc5e4c5d4c081465bec8bed5cff6aa4b8bba72db6c
data/.travis.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.8.7
4
+ - ree
4
5
  - 1.9.2
5
6
  - 1.9.3
7
+ - 2.0.0
6
8
  - jruby-18mode
7
9
  - jruby-19mode
8
10
  - rbx-18mode
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "http://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
+ gem 'fakeweb', "~> 1.3"
6
7
  platforms :jruby do
7
8
  gem 'json-jruby'
8
9
  gem 'jruby-openssl'
data/changes.txt CHANGED
@@ -1,3 +1,6 @@
1
+ 0.1.15
2
+ - Fix location_data and social_profiles for ruby 2.0 change to #respond_to? method.
3
+
1
4
  0.1.14
2
5
  - Update tagging interface for API changes
3
6
 
data/intercom.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'minitest'
23
23
  spec.add_development_dependency 'rake'
24
24
  spec.add_development_dependency 'mocha'
25
+ spec.add_development_dependency "fakeweb", ["~> 1.3"]
25
26
  end
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
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -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
- Intercom.endpoints = ["http://127.0.0.7"]
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://127.0.0.7", "http://127.0.0.6"]
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.14
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-08-29 00:00:00.000000000 Z
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. '