Module: SeleniumPrep

Defined in:
lib/selenium-prep.rb,
lib/selenium-prep/urls.rb,
lib/selenium-prep/version.rb,
lib/selenium-prep/overrides.rb,
lib/selenium-prep/downloader.rb,
lib/selenium-prep/system/path.rb,
lib/selenium-prep/system/folder.rb,
lib/selenium-prep/config-checker.rb,
lib/selenium-prep/system/extract.rb

Defined Under Namespace

Modules: Downloader, System, URLs Classes: ConfigChecker

Constant Summary collapse

VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.debug_off?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/selenium-prep/overrides.rb', line 3

def self.debug_off?
  ENV['SE_DEBUG'] == 'off'
end

.downloadObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/selenium-prep.rb', line 9

def self.download
  ConfigChecker.new
  System::Folder.create_directory
  System::Folder.prompt_user if System::Folder.downloads_exist?
  Downloader.download
  System::Extract.extract_zip_files
  System::Extract.delete_zip_files
  puts "\n"
  path_set?
end

.path_set?Boolean

Returns:

  • (Boolean)


20
21
22
23
24
25
26
27
28
29
30
# File 'lib/selenium-prep.rb', line 20

def self.path_set?
  ConfigChecker.new
  result = System::Path.set?
  result ?
    (puts "Selenium is ready to use!") :
    (puts "Your PATH is not configured correctly. \n\nHere is what it's set to now:\n")
  puts System::Path.path
  puts "\n"
  System::Path.set
  result
end