summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJesse Campbell <hikeit@gmail.com>2013-02-28 12:08:50 -0500
committerJesse Campbell <hikeit@gmail.com>2013-02-28 12:08:50 -0500
commit6bd68e0ac82621df3438980a13b49bd9270291c6 (patch)
treed962acf6523cc51b3124012c20cd9b002775e310 /lib
parent6a8476ef8edb618e6a0fc7169e81aa900dd8260f (diff)
downloadchef-6bd68e0ac82621df3438980a13b49bd9270291c6.tar.gz
minor bugs
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/remote_file.rb6
-rw-r--r--lib/chef/provider/remote_file/ftp.rb2
-rw-r--r--lib/chef/provider/remote_file/local_file.rb5
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/chef/provider/remote_file.rb b/lib/chef/provider/remote_file.rb
index 553e700b16..01b06e6bd3 100644
--- a/lib/chef/provider/remote_file.rb
+++ b/lib/chef/provider/remote_file.rb
@@ -136,7 +136,11 @@ class Chef
def grab_file_from_uri(uri)
if_modified_since = @new_resource.last_modified
if_none_match = @new_resource.etag
- if uri.to_s == @current_resource.source[0]
+ uri_dup = uri.dup
+ if uri_dup.userinfo
+ uri_dup.password = "********"
+ end
+ if uri_dup.to_s == @current_resource.source[0]
if_modified_since ||= @current_resource.last_modified
if_none_match ||= @current_resource.etag
end
diff --git a/lib/chef/provider/remote_file/ftp.rb b/lib/chef/provider/remote_file/ftp.rb
index 8689d9d788..20526324d1 100644
--- a/lib/chef/provider/remote_file/ftp.rb
+++ b/lib/chef/provider/remote_file/ftp.rb
@@ -43,7 +43,7 @@ class Chef
# Parse the uri into instance variables
def initialize(uri, proxy_uri, ftp_active_mode)
- ENV[SOCKS_SERVER] = proxy_uri.to_s
+ ENV['SOCKS_SERVER'] = proxy_uri.to_s
@directories, @filename = parse_path(uri.path)
@typecode = uri.typecode
# Only support ascii and binary types
diff --git a/lib/chef/provider/remote_file/local_file.rb b/lib/chef/provider/remote_file/local_file.rb
index b760eeea0c..e9df6aa216 100644
--- a/lib/chef/provider/remote_file/local_file.rb
+++ b/lib/chef/provider/remote_file/local_file.rb
@@ -41,11 +41,6 @@ class Chef
close
end
- # Parse the uri into instance variables
- def initialize(uri, mode="r")
- super(uri.path, mode)
- end
-
end
end
end