summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-04-02 13:51:47 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit4bff5062a794adb8ebedb927cca33b182e88dfd2 (patch)
treecd2e3fdc8c5a6db295cb38356952cb86064bd45f
parent0917248d801de3c345938ceda960fc0396539982 (diff)
downloadpuppet-4bff5062a794adb8ebedb927cca33b182e88dfd2.tar.gz
puppet-4bff5062a794adb8ebedb927cca33b182e88dfd2.tar.xz
puppet-4bff5062a794adb8ebedb927cca33b182e88dfd2.zip
Indirector/FileBucketFile warnings
Ruby was spewing warnings that there weren't enough parentheses. I have fixed this by adding parentheses.
-rw-r--r--lib/puppet/indirector/file_bucket_file/file.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/puppet/indirector/file_bucket_file/file.rb b/lib/puppet/indirector/file_bucket_file/file.rb
index ec02ca0bd..d32533dd3 100644
--- a/lib/puppet/indirector/file_bucket_file/file.rb
+++ b/lib/puppet/indirector/file_bucket_file/file.rb
@@ -29,7 +29,7 @@ module Puppet::FileBucketFile
def find_by_checksum( checksum )
model.new( nil, :checksum => checksum ) do |bucket_file|
- filename = contents_path_for bucket_file
+ filename = contents_path_for( bucket_file )
if ! ::File.exist? filename
return nil
@@ -42,8 +42,8 @@ module Puppet::FileBucketFile
raise Puppet::Error, "file could not be read: #{e.message}"
end
- if ::File.exist?(paths_path_for bucket_file)
- ::File.open(paths_path_for bucket_file) do |f|
+ if ::File.exist?(paths_path_for( bucket_file) )
+ ::File.open(paths_path_for( bucket_file) ) do |f|
bucket_file.paths = f.readlines.map { |l| l.chomp }
end
end
@@ -54,13 +54,13 @@ module Puppet::FileBucketFile
def save_to_disk( bucket_file )
# If the file already exists, just return the md5 sum.
- if ::File.exist?(contents_path_for bucket_file)
+ if ::File.exist?(contents_path_for( bucket_file) )
verify_identical_file!(bucket_file)
else
# Make the directories if necessary.
- unless ::File.directory?(path_for bucket_file)
+ unless ::File.directory?( path_for( bucket_file) )
Puppet::Util.withumask(0007) do
- ::FileUtils.mkdir_p(path_for bucket_file)
+ ::FileUtils.mkdir_p( path_for( bucket_file) )
end
end
@@ -126,8 +126,8 @@ module Puppet::FileBucketFile
return unless bucket_file.path
# check for dupes
- if ::File.exist?(paths_path_for bucket_file)
- ::File.open(paths_path_for bucket_file) do |f|
+ if ::File.exist?(paths_path_for( bucket_file) )
+ ::File.open(paths_path_for( bucket_file) ) do |f|
return if f.readlines.collect { |l| l.chomp }.include?(bucket_file.path)
end
end