Class: SaucelabsAdapter::Tunnel
- Inherits:
-
Object
- Object
- SaucelabsAdapter::Tunnel
show all
- Defined in:
- lib/saucelabs_adapter/tunnel.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(se_config) ⇒ Tunnel
Returns a new instance of Tunnel.
17
18
19
20
|
# File 'lib/saucelabs_adapter/tunnel.rb', line 17
def initialize(se_config)
raise "#{self.class.name}.new requires a SeleniumConfig argument" unless se_config.is_a?(SeleniumConfig)
@se_config = se_config
end
|
Class Method Details
.factory(selenium_config) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/saucelabs_adapter/tunnel.rb', line 5
def self.factory(selenium_config)
tunnels = {
:saucetunnel => SauceTunnel,
:sauceconnecttunnel => SauceConnectTunnel,
: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
|
Instance Method Details
#shutdown ⇒ Object
26
27
28
|
# File 'lib/saucelabs_adapter/tunnel.rb', line 26
def shutdown
raise "You need to override this method"
end
|
#start_tunnel ⇒ Object
22
23
24
|
# File 'lib/saucelabs_adapter/tunnel.rb', line 22
def start_tunnel
raise "You need to override this method"
end
|