cantino / ruby-readability

Port of arc90's readability project to Ruby
Apache License 2.0
925 stars 171 forks source link

Update bin/readability to work with Ruby 3.x #100

Closed apainintheneck closed 4 days ago

apainintheneck commented 1 month ago

These changes should be backwards compatible with older Ruby versions according to the docs and testing it on Ruby 2.7 and 3.2.

Changes:

  1. Use require_relative to avoid loading errors.
  2. Use URI.parse(...).read instead of open(...).read

Do you think it's worth adding an integration test for this on CI?

Something like this would probably work to sanity check this. Probably would need to add more Rubies to CI though to make it a better check. Maybe not worth the effort.

bin/readability https://github.com/cantino/ruby-readability
cantino commented 4 days ago

Thanks @apainintheneck!