Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comparison of Float with String failed when WD_CACHE_TIME is set #123

Closed
wants to merge 1 commit into from

Conversation

jmgarnier
Copy link

⚠️ This PR code has not been tested as I am using Semaphore 1.0 which does not rely on threads for parallel tests. But I thought I would share it if it can help :)

command

bundle exec rake webdrivers:chromedriver:update WD_CACHE_TIME=86_400 WD_INSTALL_DIR=$SEMAPHORE_CACHE_DIR

stacktrace

ArgumentError: comparison of Float with String failed
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/system.rb:48:in `<'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/system.rb:48:in `valid_cache?'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:153:in `with_cache'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/chromedriver.rb:34:in `latest_version'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:127:in `correct_binary?'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:83:in `update'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/tasks/chromedriver.rake:25

ArgumentError: comparison of Float with String failed
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/system.rb:48:in `<'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/system.rb:48:in `valid_cache?'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:153:in `with_cache'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/chromedriver.rb:34:in `latest_version'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:127:in `correct_binary?'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/common.rb:83:in `update'
/home/runner/dossier/vendor/bundle/ruby/2.4.0/gems/webdrivers-4.0.0.rc1/lib/webdrivers/tasks/chromedriver.rake:25
@kapoorlakshya
Copy link
Collaborator

Hi @jmgarnier, thanks for the pull request. I thought I had caught and fixed this in my PR, but apparently not.

Anyway, I have fixed this under 10a5bee and added a spec for it. We'll release a 4.0.0.rc2 very soon with this fix.

@kapoorlakshya
Copy link
Collaborator

kapoorlakshya commented May 21, 2019

And sorry, didn't mean to take credit away from your contribution. I just found a better spot to implement the fix and wanted to add a spec for it.

I appreciate you reporting this!

@jmgarnier
Copy link
Author

thanks for all the kind words @kapoorlakshya . No offenses, no credit needed! Thanks for quick feedback & sharing your work for free :)

@jmgarnier jmgarnier deleted the patch-1 branch May 22, 2019 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants