Hi there,
thanks for the info.
So if I get you well, all I need to do is make
File.join("#{fixtures_directory}", "*.json"
run on #{current_release} server.
Could I do that by simply applying the task to the web server, using :
task :dbcleanup do, :roles => :app
like in the example below ?
Or am I missing something crucial here ?
Also, here's an example of what I'm trying to do precisely
namespace :database do
desc "Load 'em fixtures"
task :dbcleanup*, :roles => :web do*
set :database_name, "dbname"
set :fixtures_directory, "#{current_release}/fixtures/#{stage}"
set :mongo_import, "mongoimport -d #{database_name} -c #{file}"
jsonfiles = File.join("#{fixtures_directory}", "*.json")
puts("#{jsonfiles}")
files = File.join("#{fixtures_directory}","**","*.json")
Dir.glob(files).each do |file|
*run "#{**mongo_import**}"*
end
logger.debug "Ended"
end
end
Am I clearer ?
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en