From c47525a58397851895b25f7c1bba06b30b0f6b5d Mon Sep 17 00:00:00 2001 From: Philip Hallstrom Date: Tue, 16 Sep 2008 10:38:13 -0700 Subject: make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo Signed-off-by: Michael Koziarski --- railties/lib/tasks/databases.rake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index cc079b1d93..1431aa6944 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -113,8 +113,16 @@ namespace :db do end namespace :migrate do - desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x' - task :redo => [ 'db:rollback', 'db:migrate' ] + desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.' + task :redo => :environment do + if ENV["VERSION"] + Rake::Task["db:migrate:down"].invoke + Rake::Task["db:migrate:up"].invoke + else + Rake::Task["db:rollback"].invoke + Rake::Task["db:migrate"].invoke + end + end desc 'Resets your database using your migrations for the current environment' task :reset => ["db:drop", "db:create", "db:migrate"] -- cgit v1.2.3 From 5f86451a4c5d0beca5a746c4708be48b13f665be Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 22 Sep 2008 17:14:54 +0200 Subject: Bump the Version constants to align with the *next* release rather than the previous release. This allows people tracking non-release gems or git submodules to use the constants. --- railties/lib/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb index 48d24da52e..a0986a2e05 100644 --- a/railties/lib/rails/version.rb +++ b/railties/lib/rails/version.rb @@ -1,7 +1,7 @@ module Rails module VERSION #:nodoc: MAJOR = 2 - MINOR = 1 + MINOR = 2 TINY = 0 STRING = [MAJOR, MINOR, TINY].join('.') -- cgit v1.2.3 From a78ec93036644c41f936128a2b6d52f3136ad64c Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 24 Sep 2008 18:45:53 +0200 Subject: Partially revert 185fe2e9cce737d69d3b47a656f3651ce152c0c1 We shouldn't quote the unpack command's requirement as it's passed through GemRunner which takes care of it for us. --- railties/lib/rails/gem_dependency.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 471e03fa5f..d58ae450eb 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -120,7 +120,9 @@ module Rails def unpack_command cmd = %w(unpack) << @name - cmd << "--version" << %("#{@requirement.to_s}") if @requirement + # We don't quote this requirement as it's run through GemRunner instead + # of shelling out to gem + cmd << "--version" << @requirement.to_s if @requirement cmd end end -- cgit v1.2.3