liufengyun / hashdiff

Hashdiff is a ruby library to to compute the smallest difference between two hashes
MIT License
560 stars 63 forks source link

add ignore_keys options, fixes #86 #87

Closed MatzFan closed 11 months ago

MatzFan commented 11 months ago

So here is a PR. I've had to update some gem deps to get tests to run with Ruby 3.2/3.3, hope this is OK:

Looks like gem 'rake', '< 11' was pinned in the Gemfile because of a change in RSpec. However, Ruby 3.2+ needs a more recent Rake - so I've bumped RSpec dep to ~> 3.5 as this comment suggests.

Also, Rubocop needs to be >= 1.52.1 to work on Ruby 3.3 (out in < 2 weeks!) - see the PR #11942 linked on the release page. As a result rubocop-rspec also needed to be bumped to > 1.16.0 due to a bug there.

I've fixed the resulting Rubocop errors by disabling the relevant cops in .rubocop.yml. There are a few deprecation warnings and lots of Rubocop suggestions, but tests are green and run on Ruby 3.3.0-preview3.