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 +4 -4
 - data/CHANGELOG.md +5 -0
 - data/lib/capsule_crm/serializer.rb +7 -1
 - data/lib/capsule_crm/version.rb +1 -1
 - data/spec/fabricators/task_fabricator.rb +1 -0
 - data/spec/lib/capsule_crm/task_spec.rb +1 -0
 - 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: bbf4dbaf303bbf0fd71fa6512aa6ee75e37564ef
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 49c8d15e30ffe1751c34174b881c6d10d0888440
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1d0e9468526f5b052b004c1aea14cb699cc2d9ff6ed704582192e25d07235f9c265ddf25498adf701bde492757124da8d29b32c7f429de27654a50659be76694
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 135e06abfe0f0810d3f40b729313fc9329411eeb6deaaf17b281cd61d1f595c1e0041da8a403dd1e35d08a6811f630749fbc7e117191fe34220213da1f303e1e
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| 
         @@ -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 
     | 
| 
      
 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
         
     | 
    
        data/lib/capsule_crm/version.rb
    CHANGED
    
    
| 
         @@ -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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-09-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activemodel
         
     |