lib/capistrano-supervisord/deploy.rb in capistrano-supervisord-0.0.1 vs lib/capistrano-supervisord/deploy.rb in capistrano-supervisord-0.0.2

- old
+ new

@@ -23,10 +23,12 @@ namespace(:supervisord) { _cset(:supervisord_configure_path, '/') _cset(:supervisord_configure_source_path, File.join(File.dirname(__FILE__), 'templates', 'supervisord')) _cset(:supervisord_configure_files, []) + _cset(:supervisord_configure_file_prefix, '') + _cset(:supervisord_configure_file_suffix, '') _cset(:supervisord_configure_cleanup_files, []) _cset(:supervisord_install_method, :apt) _cset(:supervisord_service_method, :sysvinit) @@ -47,10 +49,10 @@ on_rollback { run("rm -f #{tmp_files.join(' ')}") unless tmp_files.empty? } supervisord_configure_files.each { |file| src_file = File.join(supervisord_configure_source_path, file) - dst_file = File.join(supervisord_configure_path, file) + dst_file = File.join(supervisord_configure_path, supervisord_configure_file_prefix + file + supervisord_configure_file_suffix) tmp_file = File.join('/tmp', File.basename(file)) if File.file?(src_file) put(File.read(src_file), tmp_file) elsif File.file?("#{src_file}.erb") src_file = "#{src_file}.erb"