basecrm 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/basecrm/services/deals_service.rb +3 -2
- data/lib/basecrm/version.rb +1 -1
- data/spec/services/deals_service_spec.rb +7 -2
- 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: 74afe4945e361b9823ec0af4a262f9ad175ae92f
|
4
|
+
data.tar.gz: c12dd31c422b95a95862f432a0a1ad9c62332cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0bf3c24f4ce24e07ba4fb5a95b9380397bafd9419f72da2f024bdcec8b39b4c812febe3b9a92fcc72ed049540d189d6d7079404e918128e476158f1dd404cd2
|
7
|
+
data.tar.gz: 4c221fcba30ad9d4aeb52601686e1451bdc8770793850ecf86769e40ea35254411780a34dc41e7a8c88075fb576e2a0d702e7c3ca7fa6bb13e89a830277f35ba
|
@@ -131,8 +131,9 @@ module BaseCRM
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def sanitize(deal)
|
134
|
-
deal.
|
135
|
-
|
134
|
+
deal_hash = deal.to_h.select { |k, _| OPTS_KEYS_TO_PERSIST.include?(k) }
|
135
|
+
deal_hash[:value] = Coercion.to_string(deal_hash[:value])
|
136
|
+
deal_hash
|
136
137
|
end
|
137
138
|
end
|
138
139
|
end
|
data/lib/basecrm/version.rb
CHANGED
@@ -27,8 +27,13 @@ describe BaseCRM::DealsService do
|
|
27
27
|
|
28
28
|
describe :create do
|
29
29
|
it "returns instance of Deal class" do
|
30
|
-
|
31
|
-
expect(client.deals.create(
|
30
|
+
deal = build(:deal)
|
31
|
+
expect(client.deals.create(deal)).to be_instance_of BaseCRM::Deal
|
32
|
+
end
|
33
|
+
|
34
|
+
it "allows to create a Deal with hash of parameters" do
|
35
|
+
deal = attributes_for(:deal)
|
36
|
+
expect(client.deals.create(deal)).to be_instance_of BaseCRM::Deal
|
32
37
|
end
|
33
38
|
end
|
34
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BaseCRM developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|