Merge pull request #3419 from hennevogel/bugfix/chromedriver-update

Bugfix webdrivers update / Update Ruby to 3.3.3
This commit is contained in:
Henne Vogelsang 2024-06-24 17:00:11 +02:00 committed by GitHub
commit ee4e88a755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 18 additions and 13 deletions

View file

@ -26,7 +26,6 @@ jobs:
echo "BUNDLE_CACHE_PATH=vendor/cache.next" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.2
bundler-cache: true
- name: Prepare spec
run: |

View file

@ -16,7 +16,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.2
bundler-cache: true
- run: bundle exec rubocop
- run: bundle exec haml-lint app/views
@ -34,7 +33,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.2
bundler-cache: true
- name: Prepare spec
run: |

View file

@ -1 +1 @@
3.3.2
3.3.3

View file

@ -20,8 +20,7 @@ WORKDIR /osem/
RUN bundle config set --local path 'vendor/bundle'; \
bundle install --jobs=4 --retry=3
# Install our process manager / update chromedriver
RUN sudo gem install foreman; \
bundle exec bin/rails webdrivers:chromedriver:update
# Install our process manager
RUN sudo gem install foreman
CMD ["foreman", "start"]

View file

@ -6,7 +6,7 @@ end
source 'https://rubygems.org'
ruby '3.3.2'
ruby '~> 3.3'
# as web framework
if next?

View file

@ -704,7 +704,7 @@ DEPENDENCIES
whenever
RUBY VERSION
ruby 3.3.2
ruby 3.3.3
BUNDLED WITH
2.5.9

View file

@ -2,10 +2,6 @@
# Mock external requests to youtube
require 'webmock/rspec'
driver_urls = Webdrivers::Common.subclasses.map do |driver|
Addressable::URI.parse(driver.base_url).host
end
WebMock.disable_net_connect!(allow_localhost: true, allow: [*driver_urls, /stripe.com/])
RSpec.configure do |config|
config.before(:each) do

13
spec/support/webmock.rb Normal file
View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
# Allow webdriver update urls
# from https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock
allowed_urls = Webdrivers::Common.subclasses.map(&:base_url)
allowed_urls << /geckodriver/
# We've seen [a redirect](https://github.com/titusfortner/webdrivers/issues/204) to this domain
allowed_urls += ['github-releases.githubusercontent.com']
# Allow stripe.com for stripe integration tests
allowed_urls += ['stripe.com']
WebMock.disable_net_connect!(allow_localhost: true, allow: allowed_urls)