migration_test_helper 1.1.0 → 1.2.0

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.
Files changed (3) hide show
  1. data/Rakefile +2 -4
  2. data/lib/migration_test_helper.rb +7 -1
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_files.include('lib/**/*.rb')
17
17
  end
18
18
 
19
- GEM_VERSION = '1.1.0'
19
+ GEM_VERSION = '1.2.0'
20
20
 
21
21
  Hoe.new('migration_test_helper',GEM_VERSION) do |p|
22
22
  p.author = "Micah Alles"
@@ -33,9 +33,7 @@ test database.
33
33
  p.gem_files = FileList["{test,lib,tasks}/**/*"] + %w|LICENSE README Rakefile init.rb install.rb uninstall.rb|
34
34
 
35
35
  p.changes = <<-EOS
36
- * added assert_table() for checking a single table instead of entire schema
37
-
38
- * options can now be verfied on a column: t.column :name, :string, :default => 'hot cookie', :limit => 10
36
+ * turned off migration output. you can get it back with migrate :verbose => true
39
37
  EOS
40
38
  p.rubyforge_name = 'migrationtest'
41
39
  end
@@ -79,11 +79,17 @@ module MigrationTestHelper
79
79
  #
80
80
  # migrate # same as rake db:migrate
81
81
  #
82
- # migrate :version => 10 # same as rake db:migrate VERSION=10
82
+ # Options are:
83
+ # * :version - version to migrate to (same as VERSION=.. option to rake db:migrate)
84
+ # * :verbose - print migration status messages to STDOUT, defaults to false
83
85
  #
84
86
  def migrate(opts={})
87
+ old_verbose = ActiveRecord::Migration.verbose
88
+ ActiveRecord::Migration.verbose = opts[:verbose].nil? ? false : opts[:verbose]
85
89
  version = opts[:version] ? opts[:version].to_i : nil
86
90
  ActiveRecord::Migrator.migrate(MigrationTestHelper.migration_dir, version)
91
+ ensure
92
+ ActiveRecord::Migration.verbose = old_verbose
87
93
  end
88
94
 
89
95
  module Connection #:nodoc:
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: migration_test_helper
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.0
7
- date: 2007-01-30 00:00:00 -05:00
6
+ version: 1.2.0
7
+ date: 2007-02-03 00:00:00 -05:00
8
8
  summary: A Rails plugin for testing migrations
9
9
  require_paths:
10
10
  - lib