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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e8513fed187fd425dfc03d14f6edc9e0312d5b8
4
- data.tar.gz: fe357512fa2b8b38d7bd690b74d8dcf8a3aa2278
3
+ metadata.gz: 74afe4945e361b9823ec0af4a262f9ad175ae92f
4
+ data.tar.gz: c12dd31c422b95a95862f432a0a1ad9c62332cbc
5
5
  SHA512:
6
- metadata.gz: 07aefda4c009ce86458520ca4e581d05d5deeea651194c8a8f025a046a0a3edd33f41358ae00a4b59d8a30a76b460d49bcc6beec816946b811fa33de7f9b5819
7
- data.tar.gz: b24f5704e1bc9c043cb7b59facef478fcbc3088febf54775449a09ab39d56e4ce80498815213e4723b93620a884889e7bc53066abf651e2c083037ca594223cf
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.value = Coercion.to_string(deal.value)
135
- deal.to_h.select { |k, _| OPTS_KEYS_TO_PERSIST.include?(k) }
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
@@ -1,3 +1,3 @@
1
1
  module BaseCRM
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -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
- @deal = build(:deal)
31
- expect(client.deals.create(@deal)).to be_instance_of BaseCRM::Deal
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.0
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-06-28 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday