intercom 3.0.2 → 3.0.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 +3 -2
- data/changes.txt +3 -0
- data/lib/intercom/service/tag.rb +9 -0
- data/lib/intercom/version.rb +1 -1
- data/spec/unit/intercom/tag_spec.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5110cc550072f76df8878bc01d5ae52713792ac7
|
4
|
+
data.tar.gz: 24ce0af5e5b1abd006748327dacca2119285b6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 802a609a8cb9c6a7754c87a2a42553717918eb65cd0494e8da858f96e597ff419677a53aaeaafa7e8cf80fcb85587021581634f9ad9f5a576026e01ed67d8cb5
|
7
|
+
data.tar.gz: 874a3afb3edd697a352a6a8f16c3ec45d0e7e098286953530a47496b68267ed355f5ec0d372ff84b563bbb7d0d9d30f538f6689899a4d83f923b6d33aa1ad5a9
|
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.0.
|
25
|
+
gem 'intercom', "~> 3.0.3"
|
26
26
|
|
27
27
|
## Basic Usage
|
28
28
|
|
@@ -64,7 +64,8 @@ user = intercom.users.find(:id => "1")
|
|
64
64
|
# Create a user
|
65
65
|
user = intercom.users.create(:email => "bob@example.com", :name => "Bob Smith", :signed_up_at => Time.now.to_i)
|
66
66
|
# Delete a user
|
67
|
-
|
67
|
+
user = intercom.users.find(:id => "1")
|
68
|
+
deleted_user = intercom.users.delete(user)
|
68
69
|
# Update custom_attributes for a user
|
69
70
|
user.custom_attributes["average_monthly_spend"] = 1234.56
|
70
71
|
intercom.users.save(user)
|
data/changes.txt
CHANGED
data/lib/intercom/service/tag.rb
CHANGED
@@ -23,8 +23,17 @@ module Intercom
|
|
23
23
|
|
24
24
|
def untag(params)
|
25
25
|
params['tag_or_untag'] = 'untag'
|
26
|
+
users_or_companies.each do |user_or_company|
|
27
|
+
user_or_company[:untag] = true
|
28
|
+
end
|
26
29
|
create(params)
|
27
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def users_or_companies
|
35
|
+
params[:users] || params[:companies]
|
36
|
+
end
|
28
37
|
end
|
29
38
|
end
|
30
39
|
end
|
data/lib/intercom/version.rb
CHANGED
@@ -23,7 +23,7 @@ describe "Intercom::Tag" do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'untags users' do
|
26
|
-
client.expects(:post).with("/tags", {'name' => "Test Tag", 'users' => [ { user_id: 'abc123' }, { user_id: 'def456' } ], 'tag_or_untag' => 'untag'}).returns(test_tag)
|
26
|
+
client.expects(:post).with("/tags", {'name' => "Test Tag", 'users' => [ { user_id: 'abc123', untag: true }, { user_id: 'def456', untag: true } ], 'tag_or_untag' => 'untag'}).returns(test_tag)
|
27
27
|
client.tags.untag(:name => "Test Tag", :users => [ { user_id: "abc123" }, { user_id: "def456" } ])
|
28
28
|
end
|
29
29
|
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.0.
|
4
|
+
version: 3.0.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: 2015-
|
18
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project: intercom
|
205
|
-
rubygems_version: 2.
|
205
|
+
rubygems_version: 2.2.2
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Ruby bindings for the Intercom API
|
@@ -226,3 +226,4 @@ test_files:
|
|
226
226
|
- spec/unit/intercom/traits/api_resource_spec.rb
|
227
227
|
- spec/unit/intercom/user_spec.rb
|
228
228
|
- spec/unit/intercom_spec.rb
|
229
|
+
has_rdoc:
|