lib/alchemy/capistrano.rb in alchemy_cms-2.4.1 vs lib/alchemy/capistrano.rb in alchemy_cms-2.5.0.b2
- old
+ new
@@ -75,14 +75,19 @@
end
namespace :db do
desc "Seeds the database with essential data."
- task :seed, :roles => :app do
+ task :seed, :roles => :db do
run "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env, 'production')} #{rake} alchemy:db:seed"
end
+ desc "Dumps the database into 'db/dumps'"
+ task :dump, :roles => :db do
+ run "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env, 'production')} #{rake} alchemy:db:dump"
+ end
+
end
namespace :import do
desc "Imports all data (Pictures, attachments and the database) into your local development machine."
@@ -123,10 +128,10 @@
filename
end
def timestamp
timestamp ||= Time.now.strftime('%Y-%m-%d-%H-%M')
- end
+ end
def unzip_files(type, filename)
FileUtils.rm_rf "./uploads/#{type}"
run_locally "cd ./uploads && tar xvzf #{filename}"
end