Sha256: ca016d3e4e47c78a8392b5a63df632c38961d79e34de847181a2f86513ea79f5

Contents?: true

Size: 764 Bytes

Versions: 17

Compression:

Stored size: 764 Bytes

Contents

module SaucelabsAdapter

  class Tunnel

    def self.factory(selenium_config)
      tunnels = {
        :saucetunnel => SauceTunnel,
        :sshtunnel => SshTunnel,
        :othertunnel => OtherTunnel
      }
      raise_with_message "Unknown tunnel type #{selenium_config.tunnel_method}" unless tunnels[selenium_config.tunnel_method.to_sym]

      return tunnels[selenium_config.tunnel_method].new(selenium_config)
    end

    def initialize(se_config)
      raise "#{self.class.name}.new requires a SeleniumConfig argument" unless se_config.is_a?(SeleniumConfig)
      @se_config = se_config
    end

    def start_tunnel
      raise "You need to override this method"
    end

    def shutdown
      raise "You need to override this method"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
saucelabs-adapter-0.8.24 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.22 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.19 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.18 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.17 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.16 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.12 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.11 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.10 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.8 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.7 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.5 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.4 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.3 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.2 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.1 lib/saucelabs_adapter/tunnel.rb
saucelabs-adapter-0.8.0 lib/saucelabs_adapter/tunnel.rb