basecrm 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -5
- data/basecrm.gemspec +4 -0
- data/lib/base_crm/contact.rb +5 -1
- data/lib/base_crm/version.rb +1 -1
- data/spec/base_crm/contact_spec.rb +13 -1
- metadata +53 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40387841cc49a997c9ab264764fc79a56190881b
|
4
|
+
data.tar.gz: e94fe87215b3f1302a80e87efbf6dee442989d8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eea26c5f63be7a738f7c12992c57695afb6031c34b9d4f4a7c8c309d6165cc15c26dfd7ab342543af18b083d7ba45a4a524b55b98d9292315a1133c841faa6d
|
7
|
+
data.tar.gz: a0226695b2900d2d6ebc99e1a13d4e20f4189ed54be031571afd3c0e1a3c029f5f560b3de7a8b0c985448421b75c56e4a78df4d46c323b72e3982c61b88e38ef
|
data/Gemfile
CHANGED
data/basecrm.gemspec
CHANGED
@@ -15,5 +15,9 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = BaseCrm::VERSION
|
17
17
|
gem.add_dependency "api_client", '>=0.4.2'
|
18
|
+
|
19
|
+
gem.add_development_dependency "rspec", "~>2.14.1"
|
20
|
+
gem.add_development_dependency "simplecov"
|
21
|
+
gem.add_development_dependency "rake"
|
18
22
|
end
|
19
23
|
|
data/lib/base_crm/contact.rb
CHANGED
@@ -16,8 +16,12 @@ module BaseCrm
|
|
16
16
|
|
17
17
|
def payload
|
18
18
|
hash = super
|
19
|
-
|
19
|
+
|
20
|
+
tags_joined_by_comma = hash.delete('tags_joined_by_comma')
|
21
|
+
hash['tag_list'] ||= tags_joined_by_comma
|
22
|
+
|
20
23
|
hash.delete('linkedin_display')
|
24
|
+
|
21
25
|
hash
|
22
26
|
end
|
23
27
|
|
data/lib/base_crm/version.rb
CHANGED
@@ -31,7 +31,6 @@ describe BaseCrm::Contact do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "#payload" do
|
34
|
-
|
35
34
|
it "removes wrong fields from payload" do
|
36
35
|
subject.tags_joined_by_comma = 'ARRG'
|
37
36
|
subject.linkedin_display = 'THIS IS SO WRONG'
|
@@ -39,6 +38,19 @@ describe BaseCrm::Contact do
|
|
39
38
|
hash.has_key?('tags_joined_by_comma').should be_false
|
40
39
|
hash.has_key?('linkedin_display').should be_false
|
41
40
|
end
|
41
|
+
|
42
|
+
it "uses tags_joined_by_comma to update tags" do
|
43
|
+
subject.tags_joined_by_comma = "abc, dce"
|
44
|
+
|
45
|
+
expect(subject.payload["tag_list"]).to eq("abc, dce")
|
46
|
+
end
|
47
|
+
|
48
|
+
it "uses tag_list to update tags if provided (backwards compatibility)" do
|
49
|
+
subject.tags_joined_by_comma = "abc, dce"
|
50
|
+
subject.tag_list = "bob, joe"
|
51
|
+
|
52
|
+
expect(subject.payload["tag_list"]).to eq("bob, joe")
|
53
|
+
end
|
42
54
|
end
|
43
55
|
|
44
56
|
describe ".fetch_for_deal" do
|
metadata
CHANGED
@@ -1,29 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Bunsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.4.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.4.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.14.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.14.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
27
69
|
description: Base CRM API Client
|
28
70
|
email:
|
29
71
|
- marcin@getbase.com
|
@@ -31,9 +73,9 @@ executables: []
|
|
31
73
|
extensions: []
|
32
74
|
extra_rdoc_files: []
|
33
75
|
files:
|
34
|
-
- .gitignore
|
35
|
-
- .rspec
|
36
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
37
79
|
- Gemfile
|
38
80
|
- LICENSE
|
39
81
|
- README.md
|
@@ -80,17 +122,17 @@ require_paths:
|
|
80
122
|
- lib
|
81
123
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
124
|
requirements:
|
83
|
-
- -
|
125
|
+
- - ">="
|
84
126
|
- !ruby/object:Gem::Version
|
85
127
|
version: '0'
|
86
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
129
|
requirements:
|
88
|
-
- -
|
130
|
+
- - ">="
|
89
131
|
- !ruby/object:Gem::Version
|
90
132
|
version: '0'
|
91
133
|
requirements: []
|
92
134
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.2.2
|
94
136
|
signing_key:
|
95
137
|
specification_version: 4
|
96
138
|
summary: Base CRM API Client
|
@@ -108,3 +150,4 @@ test_files:
|
|
108
150
|
- spec/spec_helper.rb
|
109
151
|
- spec/support/noteable_shared_examples.rb
|
110
152
|
- spec/support/taskable_shared_examples.rb
|
153
|
+
has_rdoc:
|