Skip to content

Commit

Permalink
5702 - Remove trailing whitespace from all files
Browse files Browse the repository at this point in the history
Remove trailing white space from everything
  • Loading branch information
ripienaar committed Dec 28, 2010
1 parent a7f442f commit cabb026
Show file tree
Hide file tree
Showing 19 changed files with 89 additions and 88 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Marionette Collective
=========================

The Marionette Collective aka. mcollective is a framework to build server orchestration or parallel job execution systems.
The Marionette Collective aka. mcollective is a framework to build server orchestration or parallel job execution systems.

For full information, wikis, ticketing and downloads please see http://marionette-collective.org/
2 changes: 1 addition & 1 deletion etc/client.cfg.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ libdir = /usr/libexec/mcollective
logfile = /dev/null
loglevel = info

# Plugins
# Plugins
securityprovider = psk
plugin.psk = unset

Expand Down
2 changes: 1 addition & 1 deletion etc/server.cfg.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1

# Plugins
# Plugins
securityprovider = psk
plugin.psk = unset

Expand Down
12 changes: 6 additions & 6 deletions ext/mc-irb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def consolize &block
puts "\n\nActions for #{@agent_name}:\n"

@agent.ddl.actions.each do |action|
puts "%20s - %s" % [ ":#{action}", @agent.ddl.action_interface(action)[:description] ]
puts "%20s - %s" % [ ":#{action}", @agent.ddl.action_interface(action)[:description] ]
end

print "\n" + e.line
Expand All @@ -79,7 +79,7 @@ def consolize &block

[ddl[:input].keys, :verbose].flatten
end
rescue Exception
rescue Exception
[]
end
end
Expand Down Expand Up @@ -199,15 +199,15 @@ def mc?
rpc - Performs an RPC request
reset - Resets the discovered knowledge
discover - Performs a new discovery showing
discover - Performs a new discovery showing
hosts that was found
newagent - Switches to a new agent
mchelp - The DDL created help for the agent
Filter Commands:
Filter arguments should be enclosed in "your.host.com" if they are strings
else use /your.host/ to match Regular expressions
identity_filter [identity] - Sets an identity filter
fact_filter [factname], [factvalue] - Sets a fact filter
class_filter [classname] - Sets a class filter
Expand All @@ -222,8 +222,8 @@ def mc?
Completions:
While doing an RPC request, press ?<tab> for a list of actions or
arguments, do simple :<tab> to get completion on action names and
While doing an RPC request, press ?<tab> for a list of actions or
arguments, do simple :<tab> to get completion on action names and
arguments without description of each
EOF
Expand Down
4 changes: 2 additions & 2 deletions ext/mc-rpc-restserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# http://<your box>/mcollective/rpctest/echo/msg=hello%20world
#
# Creates a new Simple RPC client for the 'rpctest' agent, calls
# the echo action with a message 'hello world'.
# the echo action with a message 'hello world'.
#
# Returns all the answers as a JSON data block
get '/mcollective/:agent/:action/*' do
Expand All @@ -23,7 +23,7 @@

arguments = {}

# split up the wildcard params into key=val pairs and
# split up the wildcard params into key=val pairs and
# build the arguments hash
params[:splat].each do |arg|
arguments[$1.to_sym] = $2 if arg =~ /^(.+?)=(.+)$/
Expand Down
4 changes: 2 additions & 2 deletions ext/stompclient
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# --port, -p
# The port to connect to, default to 6163
#
#
# --user, -u
# The user to connect as, can also be set in STOMP_USER environment variable
#
Expand Down Expand Up @@ -106,7 +106,7 @@ Thread.new(@conn) do |amq|
dest = msg.headers["destination"]
time = Time.now.strftime('%H:%M:%S')

if @showdetails
if @showdetails
msg = "\r#{time}:#{dest} > #{msg.body.chomp}\n"
else
msg = "\r#{msg.body.chomp}\n"
Expand Down
4 changes: 2 additions & 2 deletions lib/mcollective/registration.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MCollective
# Registration is implimented using a module structure and installations can
# Registration is implimented using a module structure and installations can
# configure which module they want to use.
#
# We provide a simple one that just sends back the list of current known agents
Expand All @@ -8,7 +8,7 @@ module MCollective
# Create a module in plugins/mcollective/registration/<yourplugin>.rb
#
# You can inherit from MCollective::Registration::Base in which case you just need
# to supply a _body_ method, whatever this method returns will be send to the
# to supply a _body_ method, whatever this method returns will be send to the
# middleware connection for an agent called _registration_
module Registration
autoload :Base, "mcollective/registration/base"
Expand Down
2 changes: 1 addition & 1 deletion lib/mcollective/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module MCollective
# A simple container class for messages from the middleware.
#
# By design we put everything we care for in a payload of the message and
# do not rely on any headers, special data formats etc as produced by the
# do not rely on any headers, special data formats etc as produced by the
# middleware, using this abstraction means we can enforce that
class Request
attr_reader :payload
Expand Down
20 changes: 10 additions & 10 deletions lib/mcollective/rpc/agent.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module MCollective
module RPC
# A wrapper around the traditional agent, it takes care of a lot of the tedious setup
# you would do for each agent allowing you to just create methods following a naming
# you would do for each agent allowing you to just create methods following a naming
# standard leaving the heavy lifting up to this clas.
#
# See http://marionette-collective.org/simplerpc/agents.html
Expand Down Expand Up @@ -57,17 +57,17 @@ def initialize
# if we have a global authorization provider enable it
# plugins can still override it per plugin
self.class.authorized_by(@config.rpcauthprovider) if @config.rpcauthorization

startup_hook
end

def handlemsg(msg, connection)
@request = RPC.request(msg)
@reply = RPC.reply

begin
# Calls the authorization plugin if any is defined
# if this raises an exception we wil just skip processing this
# if this raises an exception we wil just skip processing this
# message
authorization_hook(@request) if respond_to?("authorization_hook")

Expand Down Expand Up @@ -207,10 +207,10 @@ def validate(key, validation)
case validation
when :shellsafe
raise InvalidRPCData, "#{key} should be a String" unless @request[key].is_a?(String)
raise InvalidRPCData, "#{key} should not have > in it" if @request[key].match(/>/)
raise InvalidRPCData, "#{key} should not have < in it" if @request[key].match(/</)
raise InvalidRPCData, "#{key} should not have \` in it" if @request[key].match(/\`/)
raise InvalidRPCData, "#{key} should not have | in it" if @request[key].match(/\|/)
raise InvalidRPCData, "#{key} should not have > in it" if @request[key].match(/>/)
raise InvalidRPCData, "#{key} should not have < in it" if @request[key].match(/</)
raise InvalidRPCData, "#{key} should not have \` in it" if @request[key].match(/\`/)
raise InvalidRPCData, "#{key} should not have | in it" if @request[key].match(/\|/)


when :ipv6address
Expand Down Expand Up @@ -241,7 +241,7 @@ def validate(key, validation)
end

# Called at the end of the RPC::Agent standard initialize method
# use this to adjust meta parameters, timeouts and any setup you
# use this to adjust meta parameters, timeouts and any setup you
# need to do.
#
# This will not be called right when the daemon starts up, we use
Expand All @@ -261,7 +261,7 @@ def before_processing_hook(msg, connection)
# to the middleware.
#
# This gets run outside of the main exception handling block of the agent
# so you should handle any exceptions you could raise yourself. The reason
# so you should handle any exceptions you could raise yourself. The reason
# it is outside of the block is so you'll have access to even status codes
# set by the exception handlers. If you do raise an exception it will just
# be passed onto the runner and processing will fail.
Expand Down
10 changes: 5 additions & 5 deletions lib/mcollective/rpc/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ module RPC
# You must inherit from MCollective::RPC::Audit which will take
# care of registering you with the plugin system.
#
# Your plugin must provide audit_request(request, connection)
# Your plugin must provide audit_request(request, connection)
# the request parameter will be an instance of MCollective::RPC::Request
#
# To enable auditing you should set:
#
# rpcaudit = 1
# rpcaudit = 1
# rpcauditprovider = Logfile
#
# in the config file this will enable logging using the
# in the config file this will enable logging using the
# MCollective::Audit::Logile class
#
# The Audit class acts as a base for audit plugins and takes care of registering them
# The Audit class acts as a base for audit plugins and takes care of registering them
# with the plugin manager
class Audit
def self.inherited(klass)
PluginManager << {:type => "rpcaudit_plugin", :class => klass.to_s}
end

def audit_request(request, connection)
@log.error("audit_request is not implimented in #{this.class}")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/mcollective/rpc/reply.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MCollective
module RPC
module RPC
# Simple class to manage compliant replies to MCollective::RPC
class Reply
attr_accessor :statuscode, :statusmsg, :data
Expand Down
2 changes: 1 addition & 1 deletion lib/mcollective/rpc/request.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MCollective
module RPC
module RPC
# Simple class to manage compliant requests for MCollective::RPC agents
class Request
attr_accessor :time, :action, :data, :sender, :agent, :uniqid, :caller
Expand Down
2 changes: 1 addition & 1 deletion lib/mcollective/rpc/result.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MCollective
module RPC
module RPC
# Simple class to manage compliant results from MCollective::RPC agents
#
# Currently it just fakes Hash behaviour to the result to remain backward
Expand Down
Loading

0 comments on commit cabb026

Please sign in to comment.