Skip to content

Commit

Permalink
Update webdriver gem to 5.2.0 version (#4342)
Browse files Browse the repository at this point in the history
* Update webdriver gem to 5.2.0 version

- Reason: SeleniumHQ/selenium#11066
- titusfortner/webdrivers#237

* Add NodeJS installation step in setup & README

* Update google-protobuf gem version to match Gemfile.lock
  • Loading branch information
olttwa authored Nov 9, 2022
1 parent 36b364d commit 35b42b0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ group :test do
gem "puma"
gem "rspec-sidekiq"
gem "simplecov", require: false
gem "webdrivers"
gem "webdrivers", ">= 5.2.0"
gem "webmock"
end
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ GEM
activerecord (>= 4.0.0)
railties (>= 4.0.0)
scientist (1.6.3)
selenium-webdriver (4.4.0)
selenium-webdriver (4.5.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
Expand Down Expand Up @@ -664,7 +664,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.0.0)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
Expand Down Expand Up @@ -814,7 +814,7 @@ DEPENDENCIES
uuidtools
view_component
web-console (>= 3.3.0)
webdrivers
webdrivers (>= 5.2.0)
webmock
webpacker (= 6.0.0.rc.6)
whenever
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ There is one possible caveat to this -- if you see any problems with google-prot

```
gem uninstall google-protobuf
gem install google-protobuf -v 3.17.3 --platform=ruby
gem install google-protobuf -v 3.21.5 --platform=ruby
```

Then rerun bundler and everything will work. This is being tracked over in https://github.com/protocolbuffers/protobuf/issues/8682, hopefully there will be a better fix soon.
Expand Down Expand Up @@ -92,9 +92,13 @@ set up the application step by step. You can do so as follows.

First, you need to [install ruby](https://www.ruby-lang.org/en/documentation/installation). It is recommended to use [rbenv](https://github.com/rbenv/rbenv) to manage ruby versions. Note that we currently use Bundler version 2.3.22, so that is also hardcoded below.

Next, [install NodeJS v18.11.0](https://nodejs.org/en/) using [nvm](https://github.com/nvm-sh/nvm).

```bash
gem install bundler -v 2.3.22
bundle _2.3.22_ install
brew install nvm
nvm install 18.11.0
rake yarn:install
rails db:setup
```
Expand Down
20 changes: 19 additions & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ set -euo pipefail
BUNDLER_VERSION=2.3.22

init (){
verify_ruby_version && verify_bundled_gems && verify_yarn_packages
verify_ruby_version && verify_node_version
verify_bundled_gems && verify_yarn_packages
verify_foreman
verify_postgres && verify_database_migrations
configure_parallel_testing
Expand Down Expand Up @@ -98,13 +99,30 @@ verify_ruby_version (){
has_ruby_version || install_ruby_version
}

verify_node_version (){
echo 'Checking for node version'
has_node_version || install_nodejs
}

verify_bundled_gems (){
echo 'Updating gems...'
{
(gem list -i -v ${BUNDLER_VERSION} bundler || gem install bundler -v ${BUNDLER_VERSION}) && bundle _${BUNDLER_VERSION}_ install --binstubs=./bundle/bin
} 2>&1
}

has_node_version (){
INSTALLED_NODE_VERSION=$(node -v)
[ "$INSTALLED_NODE_VERSION" == "v18.11.0" ]
}

install_nodejs (){
echo 'Installing NodeJS...'
brew install nvm
nvm install 18.11.0
node -v
}

verify_yarn_packages (){
echo 'Updating Yarn packages...'

Expand Down

0 comments on commit 35b42b0

Please sign in to comment.