intercom 3.5.24 → 3.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec8a7ce6c9363737310afd46f571c394f4e324ec
4
- data.tar.gz: aa4056bdf51ad0423f38b89694c333548450aacb
3
+ metadata.gz: '00705085830c8f265f87386afef35cdaf81bd194'
4
+ data.tar.gz: 918f33d66ba48c4af692fd80e3d428b7bdfaae49
5
5
  SHA512:
6
- metadata.gz: 8a05546c944b5c41dc6725244c7c7fd8c7502218c7ac320b70782d47b65d075bc1671547ce610c8eeb972f0bbe8ec30e41fcc0c7c77368e0ec45e24bf13327c9
7
- data.tar.gz: 106162c9952d8d1bb7f752bae45d53036788d792bffcd7d01248bc724bfa68f94ba48c187c7f357011bfbee60a29bce86890e1466531eab3ee59c7e5e1ae7df2
6
+ metadata.gz: 38857bc2b76c472b997fe2e2b209c8c78cad6a168af28ba044af67635ae402c53a10b72b8b78515f353382578108ce94afad090d7f20bc3dd3f1804d2bb1fb7b
7
+ data.tar.gz: 5d3387191e313a532a311cce57d3728ab59eb2b12e12eeedc82b7f0dd11c1c3d0eb003df1772e16e5481d54f67949478d61fb8f80bb8a6546a5288c586029b37
data/README.md CHANGED
@@ -22,7 +22,7 @@ This version of the gem is compatible with `Ruby 2.1` and above.
22
22
 
23
23
  Using bundler:
24
24
 
25
- gem 'intercom', '~> 3.5.24'
25
+ gem 'intercom', '~> 3.5.25'
26
26
 
27
27
  ## Basic Usage
28
28
 
@@ -110,7 +110,7 @@ module Intercom
110
110
  rate_limit_details = {}
111
111
  rate_limit_details[:limit] = response['X-RateLimit-Limit'].to_i if response['X-RateLimit-Limit']
112
112
  rate_limit_details[:remaining] = response['X-RateLimit-Remaining'].to_i if response['X-RateLimit-Remaining']
113
- rate_limit_details[:reset_at] = Time.parse(response['X-RateLimit-Reset']) if response['X-RateLimit-Reset']
113
+ rate_limit_details[:reset_at] = Time.at(response['X-RateLimit-Reset'].to_i) if response['X-RateLimit-Reset']
114
114
  @rate_limit_details = rate_limit_details
115
115
  end
116
116
 
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.5.24"
2
+ VERSION = "3.5.25"
3
3
  end
@@ -33,7 +33,7 @@ describe 'Intercom::Request' do
33
33
  it 'should call sleep for rate limit error three times' do
34
34
  # Use webmock to mock the HTTP request
35
35
  stub_request(:any, uri).\
36
- to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => Time.now.utc + 10 })
36
+ to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => (Time.now.utc + 10).to_i.to_s })
37
37
  req = Intercom::Request.get(uri, "")
38
38
  req.handle_rate_limit=true
39
39
  req.expects(:sleep).times(3).with(any_parameters)
@@ -53,7 +53,7 @@ describe 'Intercom::Request' do
53
53
  it 'should call sleep for rate limit error just once' do
54
54
  # Use webmock to mock the HTTP request
55
55
  stub_request(:any, uri).\
56
- to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => Time.now.utc + 10 }).\
56
+ to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => (Time.now.utc + 10).to_i.to_s }).\
57
57
  then.to_return(status: [200, "OK"])
58
58
  req = Intercom::Request.get(uri, "")
59
59
  req.handle_rate_limit=true
@@ -64,7 +64,7 @@ describe 'Intercom::Request' do
64
64
  it 'should not sleep if rate limit reset time has passed' do
65
65
  # Use webmock to mock the HTTP request
66
66
  stub_request(:any, uri).\
67
- to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => Time.parse("February 25 2010").utc }).\
67
+ to_return(status: [429, "Too Many Requests"], headers: { 'X-RateLimit-Reset' => Time.parse("February 25 2010").utc.to_i.to_s }).\
68
68
  then.to_return(status: [200, "OK"])
69
69
  req = Intercom::Request.get(uri, "")
70
70
  req.handle_rate_limit=true
@@ -80,7 +80,7 @@ describe 'Intercom::Request' do
80
80
  it 'should raise ResourceNotUniqueError error on resource_conflict code' do
81
81
  # Use webmock to mock the HTTP request
82
82
  stub_request(:put, uri).\
83
- to_return(status: [409, "Resource Already Exists"], headers: { 'X-RateLimit-Reset' => Time.now.utc + 10 }, body: {type: "error.list", errors: [ code: "resource_conflict" ]}.to_json)
83
+ to_return(status: [409, "Resource Already Exists"], headers: { 'X-RateLimit-Reset' => (Time.now.utc + 10).to_i.to_s }, body: {type: "error.list", errors: [ code: "resource_conflict" ]}.to_json)
84
84
  req = Intercom::Request.put(uri, "")
85
85
  expect { req.execute(target_base_url=uri, username: "ted", secret: "") }.must_raise(Intercom::ResourceNotUniqueError)
86
86
  end
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: 3.5.24
4
+ version: 3.5.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McRedmond
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2018-05-10 00:00:00.000000000 Z
18
+ date: 2018-05-11 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest
@@ -244,8 +244,30 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  version: '0'
245
245
  requirements: []
246
246
  rubyforge_project: intercom
247
- rubygems_version: 2.5.1
247
+ rubygems_version: 2.6.14.1
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: Ruby bindings for the Intercom API
251
- test_files: []
251
+ test_files:
252
+ - spec/spec_helper.rb
253
+ - spec/unit/intercom/admin_spec.rb
254
+ - spec/unit/intercom/client_collection_proxy_spec.rb
255
+ - spec/unit/intercom/client_spec.rb
256
+ - spec/unit/intercom/company_spec.rb
257
+ - spec/unit/intercom/contact_spec.rb
258
+ - spec/unit/intercom/conversation_spec.rb
259
+ - spec/unit/intercom/count_spec.rb
260
+ - spec/unit/intercom/event_spec.rb
261
+ - spec/unit/intercom/job_spec.rb
262
+ - spec/unit/intercom/lib/flat_store_spec.rb
263
+ - spec/unit/intercom/message_spec.rb
264
+ - spec/unit/intercom/note_spec.rb
265
+ - spec/unit/intercom/request_spec.rb
266
+ - spec/unit/intercom/scroll_collection_proxy_spec.rb
267
+ - spec/unit/intercom/segment_spec.rb
268
+ - spec/unit/intercom/subscription_spec.rb
269
+ - spec/unit/intercom/tag_spec.rb
270
+ - spec/unit/intercom/traits/api_resource_spec.rb
271
+ - spec/unit/intercom/user_spec.rb
272
+ - spec/unit/intercom/visitors_spec.rb
273
+ - spec/unit/intercom_spec.rb