Sha256: 98678f1aeb6c71eb3b6736750d93a4ef223eb736609b936dfa611a2e9b3ed7ac
Contents?: true
Size: 602 Bytes
Versions: 2
Compression:
Stored size: 602 Bytes
Contents
module SpecInfra module Helper ['Exec', 'Ssh', 'Cmd', 'WinRM', 'ShellScript'].each do |backend| eval <<-EOF module #{backend} def backend(commands_object=nil) if ! respond_to?(:commands) commands_object = self.class.const_get(SPEC_TYPE).const_get('Commands').const_get('Base').new end instance = self.class.const_get('SpecInfra').const_get('Backend').const_get('#{backend}').instance instance.set_commands(commands_object || commands) instance end end EOF end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
specinfra-0.0.4 | lib/specinfra/helper/backend.rb |
specinfra-0.0.3 | lib/specinfra/helper/backend.rb |