Module: CommandWrap::Config::OpenOffice

Defined in:
lib/command_wrap/config/open_office.rb

Class Method Summary collapse

Class Method Details

.commandObject



5
6
7
# File 'lib/command_wrap/config/open_office.rb', line 5

def self.command
    "#{executable} #{parsed_params}"
end

.executableObject



13
14
15
# File 'lib/command_wrap/config/open_office.rb', line 13

def self.executable
    @openoffice ||= "soffice"
end

.executable=(openoffice) ⇒ Object



17
18
19
# File 'lib/command_wrap/config/open_office.rb', line 17

def self.executable= (openoffice)
    @openoffice = openoffice
end

.hostObject



29
30
31
# File 'lib/command_wrap/config/open_office.rb', line 29

def self.host
    @host ||= "127.0.0.1"
end

.host=(host) ⇒ Object



33
34
35
# File 'lib/command_wrap/config/open_office.rb', line 33

def self.host= (host)
     @host = host
end

.paramsObject



37
38
39
# File 'lib/command_wrap/config/open_office.rb', line 37

def self.params
    @params ||= '-headless -display :30 -accept="socket,host=[host],port=[port];urp;" -nofirststartwizard'
end

.params=(params) ⇒ Object



41
42
43
# File 'lib/command_wrap/config/open_office.rb', line 41

def self.params= (params)
    @params = params
end

.parsed_paramsObject



9
10
11
# File 'lib/command_wrap/config/open_office.rb', line 9

def self.parsed_params
    params.gsub('[port]', port.to_s).gsub('[host]', host)
end

.portObject



21
22
23
# File 'lib/command_wrap/config/open_office.rb', line 21

def self.port
    @port ||= 8000
end

.port=(port) ⇒ Object



25
26
27
# File 'lib/command_wrap/config/open_office.rb', line 25

def self.port= (port)
    @port = port
end

.pythonObject



69
70
71
# File 'lib/command_wrap/config/open_office.rb', line 69

def self.python
    @python ||= 'python'
end

.python=(python) ⇒ Object



73
74
75
# File 'lib/command_wrap/config/open_office.rb', line 73

def self.python= (python)
    @python = python
end

.stopObject



61
62
63
# File 'lib/command_wrap/config/open_office.rb', line 61

def self.stop
    @stop ||= 'killall -9 soffice.bin'
end

.stop=(stop) ⇒ Object



65
66
67
# File 'lib/command_wrap/config/open_office.rb', line 65

def self.stop= (stop)
    @stop = stop
end

.stop_xvfbObject



53
54
55
# File 'lib/command_wrap/config/open_office.rb', line 53

def self.stop_xvfb
    @stop_xvfb ||= 'killall -9 Xvfb'
end

.stop_xvfb=(stop_xvfb) ⇒ Object



57
58
59
# File 'lib/command_wrap/config/open_office.rb', line 57

def self.stop_xvfb= (stop_xvfb)
    @stop_xvfb = stop_xvfb
end

.xvfbObject



45
46
47
# File 'lib/command_wrap/config/open_office.rb', line 45

def self.xvfb
    @xvfb ||= 'Xvfb :30 -screen 0 1024x768x24'
end

.xvfb=(xvfb) ⇒ Object



49
50
51
# File 'lib/command_wrap/config/open_office.rb', line 49

def self.xvfb= (xvfb)
    @xvfb = xvfb
end