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

Ruby version requirement change in 6.0.0? #543

Closed
mjankowski opened this issue May 1, 2024 · 4 comments
Closed

Ruby version requirement change in 6.0.0? #543

mjankowski opened this issue May 1, 2024 · 4 comments

Comments

@mjankowski
Copy link

Just saw the 6.0.0 release -- nice, thanks!

Curious about this ruby version req change - e54203b#diff-53ec28e04e87eace119c08cf1afa508aa03532493a9e256ed8ddcd2fd0c72423R15 - I think ruby 3.0 was recently EOL'd but ruby 3.1 is still supported for another ~year or so ... https://www.ruby-lang.org/en/downloads/branches/

Was there a rubocop requirement or other ruby style thing somewhere in the recent changes that merited bumping all the way up to 3.2 minimum, or could 3.1 have been kept? Would like to bump the browser gem dep, but still have some legacy 3.1 installs to support.

(I originally left this as a comment on a commit, but realized that may not be super visible. Sorry about the effective double posting...)

@johan-smits
Copy link

I also ran into this issue. I'm using Debian stable and they are at Ruby 3.1. Dropping the 3.1 seems a little to soon?

@westonganger
Copy link

westonganger commented Dec 3, 2024

To solve this I added the following backport monkey patch to my application

config/initializers/browser_monkey_patches.rb

if Browser::VERSION.to_f < 6.0
  Browser::Base.class_eval do
    def chromium_based?
      false
    end
  end

  Browser::Chrome.class_eval do
    def chromium_based?
      true
    end
  end

  Browser::Edge.class_eval do
    def chromium_based?
      match? && ua.match?(/\bEdg\b/)
    end
  end
end

@westonganger
Copy link

It would be preferable to cut a new gem point release which doesnt limit the Ruby version so aggressively. Would be easy to do.

@mjankowski
Copy link
Author

Closing this on assumption that there was a year mixup (3.1 is EOL in April 2025, but presumably maintainer read that as 2024?)

In ~4 months, this will be retroactively correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants