mover 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{MIT-LICENSE → LICENSE} +2 -2
- data/README.md +100 -0
- data/lib/mover/gems.rb +43 -0
- data/lib/mover/version.rb +3 -0
- data/lib/mover.rb +87 -77
- metadata +37 -30
- data/README.markdown +0 -72
- data/Rakefile +0 -2
- data/init.rb +0 -1
- data/rails/init.rb +0 -2
- data/require.rb +0 -51
- data/spec/Rakefile +0 -10
- data/spec/config/database.yml.example +0 -6
- data/spec/db/migrate/001_create_fixtures.rb +0 -28
- data/spec/fixtures/article.rb +0 -9
- data/spec/fixtures/article_archive.rb +0 -9
- data/spec/fixtures/comment.rb +0 -3
- data/spec/fixtures/comment_archive.rb +0 -3
- data/spec/log/test.log +0 -14153
- data/spec/mover_spec.rb +0 -107
- data/spec/spec_helper.rb +0 -43
data/spec/fixtures/article.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
class ArticleArchive < ActiveRecord::Base
|
2
|
-
has_many :comments, :class_name => 'CommentArchive', :foreign_key => 'article_id'
|
3
|
-
before_move :Article do
|
4
|
-
comments.each { |c| c.move_to(Comment) }
|
5
|
-
end
|
6
|
-
before_copy :Article do
|
7
|
-
comments.each { |c| c.copy_to(Comment) }
|
8
|
-
end
|
9
|
-
end
|
data/spec/fixtures/comment.rb
DELETED