standalone_migrations 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
@@ -41,7 +41,7 @@ class MigratorTasks < ::Rake::TaskLib
41
41
  require 'erb'
42
42
  ActiveRecord::Base.configurations = YAML::load(ERB.new(IO.read(@config)).result)
43
43
  end
44
- ActiveRecord::Base.establish_connection(ENV[@env])
44
+ ActiveRecord::Base.establish_connection(ENV[@env]) if connect
45
45
  if @logger
46
46
  logger = @logger
47
47
  else
@@ -132,7 +132,7 @@ class MigratorTasks < ::Rake::TaskLib
132
132
  end
133
133
  end
134
134
  else
135
- $stderr.puts "#{config['database']} already exists"
135
+ $stderr.puts "#{config['database']} already exists" unless config['adapter'] =~ /sqlite/
136
136
  end
137
137
  end
138
138
 
@@ -24,6 +24,10 @@ describe 'Standalone migrations' do
24
24
  `cd spec/tmp && #{cmd} 2>&1 && echo SUCCESS`
25
25
  end
26
26
 
27
+ def run_with_output(cmd)
28
+ `cd spec/tmp && #{cmd} 2>&1`
29
+ end
30
+
27
31
  def make_migration(name)
28
32
  migration = run("rake db:new_migration name=#{name}").match(%r{db/migrations/\d+.*.rb})[0]
29
33
  content = read(migration)
@@ -90,8 +94,8 @@ end
90
94
 
91
95
  describe 'db:create and drop' do
92
96
  it "should create the database and drop the database that was created" do
93
- run("rake db:create").should =~ /SUCCESS/
94
- run("rake db:drop").should =~ /SUCCESS/
97
+ run_with_output("rake db:create").should match /spec\/tmp\)$/
98
+ run_with_output("rake db:drop").should match /spec\/tmp\)$/
95
99
  end
96
100
  end
97
101
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standalone_migrations}
8
- s.version = "0.4.3"
8
+ s.version = "0.4.4"
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"]
12
- s.date = %q{2011-02-21}
12
+ s.date = %q{2011-03-04}
13
13
  s.email = %q{thuss@gabrito.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: standalone_migrations
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.3
5
+ version: 0.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Todd Huss
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-02-21 00:00:00 -08:00
14
+ date: 2011-03-04 00:00:00 -08:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency