Ruby Squeel library deprecation of core extensions

318 Views Asked by At

I started maintaining a big app with tons of Squeel queries. The latest Squeel version (>1.1) is deprecating code extensions:

DEPRECATION WARNING: Core extensions are deprecated and will be removed in Squeel 2.0.

Is there an easy way to grep for the this deprecated symbol and hash core extensions?

1

There are 1 best solutions below

1
On

I think you can use RuboCop to find the usage of deprecated methods.

Installed it with:

$ gem install rubocop

and then in your project root run

$ rubocop

EDIT:

You could actually use the idea from https://stackoverflow.com/a/5515144/1006863 to print a message every time a method is used.

Other option would be to redefine every method by add the deprecation or fork the project and add it yourself and then ask for a merge request. If it's denied you can keep using your version by specifying the repository in your Gemfile.