Sha256: cf870e0724935ea13aca86c9758deb23b3736c45c98bfe4bfe36a0a58a80a08c

Contents?: true

Size: 1.54 KB

Versions: 107

Compression:

Stored size: 1.54 KB

Contents

[ 'host', 'command_factory', 'command', 'options' ].each do |lib|
      require "beaker/#{lib}"
end

module Windows
  # A windows host with cygwin tools installed
  class Host < Unix::Host
    [ 'user', 'group', 'exec', 'pkg', 'file' ].each do |lib|
          require "beaker/host/windows/#{lib}"
    end

    include Windows::User
    include Windows::Group
    include Windows::File
    include Windows::Exec
    include Windows::Pkg

    def platform_defaults
      h = Beaker::Options::OptionsHash.new
      h.merge({
        'user'          => 'Administrator',
        'group'         => 'Administrators',
        'pathseparator' => ';',
      })
    end

    def external_copy_base
      return @external_copy_base if @external_copy_base
      @external_copy_base = execute('echo `cygpath -smF 35`/')
      @external_copy_base
    end

    # Determines which SSH Server is in use on this host
    #
    # @return [Symbol] Value for the SSH Server in use
    #   (:bitvise or :openssh at this point).
    def determine_ssh_server
      return @ssh_server if @ssh_server
      @ssh_server = :openssh
      status = execute('cmd.exe /c sc query BvSshServer', :accept_all_exit_codes => true)
      @ssh_server = :bitvise if status =~ /4  RUNNING/
      logger.debug("windows.rb:determine_ssh_server: determined ssh server: '#{@ssh_server}'")
      @ssh_server
    end

    attr_reader :scp_separator
    def initialize name, host_hash, options
      super

      @ssh_server         = nil
      @scp_separator      = '\\'
      @external_copy_base = nil
    end

  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
beaker-2.52.0 lib/beaker/host/windows.rb
beaker-3.5.0 lib/beaker/host/windows.rb
beaker-3.4.0 lib/beaker/host/windows.rb
beaker-3.3.0 lib/beaker/host/windows.rb
beaker-3.2.0 lib/beaker/host/windows.rb
beaker-3.1.0 lib/beaker/host/windows.rb
beaker-3.0.0 lib/beaker/host/windows.rb
beaker-2.51.0 lib/beaker/host/windows.rb
beaker-2.50.0 lib/beaker/host/windows.rb
beaker-2.49.0 lib/beaker/host/windows.rb
beaker-2.48.1 lib/beaker/host/windows.rb
beaker-2.48.0 lib/beaker/host/windows.rb
beaker-2.47.1 lib/beaker/host/windows.rb
beaker-2.47.0 lib/beaker/host/windows.rb
beaker-2.46.0 lib/beaker/host/windows.rb
beaker-2.45.0 lib/beaker/host/windows.rb
beaker-2.44.0 lib/beaker/host/windows.rb
beaker-2.43.0 lib/beaker/host/windows.rb
beaker-2.42.0 lib/beaker/host/windows.rb
beaker-2.41.0 lib/beaker/host/windows.rb