Class: Geordi::ChromedriverUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/geordi/chromedriver_updater.rb

Instance Method Summary collapse

Instance Method Details

#run(options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/geordi/chromedriver_updater.rb', line 8

def run(options)
  chrome_version = determine_chrome_version
  current_chromedriver_version = determine_chromedriver_version

  latest_chromedriver_version = latest_version(chrome_version)
  if current_chromedriver_version == latest_chromedriver_version
    Interaction.success "No update required: Chromedriver is already on the latest version v#{latest_chromedriver_version}!" unless options[:quiet_if_matching]
  else
    update_chromedriver(latest_chromedriver_version)
  end
end