1

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?

MegaTux
  • 1,591
  • 21
  • 26

1 Answers1

0

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.

Community
  • 1
  • 1
Paulo Fidalgo
  • 21,709
  • 7
  • 99
  • 115
  • mm, we are using Rubocop but I think that will not work because the deprecation is in the configuration of the extensions, not on every method. [See this](https://github.com/activerecord-hackery/squeel/commit/df12f2e36d56b1faa73f1ef275712f481b23be0c) – MegaTux Dec 05 '14 at 17:44