Class: Konqueror
Constant Summary
collapse
- @@config_dir =
File.join((ENV['HOME'] || ''), '.kde', 'share', 'config')
- @@global_config =
File.join(@@config_dir, 'kdeglobals')
- @@konqueror_config =
File.join(@@config_dir, 'konquerorrc')
Instance Method Summary
collapse
Methods inherited from Browser
#escaped_name, #host, #linux?, #macos?, #name, #open, #path, #windows?
Instance Method Details
#setup ⇒ Object
Forces KDE’s default browser to be Konqueror during the tests, and forces Konqueror to open external URL requests in new tabs instead of a new window.
13
14
15
16
17
18
19
20
21
|
# File 'lib/hanoi/browsers/konqueror.rb', line 13
def setup
cd @@config_dir, :verbose => false do
copy @@global_config, "#{@@global_config}.bak", :preserve => true, :verbose => false
copy @@konqueror_config, "#{@@konqueror_config}.bak", :preserve => true, :verbose => false
system "sed -ri /^BrowserApplication=/d '#{@@global_config}'"
system "sed -ri /^KonquerorTabforExternalURL=/s:false:true: '#{@@konqueror_config}'"
end
end
|
#supported? ⇒ Boolean
6
7
8
|
# File 'lib/hanoi/browsers/konqueror.rb', line 6
def supported?
linux?
end
|
#teardown ⇒ Object
23
24
25
26
27
28
|
# File 'lib/hanoi/browsers/konqueror.rb', line 23
def teardown
cd @@config_dir, :verbose => false do
copy "#{@@global_config}.bak", @@global_config, :preserve => true, :verbose => false
copy "#{@@konqueror_config}.bak", @@konqueror_config, :preserve => true, :verbose => false
end
end
|
#to_s ⇒ Object
34
35
36
|
# File 'lib/hanoi/browsers/konqueror.rb', line 34
def to_s
"Konqueror"
end
|
#visit(url) ⇒ Object
30
31
32
|
# File 'lib/hanoi/browsers/konqueror.rb', line 30
def visit(url)
system("kfmclient openURL #{url}")
end
|