intercom 3.5.2 → 3.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/changes.txt +3 -0
- data/lib/intercom/service/count.rb +3 -1
- data/lib/intercom/version.rb +1 -1
- data/spec/spec_helper.rb +12 -0
- data/spec/unit/intercom/count_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cb77431bc9d029fc727badd60a0ff01a015646d
|
4
|
+
data.tar.gz: 4e29db4fae3a6d8451bd35fc4ab63fc3bf97d39c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2c07f366f514edbc42ca1fdfe75f568eda7b7b8cd1ba7737d29503474e875c98c01d2288df14d2ab6ad8f6557f77ade20bea102793a8487cfc64348fb607244
|
7
|
+
data.tar.gz: 1d13a52bc103466aa225e0bda5426ff54b6294c6d5a303f302f84430732857f61ec6df572ba46d7b49a393fd804dace30b1bf9d0a8bb14eb6ca2948a56787b05
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# intercom-ruby
|
2
2
|
|
3
|
-
Ruby bindings for the Intercom API (https://
|
3
|
+
Ruby bindings for the Intercom API (https://developers.intercom.io/reference).
|
4
4
|
|
5
|
-
[API Documentation](https://
|
5
|
+
[API Documentation](https://developers.intercom.io/docs)
|
6
6
|
|
7
7
|
[Gem Documentation](http://rubydoc.info/github/intercom/intercom-ruby/master/frames)
|
8
8
|
|
@@ -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.
|
25
|
+
gem 'intercom', "~> 3.5.2"
|
26
26
|
|
27
27
|
## Basic Usage
|
28
28
|
|
@@ -240,7 +240,7 @@ intercom.messages.create({
|
|
240
240
|
},
|
241
241
|
:to => {
|
242
242
|
:type => "user",
|
243
|
-
:
|
243
|
+
:user_id => "5678"
|
244
244
|
}
|
245
245
|
})
|
246
246
|
|
data/changes.txt
CHANGED
data/lib/intercom/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -520,6 +520,18 @@ def test_segment_count
|
|
520
520
|
}
|
521
521
|
end
|
522
522
|
|
523
|
+
def test_conversation_count
|
524
|
+
{
|
525
|
+
"type" => "count",
|
526
|
+
"conversation" => {
|
527
|
+
"assigned" => 1,
|
528
|
+
"closed" => 15,
|
529
|
+
"open" => 1,
|
530
|
+
"unassigned" => 0
|
531
|
+
}
|
532
|
+
}
|
533
|
+
end
|
534
|
+
|
523
535
|
def error_on_modify_frozen
|
524
536
|
RUBY_VERSION =~ /1.8/ ? TypeError : RuntimeError
|
525
537
|
end
|
@@ -14,4 +14,15 @@ describe "Intercom::Count" do
|
|
14
14
|
counts = client.counts.for_type(type: 'user', count: 'segment')
|
15
15
|
counts.user['segment'][4]["segment 1"].must_equal(1)
|
16
16
|
end
|
17
|
+
|
18
|
+
it 'should not include count param when nil' do
|
19
|
+
client.expects(:get).with("/counts", {type: 'conversation'}).returns(test_conversation_count)
|
20
|
+
counts = client.counts.for_type(type: 'conversation')
|
21
|
+
counts.conversation.must_equal({
|
22
|
+
"assigned" => 1,
|
23
|
+
"closed" => 15,
|
24
|
+
"open" => 1,
|
25
|
+
"unassigned" => 0
|
26
|
+
})
|
27
|
+
end
|
17
28
|
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.
|
4
|
+
version: 3.5.3
|
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: 2016-
|
18
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|