Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails Upgrade plugin loses found results after a comment

#5831

In our app we used the rails_upgrade plugin to find what we needed to fix. We found that the rails:upgrade:check rake task was missing many of our named_scopes. It turns out that the grep command is being scrubbed by gsub and that if the first line in the results was a comment, then all subsequent lines were lost. For example,

Grep results:

/path/to/app/models/article.rb: # named_scope :active /path/to/app/models/article.rb: named_scope :inactive /path/to/app/models/post.rb: named_scope :by_author

You would expect the upgrade to skip the first line and report the second and third line, but at present it returns no results. The attached patch fixes this.

Reported by Peer Allan · October 17th, 2010 @ 08:01 PM

State: new
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Ryan Bigg
    Ryan Bigg
    • Tag cleared.
    • Importance changed from to Low

    Automatic cleanup of spam.

    October 21st, 2010 @ 03:38 AM

  2. Jeff Kreeftmeijer
  3. Vijay Dev
    Vijay Dev

    This is not a Rails issue. You can submit pull requests in rails_upgrade on GitHub.

    Can be closed.

    February 20th, 2011 @ 04:51 PM

  4. bingbing