Module: CommandWrap::Config::Xvfb
- Defined in:
- lib/command_wrap/config/xvfb.rb
Class Method Summary collapse
- .command(subcommand) ⇒ Object
- .executable ⇒ Object
- .executable=(executeable) ⇒ Object
- .params ⇒ Object
- .params=(params) ⇒ Object
- .server_command ⇒ Object
- .server_command=(server_command) ⇒ Object
- .server_mode ⇒ Object
- .server_mode=(server_mode) ⇒ Object
- .server_port ⇒ Object
- .server_port=(server_port) ⇒ Object
- .stop_server_command ⇒ Object
- .stop_server_command=(server_stop) ⇒ Object
Class Method Details
.command(subcommand) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/command_wrap/config/xvfb.rb', line 21 def self.command (subcommand) if server_mode "DISPLAY=:#{server_port};#{subcommand}" else "#{executable} #{params} #{subcommand}" end end |
.executable ⇒ Object
5 6 7 |
# File 'lib/command_wrap/config/xvfb.rb', line 5 def self.executable @executable ||= "xvfb-run" end |
.executable=(executeable) ⇒ Object
9 10 11 |
# File 'lib/command_wrap/config/xvfb.rb', line 9 def self.executable= (executeable) @executable = executeable end |
.params ⇒ Object
13 14 15 |
# File 'lib/command_wrap/config/xvfb.rb', line 13 def self.params @params ||= '--wait=0 --server-args="-screen 0, 1024x768x24"' end |
.params=(params) ⇒ Object
17 18 19 |
# File 'lib/command_wrap/config/xvfb.rb', line 17 def self.params= (params) @params = params end |
.server_command ⇒ Object
48 49 50 |
# File 'lib/command_wrap/config/xvfb.rb', line 48 def self.server_command @server_command ||= 'Xvfb :35 -screen 0 1024x768x24' end |
.server_command=(server_command) ⇒ Object
52 53 54 |
# File 'lib/command_wrap/config/xvfb.rb', line 52 def self.server_command= (server_command) @server_command = server_command end |
.server_mode ⇒ Object
29 30 31 32 33 34 |
# File 'lib/command_wrap/config/xvfb.rb', line 29 def self.server_mode if @server_mode.nil? @server_mode = false end @server_mode end |
.server_mode=(server_mode) ⇒ Object
36 37 38 |
# File 'lib/command_wrap/config/xvfb.rb', line 36 def self.server_mode= (server_mode) @server_mode = server_mode end |
.server_port ⇒ Object
40 41 42 |
# File 'lib/command_wrap/config/xvfb.rb', line 40 def self.server_port @server_port ||= '35' end |
.server_port=(server_port) ⇒ Object
44 45 46 |
# File 'lib/command_wrap/config/xvfb.rb', line 44 def self.server_port= (server_port) @server_port = server_port end |
.stop_server_command ⇒ Object
56 57 58 |
# File 'lib/command_wrap/config/xvfb.rb', line 56 def self.stop_server_command @server_stop ||= "killall -9 Xvfb" end |
.stop_server_command=(server_stop) ⇒ Object
60 61 62 |
# File 'lib/command_wrap/config/xvfb.rb', line 60 def self.stop_server_command= (server_stop) @server_stop = server_stop end |