intercom 2.4.2 → 2.4.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: 9496ff15812ad595a1a475e5063c4c761005a76b
4
- data.tar.gz: f79db0f25ddda16aaccd0a222c4331f157a9bc5d
3
+ metadata.gz: 97bae6f804544dc4b64cab0d92514b8146f09ba5
4
+ data.tar.gz: a10b64e3f44e2c35c4d929f43a04f2c37790b5d2
5
5
  SHA512:
6
- metadata.gz: 6680e040fde3ae378c499bbff89fcde30154805b5505baf959d8b4b6e655c962c5cf8fea5dc6b88aa1412a50421bc92f374b494c2cba810a8638cb186f2fb0cc
7
- data.tar.gz: 9d7134dd3245c3d1233372272ebfe568f0b94ba95d3113c0d8f995fd7dc4a461d722399bd5b52fbf478e679099d080887e4b47244bdf1961f316d643e686f908
6
+ metadata.gz: 46e7669169fd64f577f888707ae5ce6004b51c01356be19a28988f4e3a10696361fc363f05e0983f13f9f6d58287391221d1567b242e9feb870ccab0cecc7ac5
7
+ data.tar.gz: 1e6cb49b7fec53b3077319cd781ce7cc2377d3f05a7022f89f09f268bd79472cfd4e2e58e6f016dfc1bef45c4234adcaa867e07aa3cffc08d02c022b47646a19
data/.travis.yml CHANGED
@@ -3,3 +3,4 @@ rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
5
  - 2.1.0
6
+ - 2.2.0
data/README.md CHANGED
@@ -19,7 +19,7 @@ This version of the gem is compatible with `Ruby 2.1`, `Ruby 2.0` & `Ruby 1.9.3`
19
19
 
20
20
  Using bundler:
21
21
 
22
- gem 'intercom', "~> 2.4.2"
22
+ gem 'intercom', "~> 2.4.3"
23
23
 
24
24
  ## Basic Usage
25
25
 
@@ -30,6 +30,8 @@ Intercom.app_id = "my_app_id"
30
30
  Intercom.app_api_key = "my-super-crazy-api-key"
31
31
  ```
32
32
 
33
+ You can get your `app_id` from the URL when you're logged into Intercom (it's the alphanumeric just after `/apps/`) and your API key from the API keys settings page (under your app settings in Intercom).
34
+
33
35
  ### Resources
34
36
 
35
37
  Resources this API supports:
@@ -330,7 +332,7 @@ Note that models generated from webhook notifications might differ slightly from
330
332
  ### Errors
331
333
  You do not need to deal with the HTTP response from an API call directly. If there is an unsuccessful response then an error that is a subclass of Intercom:Error will be raised. If desired, you can get at the http_code of an Intercom::Error via its `http_code` method.
332
334
 
333
- The list of different error subclasses are listed below. As they all inherit off Intercom::Error you can choose to rescue Intercom::Error or
335
+ The list of different error subclasses are listed below. As they all inherit off Intercom::IntercomError you can choose to rescue Intercom::IntercomError or
334
336
  else rescue the more specific error subclass.
335
337
 
336
338
  ```ruby
data/changes.txt CHANGED
@@ -1,3 +1,6 @@
1
+ 2.4.3
2
+ - Updates to remove warning when running in Ruby 2.2.0 (thanks @pat @jwaldrip)
3
+
1
4
  2.4.2
2
5
  - Add nil guard around decode_body to fix potential issue.
3
6
 
data/intercom.gemspec CHANGED
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency 'minitest'
23
- spec.add_development_dependency 'rake'
24
- spec.add_development_dependency 'mocha'
22
+ spec.add_development_dependency 'minitest', '~> 5.4'
23
+ spec.add_development_dependency 'rake', '~> 10.3'
24
+ spec.add_development_dependency 'mocha', '~> 1.0'
25
25
  spec.add_development_dependency "fakeweb", ["~> 1.3"]
26
26
 
27
- spec.add_dependency 'json'
27
+ spec.add_dependency 'json', '~> 1.8'
28
28
  spec.required_ruby_version = '>= 1.9.3'
29
29
  end
@@ -3,9 +3,9 @@ module Intercom
3
3
  # Base class exception from which all public Intercom exceptions will be derived
4
4
  class IntercomError < StandardError
5
5
  attr_reader :http_code, :application_error_code
6
- def initialize(message, http_code = nil, application_error_code = application_error_code)
6
+ def initialize(message, http_code = nil, error_code = application_error_code)
7
7
  @http_code = http_code
8
- @application_error_code = application_error_code
8
+ @application_error_code = error_code
9
9
  super(message)
10
10
  end
11
11
  end
@@ -84,7 +84,7 @@ module Intercom
84
84
  return parsed_body if decoded_body.nil? || decoded_body.strip.empty?
85
85
  begin
86
86
  parsed_body = JSON.parse(decoded_body)
87
- rescue JSON::ParserError => e
87
+ rescue JSON::ParserError => _
88
88
  raise_errors_on_failure(response)
89
89
  end
90
90
  raise_application_errors_on_failure(parsed_body, response.code.to_i) if parsed_body['type'] == 'error.list'
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "2.4.2"
2
+ VERSION = "2.4.3"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -11,7 +11,6 @@ def test_user(email="bob@example.com")
11
11
  "name" => "Joe Schmoe",
12
12
  "avatar" => {"type"=>"avatar", "image_url"=>"https://graph.facebook.com/1/picture?width=24&height=24"},
13
13
  "app_id" => "the-app-id",
14
- "created_at" => 1323422442,
15
14
  "custom_attributes" => {"a" => "b", "b" => 2},
16
15
  "companies" =>
17
16
  {"type"=>"company.list",
@@ -5,7 +5,7 @@ describe Intercom::Company do
5
5
  describe 'when no response raises error' do
6
6
  it 'on find' do
7
7
  Intercom.expects(:get).with("/companies", {:company_id => '4'}).returns(nil)
8
- proc {company = Intercom::Company.find(:company_id => '4')}.must_raise Intercom::HttpError
8
+ proc {Intercom::Company.find(:company_id => '4')}.must_raise Intercom::HttpError
9
9
  end
10
10
 
11
11
  it 'on find_all' 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: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McRedmond
@@ -15,78 +15,78 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2014-11-12 00:00:00.000000000 Z
18
+ date: 2014-12-29 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '5.4'
27
27
  type: :development
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '5.4'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '10.3'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '10.3'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: mocha
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.0'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: fakeweb
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.3'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: json
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '1.8'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1.8'
90
90
  description: 'Intercom (https://www.intercom.io) is a customer relationship management
91
91
  and messaging tool for web app owners. This library wraps the api provided by Intercom.
92
92
  See http://docs.intercom.io/api for more details. '
@@ -103,8 +103,8 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
- - .gitignore
107
- - .travis.yml
106
+ - ".gitignore"
107
+ - ".travis.yml"
108
108
  - Gemfile
109
109
  - MIT-LICENSE
110
110
  - README.md
@@ -178,17 +178,17 @@ require_paths:
178
178
  - lib
179
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: 1.9.3
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - '>='
186
+ - - ">="
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubyforge_project: intercom
191
- rubygems_version: 2.0.14
191
+ rubygems_version: 2.4.5
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Ruby bindings for the Intercom API
@@ -208,4 +208,3 @@ test_files:
208
208
  - spec/unit/intercom/traits/api_resource_spec.rb
209
209
  - spec/unit/intercom/user_spec.rb
210
210
  - spec/unit/intercom_spec.rb
211
- has_rdoc: