decisiv-acts_as_versioned 0.6.2.1 → 0.6.3.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.
- data/lib/acts_as_versioned.rb +1 -2
- data/test/versioned_test.rb +2 -3
- metadata +2 -2
    
        data/lib/acts_as_versioned.rb
    CHANGED
    
    | @@ -186,8 +186,7 @@ module ActiveRecord #:nodoc: | |
| 186 186 | 
             
                      self.version_association_options  = {
         | 
| 187 187 | 
             
                                                            :class_name  => "#{self.to_s}::#{versioned_class_name}",
         | 
| 188 188 | 
             
                                                            :foreign_key => versioned_foreign_key,
         | 
| 189 | 
            -
                                                            :order => "#{version_column} ASC" | 
| 190 | 
            -
                                                            :dependent   => :delete_all
         | 
| 189 | 
            +
                                                            :order => "#{version_column} ASC"
         | 
| 191 190 | 
             
                                                          }.merge(options[:association_options] || {})
         | 
| 192 191 |  | 
| 193 192 | 
             
                      if block_given?
         | 
    
        data/test/versioned_test.rb
    CHANGED
    
    | @@ -252,13 +252,12 @@ class VersionedTest < AAVTestCase | |
| 252 252 | 
             
              test "referential integrity" do
         | 
| 253 253 | 
             
                pages(:welcome).destroy
         | 
| 254 254 | 
             
                assert_equal 0, Page.count
         | 
| 255 | 
            -
                assert_equal  | 
| 255 | 
            +
                assert_equal 2, Page::Version.count
         | 
| 256 256 | 
             
              end
         | 
| 257 257 |  | 
| 258 258 | 
             
              test "association options" do
         | 
| 259 259 | 
             
                association = Page.reflect_on_association(:versions)
         | 
| 260 260 | 
             
                options = association.options
         | 
| 261 | 
            -
                assert_equal :delete_all, options[:dependent]
         | 
| 262 261 | 
             
                association = Widget.reflect_on_association(:versions)
         | 
| 263 262 | 
             
                options = association.options
         | 
| 264 263 | 
             
                assert_equal :nullify, options[:dependent]
         | 
| @@ -269,7 +268,7 @@ class VersionedTest < AAVTestCase | |
| 269 268 | 
             
                assert_equal 1, Widget.versioned_class.count
         | 
| 270 269 | 
             
                widget.destroy
         | 
| 271 270 | 
             
                assert_equal 0, Widget.count
         | 
| 272 | 
            -
                assert_equal 1, Widget. | 
| 271 | 
            +
                assert_equal 1, Widget::Version.count
         | 
| 273 272 | 
             
              end
         | 
| 274 273 |  | 
| 275 274 | 
             
              test "versioned records should belong to parent" do
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: decisiv-acts_as_versioned
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.6. | 
| 4 | 
            +
              version: 0.6.3.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Rick Olson
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009- | 
| 12 | 
            +
            date: 2009-04-04 00:00:00 -07:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: []
         | 
| 15 15 |  |