capsule_crm 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cfdc83bc1370520aadef70ff71c92d7ce027a9b
4
- data.tar.gz: 06ff75f4e1278b8c3f1b15a7a1c90a72ed2c860f
3
+ metadata.gz: bbf4dbaf303bbf0fd71fa6512aa6ee75e37564ef
4
+ data.tar.gz: 49c8d15e30ffe1751c34174b881c6d10d0888440
5
5
  SHA512:
6
- metadata.gz: 69ff92ce9719c2756affb46c7de48027d72cd3a7378b0bc5f9798460f6ba097a39ec6007b06d5c8c83c09f8c8c239580092336977d42719526ac98479e3d03f0
7
- data.tar.gz: 56acc7915da8a8a42344c5f1bfebf97e9b52f536b4f5200d962864e2a0a955e8a3c7e2a46c6d4a70051dd2583f0e7edcbccb09f8d1ead15e1e829ffca15bc435
6
+ metadata.gz: 1d0e9468526f5b052b004c1aea14cb699cc2d9ff6ed704582192e25d07235f9c265ddf25498adf701bde492757124da8d29b32c7f429de27654a50659be76694
7
+ data.tar.gz: 135e06abfe0f0810d3f40b729313fc9329411eeb6deaaf17b281cd61d1f595c1e0041da8a403dd1e35d08a6811f630749fbc7e117191fe34220213da1f303e1e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.1
4
+
5
+ - Task#category is now persisted correctly
6
+ [#80](https://github.com/mattbeedle/capsule_crm/pull/80)
7
+
3
8
  ## 1.9.0
4
9
 
5
10
  - Raise a CapsuleCRM::Errors::AssociationTypeMismatch when an object of the
@@ -99,10 +99,16 @@ module CapsuleCRM
99
99
  end
100
100
  object.class.belongs_to_associations.each do |name, association|
101
101
  attrs.merge!(
102
- association.serializable_key => object.send(name).try(:id)
102
+ association.serializable_key => belongs_to_value(object, name)
103
103
  ) unless association.serialize == false
104
104
  end if object.class.respond_to?(:belongs_to_associations)
105
105
  end
106
106
  end
107
+
108
+ def belongs_to_value(object, name)
109
+ value = object.send(name)
110
+ value = value.id if value.respond_to?(:id)
111
+ value
112
+ end
107
113
  end
108
114
  end
@@ -1,3 +1,3 @@
1
1
  module CapsuleCrm
2
- VERSION = '1.9.0'
2
+ VERSION = '1.9.1'
3
3
  end
@@ -1,4 +1,5 @@
1
1
  Fabricator(:task, class_name: :'CapsuleCRM::Task') do
2
2
  description { Faker::Lorem.paragraph }
3
3
  due_date { Date.tomorrow }
4
+ category 'Follow-up'
4
5
  end
@@ -82,6 +82,7 @@ describe CapsuleCRM::Task do
82
82
  it { expect(subject.keys).to include('task') }
83
83
  it { expect(subject['task']['description']).to eql(task.description) }
84
84
  it { expect(subject['task']['dueDate']).to eql(task.due_date.to_s) }
85
+ it { expect(subject['task']['category']).to eql(task.category) }
85
86
 
86
87
  context 'when it has an owner' do
87
88
  let(:owner) { CapsuleCRM::User.new(username: 'matt.beedle') }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capsule_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Beedle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel