standalone_migrations 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/tasks/standalone_migrations.rb +2 -2
- data/spec/standalone_migrations_spec.rb +6 -6
- data/standalone_migrations.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.12
|
@@ -30,8 +30,8 @@ describe 'Standalone migrations' do
|
|
30
30
|
task_name = options[:task_name] || 'db:new_migration'
|
31
31
|
migration = run("rake #{task_name} name=#{name}").match(%r{db/migrate/\d+.*.rb})[0]
|
32
32
|
content = read(migration)
|
33
|
-
content.sub!(/def
|
34
|
-
content.sub!(/def
|
33
|
+
content.sub!(/def down.*?\send/m, "def down;puts 'DOWN-#{name}';end")
|
34
|
+
content.sub!(/def up.*?\send/m, "def up;puts 'UP-#{name}';end")
|
35
35
|
write(migration, content)
|
36
36
|
migration.match(/\d{14}/)[0]
|
37
37
|
end
|
@@ -51,22 +51,22 @@ end
|
|
51
51
|
write_rakefile %{t.migrations = "db/migrations", "db/migrations2"}
|
52
52
|
write "db/migrate/20100509095815_create_tests.rb", <<-TXT
|
53
53
|
class CreateTests < ActiveRecord::Migration
|
54
|
-
def
|
54
|
+
def up
|
55
55
|
puts "UP-CreateTests"
|
56
56
|
end
|
57
57
|
|
58
|
-
def
|
58
|
+
def down
|
59
59
|
puts "DOWN-CreateTests"
|
60
60
|
end
|
61
61
|
end
|
62
62
|
TXT
|
63
63
|
write "db/migrate/20100509095816_create_tests2.rb", <<-TXT
|
64
64
|
class CreateTests2 < ActiveRecord::Migration
|
65
|
-
def
|
65
|
+
def up
|
66
66
|
puts "UP-CreateTests2"
|
67
67
|
end
|
68
68
|
|
69
|
-
def
|
69
|
+
def down
|
70
70
|
puts "DOWN-CreateTests2"
|
71
71
|
end
|
72
72
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "standalone_migrations"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Todd Huss", "Michael Grosser"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standalone_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -81,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
segments:
|
83
83
|
- 0
|
84
|
-
hash:
|
84
|
+
hash: -2851095765689580621
|
85
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
86
|
none: false
|
87
87
|
requirements:
|