Sha256: 24589f0ea698e3edc4a725b9dc340d23693dac6ba4556f1cb3d845f43e413642
Contents?: true
Size: 814 Bytes
Versions: 353
Compression:
Stored size: 814 Bytes
Contents
module Specinfra class Runner def self.method_missing(meth, *args) backend = Specinfra.backend processor = Specinfra::Processor if ! os.include?(:family) || os[:family] != 'windows' if processor.respond_to?(meth) processor.send(meth, *args) elsif backend.respond_to?(meth) backend.send(meth, *args) else run(meth, *args) end else if backend.respond_to?(meth) backend.send(meth, *args) else run(meth, *args) end end end private def self.run(meth, *args) cmd = Specinfra.command.get(meth, *args) ret = Specinfra.backend.run_command(cmd) if meth.to_s =~ /^check/ ret.success? else ret end end end end
Version data entries
353 entries across 353 versions & 3 rubygems