diff options
| author | Ian Taylor <ian@lorf.org> | 2009-06-05 12:39:04 -0400 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-06-06 09:12:00 +1000 |
| commit | 4f2c066a97e59a89df64af4b25beac6f3f0553c2 (patch) | |
| tree | 126540beec3c65448e01e1b48d27275ec4ee6ea4 /lib/puppet/network/handler | |
| parent | 97e6975d69f239e24993315a25a3117b1daa48c3 (diff) | |
| download | puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.gz puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.xz puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.zip | |
Removed extra whitespace from end of lines
Diffstat (limited to 'lib/puppet/network/handler')
| -rwxr-xr-x | lib/puppet/network/handler/filebucket.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/network/handler/fileserver.rb | 20 | ||||
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/network/handler/report.rb | 2 | ||||
| -rwxr-xr-x | lib/puppet/network/handler/resource.rb | 12 |
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/puppet/network/handler/filebucket.rb b/lib/puppet/network/handler/filebucket.rb index 38ef7f3f2..4973886f7 100755 --- a/lib/puppet/network/handler/filebucket.rb +++ b/lib/puppet/network/handler/filebucket.rb @@ -129,7 +129,7 @@ class Puppet::Network::Handler # :nodoc: File.open(bfile) { |of| contents = of.read } - + if client return Base64.encode64(contents) else diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index 50e2614aa..6bc6d9d4a 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -53,7 +53,7 @@ class Puppet::Network::Handler mount = Mount.new(MODULES) mount.allow("*") @mounts[MODULES] = mount - + Puppet.debug "No file server configuration file; autocreating #{PLUGINS} mount with default permissions" mount = PluginMount.new(PLUGINS) mount.allow("*") @@ -145,7 +145,7 @@ class Puppet::Network::Handler desc.collect { |sub| sub.join("\t") }.join("\n") end - + def local? self.local end @@ -349,14 +349,14 @@ class Puppet::Network::Handler mount.allow("*") newmounts[MODULES] = mount end - + unless newmounts[PLUGINS] Puppet.debug "No #{PLUGINS} mount given; autocreating with default permissions" mount = PluginMount.new(PLUGINS) mount.allow("*") newmounts[PLUGINS] = mount end - + unless newmounts[PLUGINS].valid? Puppet.debug "No path given for #{PLUGINS} mount; creating a special PluginMount" # We end up here if the user has specified access rules for @@ -372,7 +372,7 @@ class Puppet::Network::Handler ) newmounts[PLUGINS] = mount end - + # Verify each of the mounts are valid. # We let the check raise an error, so that it can raise an error # pointing to the specific problem. @@ -433,7 +433,7 @@ class Puppet::Network::Handler # Create a map for a specific client. def clientmap(client) { - "h" => client.sub(/\..*$/, ""), + "h" => client.sub(/\..*$/, ""), "H" => client, "d" => client.sub(/[^.]+\./, "") # domain name } @@ -454,7 +454,7 @@ class Puppet::Network::Handler end path.gsub(/%(.)/) do |v| key = $1 - if key == "%" + if key == "%" "%" else map[key] || v @@ -698,7 +698,7 @@ class Puppet::Network::Handler # A special mount class specifically for the plugins mount -- just # has some magic to effectively do a union mount of the 'plugins' # directory of all modules. - # + # class PluginMount < Mount def path(client) '' @@ -719,7 +719,7 @@ class Puppet::Network::Handler def mod_file_path(mod, relpath, client = nil) File.join(mod, PLUGINS, relpath) end - + def file_path(relpath, client = nil) return nil unless mod = valid_modules(client).find { |m| m.plugin(relpath) } mod.plugin(relpath) @@ -746,7 +746,7 @@ class Puppet::Network::Handler def valid_modules(client) Puppet::Node::Environment.new.modules.find_all { |mod| mod.exist? } end - + def add_to_filetree(f, filetree) first, rest = f.split(File::SEPARATOR, 2) end diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index 0d36c1e88..e21e1e6e3 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -74,7 +74,7 @@ class Puppet::Network::Handler end end - # + # def decode_facts(facts) if @local # we don't need to do anything, since we should already diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb index b92b77ea5..8cfd8d83d 100755 --- a/lib/puppet/network/handler/report.rb +++ b/lib/puppet/network/handler/report.rb @@ -79,7 +79,7 @@ class Puppet::Network::Handler # Handle the parsing of the reports attribute. def reports - # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com] + # LAK:NOTE See http://snurl.com/21zf8 [groups_google_com] x = Puppet[:reports].gsub(/(^\s+)|(\s+$)/, '').split(/\s*,\s*/) end end diff --git a/lib/puppet/network/handler/resource.rb b/lib/puppet/network/handler/resource.rb index 54391c3de..6f8d3df0a 100755 --- a/lib/puppet/network/handler/resource.rb +++ b/lib/puppet/network/handler/resource.rb @@ -7,7 +7,7 @@ class Puppet::Network::Handler desc "An interface for interacting with client-based resources that can be used for querying or managing remote machines without using Puppet's central server tools. - + The ``describe`` and ``list`` methods return TransBuckets containing TransObject instances (``describe`` returns a single TransBucket), and the ``apply`` method accepts a TransBucket of TransObjects and @@ -44,7 +44,7 @@ class Puppet::Network::Handler # And then apply the catalog. This way we're reusing all # the code in there. It should probably just be separated out, though. transaction = catalog.apply - + # And then clean up catalog.clear(true) @@ -173,14 +173,14 @@ class Puppet::Network::Handler end # Deal with ignore parameters. - def handleignore(children, path, ignore) - ignore.each { |ignore| + def handleignore(children, path, ignore) + ignore.each { |ignore| Dir.glob(File.join(path,ignore), File::FNM_DOTMATCH) { |match| children.delete(File.basename(match)) - } + } } return children - end + end def to_s "resource" |
