lib/j-cap-recipes/tasks/database.rake in j-cap-recipes-0.0.7 vs lib/j-cap-recipes/tasks/database.rake in j-cap-recipes-0.0.8
- old
+ new
@@ -71,10 +71,10 @@
production:
database: #{shared_path}/db/production.sqlite3
<<: *base
EOF
- location = fetch(:template_dir, 'lib/capistrano/tasks/templates') + '/database.yml.erb'
+ location = fetch(:template_dir, File.join(File.dirname(__FILE__), 'templates', 'database.yml.erb'))
template = File.file?(location) ? File.read(location) : default_template
config = ERB.new(template)
File.open t.name, 'w' do |f|
f.puts config.result(binding)