migreazy 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/migreazy.rb +2 -10
  3. data/migreazy.gemspec +2 -2
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
data/lib/migreazy.rb CHANGED
@@ -64,21 +64,13 @@ module Migreazy
64
64
 
65
65
  class Down < Action
66
66
  def run
67
- successful_downs = []
68
67
  missing_in_branch = @source1.migrations - @source2.migrations
69
68
  if missing_in_branch.empty?
70
69
  puts "No down migrations to run"
71
70
  else
72
71
  missing_in_branch.sort.reverse.each do |version|
73
- file = Dir.entries("./db/migrate/").detect { |entry|
74
- entry =~ /^#{version}.*\.rb$/
75
- }
76
- require "./db/migrate/#{file}"
77
- file =~ /^#{version}_([_a-z0-9]*).rb/
78
- $1.camelize.constantize.down
79
- ActiveRecord::Base.connection.execute(
80
- "delete from schema_migrations where version = '#{version}'"
81
- )
72
+ cmd = "rake db:migrate:down VERSION=#{version}"
73
+ exec cmd
82
74
  end
83
75
  end
84
76
  end
data/migreazy.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "migreazy"
8
- s.version = "2.0.0"
8
+ s.version = "2.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Francis Hwang"]
12
- s.date = "2013-08-12"
12
+ s.date = "2014-01-07"
13
13
  s.description = "migreazy helps manage Rails migrations across git branches."
14
14
  s.email = "sera@fhwang.net"
15
15
  s.executables = ["migreazy"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migreazy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-12 00:00:00.000000000 Z
12
+ date: 2014-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: grit