lib/sprinkle/actors/local.rb in sprinkle-0.7.1.1 vs lib/sprinkle/actors/local.rb in sprinkle-0.7.2
- old
+ new
@@ -16,18 +16,22 @@
#
# Note: The local actor completely ignores roles and behaves as if your
# local system was a member of all roles defined.
class Local < Actor
- class LocalCommandError < StandardError; end
- def servers_for_role?(role)
+ class LocalCommandError < StandardError #:nodoc:
+ end
+
+ def servers_for_role?(role) #:nodoc:
true
end
- def sudo?; false; end
- def sudo_command; nil; end
+ def sudo? #:nodoc:;
+ false; end
+ def sudo_command #:nodoc:;
+ nil; end
def install(installer, roles, opts = {}) #:nodoc:
# all local installer cares about is the commands
@installer = installer
process(installer.package.name, installer.install_sequence, roles)
@@ -60,19 +64,19 @@
raise LocalCommandError if res != 0
end
return true
end
- def run_command(cmd)
+ def run_command(cmd) #:nodoc:
@log_recorder.reset cmd
pid, stdin, out, err = Open4.popen4(cmd)
ignored, status = Process::waitpid2 pid
@log_recorder.log :err, err.read
@log_recorder.log :out, out.read
@log_recorder.code = status.to_i
end
- def raise_error(e)
+ def raise_error(e) #:nodoc:
raise Sprinkle::Errors::RemoteCommandFailure.new(@installer, @log_recorder.hash, e)
end
def transfer(source, destination, roles, opts ={}) #:nodoc:
opts.reverse_merge!(:recursive => true)