Class: Geordi::ChromedriverUpdater
- Inherits:
-
Object
- Object
- Geordi::ChromedriverUpdater
- Defined in:
- lib/geordi/chromedriver_updater.rb
Defined Under Namespace
Classes: ProcessingError
Constant Summary collapse
- VERSIONS_PER_MILESTONES_URL =
"https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json"
Instance Method Summary collapse
Instance Method Details
#run(options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/geordi/chromedriver_updater.rb', line 13 def run() 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.note "No update required. Chromedriver is already on the latest version #{latest_chromedriver_version}." unless [:quiet_if_matching] else update_chromedriver(latest_chromedriver_version) end rescue ProcessingError => e interaction_method = ([:exit_on_failure] == false) ? :warn : :fail Interaction.public_send(interaction_method, e.) end |