also_migrate 0.1.0 → 0.1.1
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.markdown → README.md} +3 -3
- data/lib/also_migrate.rb +6 -2
- data/lib/also_migrate/migration.rb +6 -1
- data/lib/also_migrate/migrator.rb +19 -48
- data/lib/also_migrate/version.rb +3 -0
- metadata +56 -32
- data/Rakefile +0 -2
- data/init.rb +0 -1
- data/log/development.log +0 -6
- data/rails/init.rb +0 -2
- data/require.rb +0 -52
- data/spec/Rakefile +0 -10
- data/spec/also_migrate_spec.rb +0 -53
- data/spec/config/database.yml.example +0 -6
- data/spec/db/migrate/001_create_articles.rb +0 -14
- data/spec/db/migrate/002_add_permalink.rb +0 -9
- data/spec/db/migrate/003_remove_ignored.rb +0 -9
- data/spec/fixtures/article.rb +0 -3
- data/spec/log/test.log +0 -6455
- data/spec/spec_helper.rb +0 -27
data/spec/spec_helper.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require File.expand_path("#{File.dirname(__FILE__)}/../require")
|
2
|
-
Require.spec_helper!
|
3
|
-
|
4
|
-
Spec::Runner.configure do |config|
|
5
|
-
end
|
6
|
-
|
7
|
-
$db, $log, $mail = ActiveWrapper.setup(
|
8
|
-
:base => File.dirname(__FILE__),
|
9
|
-
:env => 'test'
|
10
|
-
)
|
11
|
-
$db.establish_connection
|
12
|
-
|
13
|
-
def columns(table)
|
14
|
-
connection.columns(table).collect(&:name)
|
15
|
-
end
|
16
|
-
|
17
|
-
def connection
|
18
|
-
ActiveRecord::Base.connection
|
19
|
-
end
|
20
|
-
|
21
|
-
def migrate_with_state(version)
|
22
|
-
@old_article_columns = columns("articles")
|
23
|
-
@old_archive_columns = columns("article_archives")
|
24
|
-
$db.migrate(version)
|
25
|
-
@new_article_columns = columns("articles")
|
26
|
-
@new_archive_columns = columns("article_archives")
|
27
|
-
end
|