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
-
#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.
- #supported? ⇒ Boolean
- #teardown ⇒ Object
Methods inherited from Browser
#escaped_name, #host, #installed?, #linux?, #macos?, #name, #path, #runnable?, #to_s, #visit, #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 # Too lazy to write it in Ruby... Is sed dependency so bad? 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 |