diff options
| author | Markus Roberts <Markus@reality.com> | 2010-07-09 18:06:58 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-09 18:06:58 -0700 |
| commit | 8f15707251cdb58d53e82c4bbd332a38c2d31b4c (patch) | |
| tree | b4a5df05fb8121c498cd33b67516d69af3d9853b /lib/puppet/network | |
| parent | c3e2353afb7fc2fb12efd1eb2bc5c342c792fb3b (diff) | |
| download | puppet-8f15707251cdb58d53e82c4bbd332a38c2d31b4c.tar.gz puppet-8f15707251cdb58d53e82c4bbd332a38c2d31b4c.tar.xz puppet-8f15707251cdb58d53e82c4bbd332a38c2d31b4c.zip | |
Code smell: Don't restate results directly after assignment
Replaced 33 occurances of
([$@]?\w+)( +[|&+-]{0,2}= .+)
\1
end
with
3 Examples:
The code:
@sync ||= Sync.new
@sync
end
becomes:
@sync ||= Sync.new
end
The code:
str += "\n"
str
end
becomes:
str += "\n"
end
The code:
@indirection = Puppet::Indirector::Indirection.new(self, indirection, options)
@indirection
end
becomes:
@indirection = Puppet::Indirector::Indirection.new(self, indirection, options)
end
Diffstat (limited to 'lib/puppet/network')
| -rw-r--r-- | lib/puppet/network/authconfig.rb | 1 | ||||
| -rw-r--r-- | lib/puppet/network/client.rb | 3 | ||||
| -rw-r--r-- | lib/puppet/network/xmlrpc/client.rb | 1 |
3 files changed, 0 insertions, 5 deletions
diff --git a/lib/puppet/network/authconfig.rb b/lib/puppet/network/authconfig.rb index b058012f5..932d6da6d 100644 --- a/lib/puppet/network/authconfig.rb +++ b/lib/puppet/network/authconfig.rb @@ -7,7 +7,6 @@ module Puppet def self.main @main ||= self.new() - @main end # Just proxy the setting methods to our rights stuff diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb index 1d720ccdb..f9c50cd60 100644 --- a/lib/puppet/network/client.rb +++ b/lib/puppet/network/client.rb @@ -49,19 +49,16 @@ class Puppet::Network::Client # client/server stuff. E.g., you could call Client::CA.new(:CA => ca). def self.drivername @drivername ||= self.name - @drivername end # Figure out the handler for our client. def self.handler @handler ||= Puppet::Network::Handler.handler(self.name) - @handler end # The class that handles xmlrpc interaction for us. def self.xmlrpc_client @xmlrpc_client ||= Puppet::Network::XMLRPCClient.handler_class(self.handler) - @xmlrpc_client end # Create our client. diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb index 5bcd5fbc9..3afd1dcc7 100644 --- a/lib/puppet/network/xmlrpc/client.rb +++ b/lib/puppet/network/xmlrpc/client.rb @@ -151,7 +151,6 @@ module Puppet::Network def http @http ||= Puppet::Network::HttpPool.http_instance(host, port, true) - @http end attr_reader :host, :port |
