Sha256: 78c1973e30ac96844bd6f5df1eb6ff1c65a6b4f8341ca33b71a7ee0d5a0521e3
Contents?: true
Size: 712 Bytes
Versions: 1
Compression:
Stored size: 712 Bytes
Contents
module Terminus module Client class Browser < Base DEFAULT_COMMANDS = { /(mingw|mswin|windows|cygwin)/i => ['cmd', '/C', 'start', '/b'], /(darwin|mac os)/i => ['open'], /(linux|bsd|aix|solaris)/i => ['xdg-open'] } def browser_args(command) return command + [dock_url] if command os = RbConfig::CONFIG['host_os'] key = DEFAULT_COMMANDS.keys.find { |key| os =~ key } DEFAULT_COMMANDS[key] + [dock_url] end def browser_selector {:current_url => dock_url} end def dock_url "http://#{@address[2]}:#{@port}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
terminus-0.4.0 | lib/terminus/client/browser.rb |