Module: HoldFirefox
- Defined in:
- lib/hold_firefox.rb,
lib/hold_firefox/version.rb
Constant Summary collapse
- VERSION =
"0.1.2"
Class Method Summary collapse
-
.gem_path ⇒ Object
Folder path.
-
.linux ⇒ Object
Path to Ubuntu.
-
.osx ⇒ Object
Path to MacOSX.
- .setup! ⇒ Object
Class Method Details
.gem_path ⇒ Object
Folder path
6 7 8 |
# File 'lib/hold_firefox.rb', line 6 def self.gem_path Pathname.new(File.dirname(__FILE__)).join('..', 'ext', 'hold_firefox') end |
.linux ⇒ Object
Path to Ubuntu
11 12 13 |
# File 'lib/hold_firefox.rb', line 11 def self.linux self.gem_path.join('firefox', 'firefox-bin').to_s end |
.osx ⇒ Object
Path to MacOSX
16 17 18 |
# File 'lib/hold_firefox.rb', line 16 def self.osx self.gem_path.join('Firefox.app', 'Contents', 'MacOS', 'firefox-bin').to_s end |
.setup! ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/hold_firefox.rb', line 20 def self.setup! Selenium::WebDriver::Firefox::Binary.path = if RUBY_PLATFORM =~ /linux/i self.linux elsif RUBY_PLATFORM =~ /darwin/i self.osx else Selenium::WebDriver::Firefox::Binary.path end end |