test_after_commit 0.2.4 → 0.2.5
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/Readme.md +51 -0
- data/lib/test_after_commit/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: ecb5ad1846055c48780400cecd1a21e2399d6862
         | 
| 4 | 
            +
              data.tar.gz: d0abaa5cf7047545e2d4aaafcee3f2d2f6d434d1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e2ef9fe01a46227536a49a0e0190dc63c1566f8a0de333b3357e1761a0c8f5247fd6f0d8b0e302f933ca25b75637abeb4314fb88e965c161909c504b36ab9165
         | 
| 7 | 
            +
              data.tar.gz: 70a4d044459a65829395aa9abb7a114eaedad05d3e29d65d7ab2d2a2d0f20e6c9b49858059d9dadac412416e9578c3a251d47ce37f06e0705b9a2f7784128035
         | 
    
        data/Readme.md
    ADDED
    
    | @@ -0,0 +1,51 @@ | |
| 1 | 
            +
            Make after_commit callbacks fire in tests for Rails 3+ with transactional_fixtures = true.
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Install
         | 
| 4 | 
            +
            =======
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                gem install test_after_commit
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                # Gemfile (never include in :development !)
         | 
| 9 | 
            +
                gem 'test_after_commit', :group => :test
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            Usage
         | 
| 12 | 
            +
            =====
         | 
| 13 | 
            +
            Test that the methods get called or the side-effect of the methods, something like:
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ```Ruby
         | 
| 16 | 
            +
            class Car < ActiveRecord::Base
         | 
| 17 | 
            +
              after_commit :foo, :on => :update
         | 
| 18 | 
            +
             | 
| 19 | 
            +
              def foo
         | 
| 20 | 
            +
                $foo = 1
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            ...
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            it "sets $foo on commit" do
         | 
| 27 | 
            +
              $foo.should == nil
         | 
| 28 | 
            +
              car.save!
         | 
| 29 | 
            +
              $foo.should == 1
         | 
| 30 | 
            +
            end
         | 
| 31 | 
            +
            ```
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            TIPS
         | 
| 34 | 
            +
            ====
         | 
| 35 | 
            +
             - hooks do not re-raise errors (with or without this gem) use [after_commit_exception_notification](https://github.com/grosser/after_commit_exception_notification)
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            Author
         | 
| 38 | 
            +
            ======
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            Inspired by https://gist.github.com/1305285
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            ### [Contributors](https://github.com/grosser/test_after_commit/contributors)
         | 
| 43 | 
            +
             - [James Le Cuirot](https://github.com/chewi)
         | 
| 44 | 
            +
             - [emirose](https://github.com/emirose)
         | 
| 45 | 
            +
             - [Brad Gessler](https://github.com/bradgessler)
         | 
| 46 | 
            +
             - [Rohan McGovern](https://github.com/rohanpm)
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            [Michael Grosser](http://grosser.it)<br/>
         | 
| 49 | 
            +
            michael@grosser.it<br/>
         | 
| 50 | 
            +
            License: MIT<br/>
         | 
| 51 | 
            +
            [](https://travis-ci.org/grosser/test_after_commit)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: test_after_commit
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Michael Grosser
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014-07- | 
| 11 | 
            +
            date: 2014-07-19 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activerecord
         | 
| @@ -100,6 +100,7 @@ executables: [] | |
| 100 100 | 
             
            extensions: []
         | 
| 101 101 | 
             
            extra_rdoc_files: []
         | 
| 102 102 | 
             
            files:
         | 
| 103 | 
            +
            - Readme.md
         | 
| 103 104 | 
             
            - lib/test_after_commit.rb
         | 
| 104 105 | 
             
            - lib/test_after_commit/version.rb
         | 
| 105 106 | 
             
            homepage: https://github.com/grosser/test_after_commit
         |