From c9e5a21102fbc5ac48cc46189f28dd9b670c3ff2 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 28 Jun 2006 23:26:43 +0000 Subject: Fixed FTP password retrieving when working directory is changed. --- rake_helpers/ftp.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rake_helpers/ftp.rb b/rake_helpers/ftp.rb index 5a04549..c66f765 100644 --- a/rake_helpers/ftp.rb +++ b/rake_helpers/ftp.rb @@ -1,13 +1,13 @@ -FTP_YAML = 'ftp.yaml' +FTP_YAML = File.expand_path(File.join(File.dirname(__FILE__), '..', 'ftp.yaml')) FTP_DOMAIN = 'cycnus.de' FTP_CODERAY_DIR = 'public_html/raindark/coderay' def prepare_ftp - require 'net/ftp' - require 'yaml' - $username = File.exist?(FTP_YAML) ? YAML.load_file(FTP_YAML)[:username] : 'anonymous' - g "ftp login, password for #$username needed: " - $password = $stdin.gets.chomp + require 'net/ftp' + require 'yaml' + $username = File.exist?(FTP_YAML) ? YAML.load_file(FTP_YAML)[:username] : 'anonymous' + g "ftp login, password for #$username needed: " + $password = $stdin.gets.chomp end def cYcnus_ftp -- cgit v1.2.1