diff options
author | murphy <murphy@rubychan.de> | 2006-06-28 23:26:43 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-06-28 23:26:43 +0000 |
commit | c9e5a21102fbc5ac48cc46189f28dd9b670c3ff2 (patch) | |
tree | b5022983d8a451ef88c4e6ac881055afd57f6dcc | |
parent | 0075c58ca0c05ec05bb74732a4f87bd5c701f637 (diff) | |
download | coderay-c9e5a21102fbc5ac48cc46189f28dd9b670c3ff2.tar.gz |
Fixed FTP password retrieving when working directory is changed.
-rw-r--r-- | rake_helpers/ftp.rb | 12 |
1 files 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
|