protected_record 0.1.1 → 0.1.2
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/protected_record/use_case/update.rb +6 -2
- data/lib/protected_record/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 392a2700001f26e3809a7e04250e02b76f0fb7a4
         | 
| 4 | 
            +
              data.tar.gz: db25947c4b358cea76d6ede07c8b28e9d193964d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ac9210b4c284788f8fca81ae49373d86c5f882f08b38427af343809c53126fe984b8a1687d0ad41432e9667a5a330fc75ca10d76cca39e1f5a19e32fb67320a1
         | 
| 7 | 
            +
              data.tar.gz: b8dfdf841dbf8d99786d3766b6da2335f6760f876999c97ac1dd3823c63888609fe1c9e0d26ac9f73a8e058a3be3de392d97e814b6135bdd496e542d325bab96
         | 
    
        data/CHANGELOG.md
    ADDED
    
    
| @@ -20,7 +20,10 @@ module ProtectedRecord | |
| 20 20 | 
             
                    # We are successful if all changes have been applied
         | 
| 21 21 | 
             
                    if !@protected_record.changes.present?
         | 
| 22 22 | 
             
                      return PayDirt::Result.new({
         | 
| 23 | 
            -
                        data:    { | 
| 23 | 
            +
                        data:    {
         | 
| 24 | 
            +
                          updated: @protected_record,
         | 
| 25 | 
            +
                          change_request: @change_request_record
         | 
| 26 | 
            +
                        },
         | 
| 24 27 | 
             
                        success:   true
         | 
| 25 28 | 
             
                      })
         | 
| 26 29 | 
             
                    else
         | 
| @@ -42,7 +45,8 @@ module ProtectedRecord | |
| 42 45 | 
             
                    }).execute!
         | 
| 43 46 |  | 
| 44 47 | 
             
                    if request_result.successful?
         | 
| 45 | 
            -
                       | 
| 48 | 
            +
                      @change_request_record = request_result.data[:change_request_record]
         | 
| 49 | 
            +
                      revert_protected_attributes
         | 
| 46 50 | 
             
                      save_protected_record
         | 
| 47 51 | 
             
                    end
         | 
| 48 52 | 
             
                  end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: protected_record
         | 
| 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 | 
             
            - Tad Hosford
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013-05- | 
| 11 | 
            +
            date: 2013-05-20 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pay_dirt
         | 
| @@ -77,6 +77,7 @@ files: | |
| 77 77 | 
             
            - .gitignore
         | 
| 78 78 | 
             
            - .ruby-gemset
         | 
| 79 79 | 
             
            - .ruby-version
         | 
| 80 | 
            +
            - CHANGELOG.md
         | 
| 80 81 | 
             
            - Gemfile
         | 
| 81 82 | 
             
            - README.md
         | 
| 82 83 | 
             
            - Rakefile
         |