rich-acts_as_revisable 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -194,11 +194,15 @@ module WithoutScope
194
194
  # Force an immediate revision whether or
195
195
  # not any columns have been modified.
196
196
  #
197
+ # The +args+ catch-all argument is not used. It's primarily
198
+ # there to allow +revise!+ to be used directly as an association
199
+ # callback since association callbacks are passed an argument.
200
+ #
197
201
  # ==== Callbacks
198
202
  #
199
203
  # * +before_revise+ is called before the record is revised.
200
204
  # * +after_revise+ is called after the record is revised.
201
- def revise!
205
+ def revise!(*args)
202
206
  return if in_revision?
203
207
 
204
208
  begin
@@ -3,7 +3,7 @@ module WithoutScope #:nodoc:
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 1
5
5
  MINOR = 0
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
@@ -0,0 +1,16 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe WithoutScope::ActsAsRevisable::Deletable do
4
+ after(:each) do
5
+ cleanup_db
6
+ end
7
+
8
+ before(:each) do
9
+ @person = Person.create(:name => "Rich", :notes => "a note")
10
+ @person.update_attribute(:name, "Sam")
11
+ end
12
+
13
+ it "should store a revision on destroy" do
14
+ lambda{ @person.destroy }.should change(OldPerson, :count).from(1).to(2)
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich-acts_as_revisable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich Cavanaugh
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-04-01 00:00:00 -07:00
13
+ date: 2009-04-08 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -29,6 +29,7 @@ files:
29
29
  - Rakefile
30
30
  - spec/associations_spec.rb
31
31
  - spec/branch_spec.rb
32
+ - spec/deletable_spec.rb
32
33
  - spec/find_spec.rb
33
34
  - spec/general_spec.rb
34
35
  - spec/options_spec.rb
@@ -42,9 +43,7 @@ files:
42
43
  - lib/acts_as_revisable/acts/deletable.rb
43
44
  - lib/acts_as_revisable/acts/revisable.rb
44
45
  - lib/acts_as_revisable/acts/revision.rb
45
- - lib/acts_as_revisable/acts/scoped_model.rb
46
46
  - lib/acts_as_revisable/base.rb
47
- - lib/acts_as_revisable/clone_associations.rb
48
47
  - lib/acts_as_revisable/gem_spec_options.rb
49
48
  - lib/acts_as_revisable/options.rb
50
49
  - lib/acts_as_revisable/quoted_columns.rb
@@ -56,7 +55,7 @@ files:
56
55
  - generators/revisable_migration/templates/migration.rb
57
56
  - rails/init.rb
58
57
  has_rdoc: true
59
- homepage: http://github.com/rich/acts_as_revisable/tree/master
58
+ homepage: http://github.com/rich/acts_as_revisable
60
59
  post_install_message:
61
60
  rdoc_options:
62
61
  - --main