Avoid defining methods in rake tasks
The following discussion from !3985 should be addressed:
-
@tyleramos started a discussion: Nitpick: For all of our other rake tasks that have helper methods defined as
private
so we could add that.It's probably a concern that we define these helper methods in the rake tasks this way in general though. This article illustrates the probably pretty well. We don't have to tackle it for this MR, but I might open an MR to clean this up for all our rake tasks.
Proposal
Avoid defining methods in rake tasks which are added to the global namespace. A better alternative would be to define the methods inside a module or class.
There are at least 8 rake tasks where this is happening right now.