Skip to content

Upgrade to ruby 3.3.10#4

Open
dhruvasagar-mb wants to merge 8 commits into
masterfrom
feature/upgrade_to_ruby_3.3.10
Open

Upgrade to ruby 3.3.10#4
dhruvasagar-mb wants to merge 8 commits into
masterfrom
feature/upgrade_to_ruby_3.3.10

Conversation

@dhruvasagar-mb

@dhruvasagar-mb dhruvasagar-mb commented Feb 26, 2026

Copy link
Copy Markdown

Context

Upgrade for supporting ruby 3.3.10

What story is associated with this PR? TBD

What kind of change does this PR introduce? Upgrade for ruby 3.3.10

Summary

  1. Dockerfile — Upgraded for Ruby 3.3.10
    • Base image changed from ruby:1.9.3 → ruby:3.3.10
    • Removed Qt5/webkit packages and PhantomJS installation (both deprecated)
    • Added chromium and chromium-driver to match what CI uses
    • Set CHROME_BIN=/usr/bin/chromium env var
    • Consolidated apt-get into a single layer with cleanup
  2. Removed PhantomJS and switched to using chromium for tests
  3. Dependencies - Updated all to latest versions
  4. Added rubocop, rubocop-rspec, rubocop-capybara and configuration
    • Fixed issues using auto-correct
    • Updated rubocop-todo.yml
  5. lib/billy/proxy_connection.rb — Fixed frozen string literal bug

How can the reviewer see this work locally? N/A

Screenshots

Test Coverage

  • I added unit tests as necessary.
  • I added integration tests as necessary.

Documentation

See Repository Wiki Tab

  • I documented major functions/methods/services.
  • I updated app-level documentation and README as necessary.
  • I updated API documentation as necessary.

Deployment

Does this PR introduce a breaking change? Yes
Are there special deployment instructions? No

Security Impact

For assistance, see this wiki page.

  • No security impact
  • I have linked to a document that considers security impact or described the security impact below.

1. Dockerfile — Upgraded for Ruby 3.3.10
    - Base image changed from ruby:1.9.3 → ruby:3.3.10
    - Removed Qt5/webkit packages and PhantomJS installation (both
    deprecated)
    - Added chromium and chromium-driver to match what CI uses
    - Set CHROME_BIN=/usr/bin/chromium env var
    - Consolidated apt-get into a single layer with cleanup
2. Removed PhantomJS and switched to using chromium for tests
3. Dependencies - Updated all to latest versions
4. Added rubocop, rubocop-rspec, rubocop-capybara and configuration
    - Fixed issues using auto-correct
    - Updated rubocop-todo.yml
5. `lib/billy/proxy_connection.rb` — Fixed frozen string literal bug
Fix for using headless chrome within ci (container environment) to
avoid memory issues
Removed Aparition since it's not maintained anymore.
Darshan-H-Shet
Darshan-H-Shet previously approved these changes Jun 22, 2026
@DarshanShet-Mindbody
DarshanShet-Mindbody dismissed Darshan-H-Shet’s stale review June 22, 2026 04:37

I accidentally approved it from the wrong account.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the project to Ruby 3.3.10 and modernizes the test/browser stack by removing PhantomJS/Poltergeist-era tooling in favor of Selenium + Chromium, while also applying RuboCop-driven refactors across library and specs.

Changes:

  • Bump Ruby compatibility to >= 3.3.10 and update CI/Docker to run on modern Ruby + Chromium.
  • Replace PhantomJS-based test setup with headless Chrome (Selenium/WebDriver) and update Watir/Capybara integrations accordingly.
  • Apply broad formatting/refactor changes (frozen string literals, Ruby 3 idioms, RuboCop config/todo).

Reviewed changes

Copilot reviewed 63 out of 64 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spec/support/test_server.rb Thin/EventMachine test server tweaks and string freezing.
spec/spec_helper.rb Switch test browser setup to headless Chrome; RSpec hooks updates.
spec/lib/proxy_spec.rb Spec wording/style updates; caching/proxying assertions adjusted.
spec/lib/billy/watir/watir_spec.rb Watir feature spec metadata/style updates.
spec/lib/billy/ssl/certificate_spec.rb Spec refactors to described_class/style updates.
spec/lib/billy/ssl/certificate_chain_spec.rb Spec refactors and style updates.
spec/lib/billy/ssl/authority_spec.rb Spec refactors and style updates.
spec/lib/billy/resource_utils_spec.rb Spec refactors and style updates.
spec/lib/billy/proxy_request_stub_spec.rb Spec refactors and style updates.
spec/lib/billy/proxy_connection_spec.rb Spec refactors and style updates.
spec/lib/billy/handlers/stub_handler_spec.rb Spec refactors and style updates.
spec/lib/billy/handlers/request_log_spec.rb Fix Billy.config stubbing; style updates.
spec/lib/billy/handlers/request_handler_spec.rb Spec refactors and style updates.
spec/lib/billy/handlers/proxy_handler_spec.rb Spec refactors and style updates.
spec/lib/billy/handlers/handler_spec.rb Spec formatting/style updates.
spec/lib/billy/handlers/cache_handler_spec.rb Spec refactors and style updates.
spec/lib/billy/cache_spec.rb Cache spec refactors and regex modernization.
spec/features/examples/tumblr_api_spec.rb Feature spec metadata/style updates.
spec/features/examples/preflight_request_spec.rb Feature spec metadata/style updates.
spec/features/examples/post_api_spec.rb Feature spec metadata/style updates.
spec/features/examples/intercept_request_spec.rb Feature spec metadata/style updates; Timeout style.
spec/features/examples/facebook_api_spec.rb Feature spec metadata/style updates.
README.md Update requirements, CI badge, and modern Selenium/Chrome guidance.
Rakefile Add frozen string literal pragma.
puffing-billy.gemspec Require Ruby >= 3.3.10; update/add dependencies (selenium, rubocop, etc.).
lib/tasks/billy.rake Modernize raise/string interpolation; minor logic cleanup.
lib/puffing-billy/rspec.rb Add frozen string literal pragma.
lib/puffing-billy.rb Add frozen string literal pragma.
lib/billy/watir/rspec.rb Add frozen string literal pragma.
lib/billy/watir/cucumber.rb Add frozen string literal pragma.
lib/billy/version.rb Bump gem version to 3.0.0.
lib/billy/ssl/certificate.rb OpenSSL digest invocation updated; encoding header removed.
lib/billy/ssl/certificate_helpers.rb Encoding header removed; minor whitespace cleanup.
lib/billy/ssl/certificate_chain.rb Use map(&:to_pem); encoding header removed.
lib/billy/ssl/authority.rb OpenSSL digest invocation updated; encoding header removed.
lib/billy/rspec.rb Add frozen string literal pragma.
lib/billy/railtie.rb Add frozen string literal pragma.
lib/billy/proxy.rb Track port explicitly; modernize Timeout usage; add pragma.
lib/billy/proxy_request_stub.rb Refactor conditionals; minor control flow cleanup; add pragma.
lib/billy/proxy_connection.rb Fix frozen-string body init; refactor header stripping; add pragma.
lib/billy/json_utils.rb Refactor hash sorting to each_with_object; add pragma.
lib/billy/init/rspec.rb Add frozen string literal pragma.
lib/billy/init/cucumber.rb Add frozen string literal pragma.
lib/billy/handlers/stub_handler.rb Refactor stub handling conditional; signature cleanup; add pragma.
lib/billy/handlers/request_log.rb Regex tweak; add frozen string literal pragma.
lib/billy/handlers/request_handler.rb Modernize symbols/rescue; handler loop refactor; add pragma.
lib/billy/handlers/proxy_handler.rb Refactors, option handling tweaks, header transforms; add pragma.
lib/billy/handlers/handler.rb Add frozen string literal pragma.
lib/billy/handlers/cache_handler.rb Refactor conditionals; simplify callback replacement; add pragma.
lib/billy/cucumber.rb Add frozen string literal pragma.
lib/billy/config.rb Freeze defaults; change default proxy host to 127.0.0.1; logging tweak; add pragma.
lib/billy/capybara/rspec.rb Add frozen string literal pragma.
lib/billy/capybara/cucumber.rb Add frozen string literal pragma.
lib/billy/cache.rb Refactors around persistence/formatting; add frozen string literal pragma.
lib/billy/browsers/watir.rb Remove PhantomJS; update Selenium v4 Watir config; add pragma.
lib/billy/browsers/capybara.rb Drop legacy drivers; register Selenium Firefox/Chrome drivers; add pragma.
lib/billy.rb Update proxy memoization; adjust pass_request signature; add pragma.
Guardfile Add frozen string literal pragma; formatting changes.
Gemfile Add frozen string literal pragma.
Dockerfile Upgrade base Ruby image; install Chromium + driver; remove PhantomJS setup.
bin/proxy.rb Add frozen string literal pragma.
.rubocop.yml Add RuboCop plugins and inherit todo.
.rubocop_todo.yml Add generated RuboCop todo config.
.github/workflows/ci_steps.yml Move CI to Ruby 3.3 + Chromium; remove PhantomJS/Qt setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/billy/handlers/request_handler.rb
Comment thread spec/lib/proxy_spec.rb
Comment thread spec/spec_helper.rb
Comment thread spec/spec_helper.rb Outdated
Comment thread lib/billy/version.rb
Comment thread .github/workflows/ci_steps.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.