diff --git a/.github/workflows/next-rails.yml b/.github/workflows/next-rails.yml index 76bbb97c6a..386abdc3f8 100644 --- a/.github/workflows/next-rails.yml +++ b/.github/workflows/next-rails.yml @@ -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: | diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index a7036ebdd3..c4ec147bf6 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -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: | diff --git a/.ruby-version b/.ruby-version index 4772543317..619b537668 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.2 +3.3.3 diff --git a/Dockerfile b/Dockerfile index 59e6b03255..9e18612e9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/Gemfile b/Gemfile index bb7ba51da9..0db8e5fa78 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ end source 'https://rubygems.org' -ruby '3.3.2' +ruby '~> 3.3' # as web framework if next? diff --git a/Gemfile.lock b/Gemfile.lock index 369771cebe..7c047cbf4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -704,7 +704,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 3.3.2 + ruby 3.3.3 BUNDLED WITH 2.5.9 diff --git a/spec/support/external_request.rb b/spec/support/external_request.rb index a3ebf9390c..74d70d4fa3 100644 --- a/spec/support/external_request.rb +++ b/spec/support/external_request.rb @@ -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 diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb new file mode 100644 index 0000000000..29af2a1b28 --- /dev/null +++ b/spec/support/webmock.rb @@ -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)