diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-05-15 16:47:15 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-05-15 16:47:15 +0200 |
commit | 59653101b8cef7915cb1fb4ad4b84f49ae0881e5 (patch) | |
tree | 9dacd7eaa05c7957b14389538a30d7ebf7f7e349 /railties/lib/tasks | |
parent | 26ad104e72e2b758815a043341dd83a1b02e8c7f (diff) | |
parent | eb021707f53be46140b55a48e5ef03ed0577a45c (diff) | |
download | rails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.tar.gz rails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.tar.bz2 rails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.zip |
Merge commit 'mainstream/master'
Conflicts:
actionpack/lib/action_view/helpers/form_helper.rb
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/databases.rake | 13 | ||||
-rw-r--r-- | railties/lib/tasks/gems.rake | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 9588fabb2d..cdab5d8bb0 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -156,8 +156,8 @@ namespace :db do Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby end - desc 'Drops and recreates the database from db/schema.rb for the current environment.' - task :reset => ['db:drop', 'db:create', 'db:schema:load'] + desc 'Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.' + task :reset => [ 'db:drop', 'db:setup' ] desc "Retrieves the charset for the current environment's database" task :charset => :environment do @@ -206,6 +206,15 @@ namespace :db do end end + desc 'Create the database, load the schema, and initialize with the seed data' + task :setup => [ 'db:create', 'db:schema:load', 'db:seed' ] + + desc 'Load the seed data from db/seeds.rb' + task :seed => :environment do + seed_file = File.join(Rails.root, 'db', 'seeds.rb') + load(seed_file) if File.exist?(seed_file) + end + namespace :fixtures do desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures." task :load => :environment do diff --git a/railties/lib/tasks/gems.rake b/railties/lib/tasks/gems.rake index efadb1da3b..7cf7061f38 100644 --- a/railties/lib/tasks/gems.rake +++ b/railties/lib/tasks/gems.rake @@ -27,8 +27,7 @@ namespace :gems do desc "Force the build of all gems" task :force do $gems_build_rake_task = true - Rake::Task['gems:unpack'].invoke - current_gems.each { |gem| gem.build(:force => true) } + frozen_gems.each { |gem| gem.build(:force => true) } end end |