diff options
| author | Markus Roberts <Markus@reality.com> | 2010-07-09 18:07:15 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-09 18:07:15 -0700 |
| commit | 543225970225de5697734bfaf0a6eee996802c04 (patch) | |
| tree | ecc6f639c43cf1812e64f9c6ce7eacc0922b57ff /lib/puppet/network/handler | |
| parent | 8f15707251cdb58d53e82c4bbd332a38c2d31b4c (diff) | |
| download | puppet-543225970225de5697734bfaf0a6eee996802c04.tar.gz puppet-543225970225de5697734bfaf0a6eee996802c04.tar.xz puppet-543225970225de5697734bfaf0a6eee996802c04.zip | |
Code smell: Avoid needless decorations
* Replaced 704 occurances of (.*)\b([a-z_]+)\(\) with \1\2
3 Examples:
The code:
ctx = OpenSSL::SSL::SSLContext.new()
becomes:
ctx = OpenSSL::SSL::SSLContext.new
The code:
skip()
becomes:
skip
The code:
path = tempfile()
becomes:
path = tempfile
* Replaced 31 occurances of ^( *)end *#.* with \1end
3 Examples:
The code:
becomes:
The code:
end # Dir.foreach
becomes:
end
The code:
end # def
becomes:
end
Diffstat (limited to 'lib/puppet/network/handler')
| -rwxr-xr-x | lib/puppet/network/handler/fileserver.rb | 4 | ||||
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/network/handler/report.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index 1131e434a..0a5082012 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -112,7 +112,7 @@ class Puppet::Network::Handler if configuration readconfig(false) # don't check the file the first time. else - create_default_mounts() + create_default_mounts end end end @@ -424,7 +424,7 @@ class Puppet::Network::Handler else Puppet.notice "No client; expanding '#{path}' with local host" # Else, use the local information - map = localmap() + map = localmap end path.gsub(/%(.)/) do |v| key = $1 diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index 6f2c238a2..6696df448 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -33,7 +33,7 @@ class Puppet::Network::Handler args[:Local] = true - @ca = (hash.include?(:CA) and hash[:CA]) ? Puppet::SSLCertificates::CA.new() : nil + @ca = (hash.include?(:CA) and hash[:CA]) ? Puppet::SSLCertificates::CA.new : nil # This is only used by the cfengine module, or if --loadclasses was # specified in +puppet+. diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb index 50e2fbfea..d935d3822 100755 --- a/lib/puppet/network/handler/report.rb +++ b/lib/puppet/network/handler/report.rb @@ -52,7 +52,7 @@ class Puppet::Network::Handler # Used for those reports that accept yaml client = report.host - reports().each do |name| + reports.each do |name| if mod = Puppet::Reports.report(name) # We have to use a dup because we're including a module in the # report. |
