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

Bugfix webdrivers update / Update Ruby to 3.3.3 #3419

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/next-rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.2
3.3.3
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ end

source 'https://rubygems.org'

ruby '3.3.2'
ruby '~> 3.3'

# as web framework
if next?
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ DEPENDENCIES
whenever

RUBY VERSION
ruby 3.3.2
ruby 3.3.3

BUNDLED WITH
2.5.9
4 changes: 0 additions & 4 deletions spec/support/external_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions spec/support/webmock.rb
Original file line number Diff line number Diff line change
@@ -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)