stas / jsonapi.rb

Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
MIT License
261 stars 57 forks source link

Fix Rubocop offenses #92

Closed mamhoff closed 11 months ago

mamhoff commented 1 year ago

What is the current behavior?

Currently, builds are failing because of Rubocop complaining about three lines.

What is the new behavior?

The build still fails because of Ransack 4 being incompatible with the library, but that's for a different PR.

Checklist

Please make sure the following requirements are complete:

stas commented 1 year ago

Ty ty @mamhoff

Happy to merge this one and leave the tests fixing for another task. Lmk wdyt?

mamhoff commented 1 year ago

Sure, I tried fixing the specs with Ransack 4, but that's a whole different beast.

mamhoff commented 1 year ago

So... filter_map is only supported from Ruby 2.7. I've added a commit to run the specs with Ruby 2.7 instead of 2.6. This means this PR will effectively drop Ruby 2.6 support.

The other option would be to ignore the cop. Your call :)

stas commented 11 months ago

Thank you @mamhoff