From 1957624be88c1318d2e6cd78de79cbae71f7935e Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Tue, 7 Jan 2025 12:48:10 +0300 Subject: [PATCH] fix: build --- .github/workflows/tests.yml | 7 ++++++- cuprite.gemspec | 4 ++-- lib/capybara/cuprite/driver.rb | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d314165..7e55d6f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.7, "3.0", 3.1, 3.2, 3.3] + ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] runs-on: ubuntu-latest env: FERRUM_PROCESS_TIMEOUT: 25 @@ -31,6 +31,11 @@ jobs: with: chrome-version: stable + - name: Fix GA Chrome Permissions + run: | + sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox + sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox + - name: Run tests run: | mkdir -p /tmp/cuprite diff --git a/cuprite.gemspec b/cuprite.gemspec index 197a38f..929267a 100644 --- a/cuprite.gemspec +++ b/cuprite.gemspec @@ -24,6 +24,6 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.7.0" - s.add_runtime_dependency "capybara", "~> 3.0" - s.add_runtime_dependency "ferrum", "~> 0.16.0" + s.add_dependency "capybara", "~> 3.0" + s.add_dependency "ferrum", "~> 0.16.0" end diff --git a/lib/capybara/cuprite/driver.rb b/lib/capybara/cuprite/driver.rb index 1338734..dc961b8 100644 --- a/lib/capybara/cuprite/driver.rb +++ b/lib/capybara/cuprite/driver.rb @@ -251,7 +251,8 @@ def set_cookie(name, value, options = {}) def remove_cookie(name, **options) options[:domain] = default_domain if options.empty? - browser.cookies.remove(**options.merge(name: name)) + options = options.merge(name: name) + browser.cookies.remove(**options) end def clear_cookies