Skip to content

Commit

Permalink
use modern rakefile syntax for arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Jul 13, 2011
1 parent 0f9e382 commit a9b61d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/snapshot.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ whatever parameter is given.
rake db:snapshot
rake db:snapshot[db/scenarios/fully-loaded]
DESC
task :snapshot, :to, :needs => "db:schema:dump" do |t, args|
task :snapshot, [:to] => "db:schema:dump" do |t, args|
to = args[:to] || "db/snapshot"

cp "db/schema.rb", to + ".schema"
Expand Down Expand Up @@ -40,7 +40,7 @@ up to date. The snapshot is then retaken with the updated schema.
rake db:snapshot:restore
rake db:snapshot:restore[db/scenarios/fully-loaded]
DESC
task :restore, :from, :needs => :environment do |t, args|
task :restore, [:from] => :environment do |t, args|
abort "refusing to restore snapshot in production" if Rails.env.production?

from = args[:from] || "db/snapshot"
Expand Down

0 comments on commit a9b61d2

Please sign in to comment.