I want to know, if the app instance is started by rake, so I tried out catching rake task name in initializers. For example, if I run rake db:migrate I want get db:migrate or something like this. I tried this;
[7] pry(main)> $0 => "spring app | bilet18 | started 3 secs ago | development mode" [8] pry(main)> ARGV => [] [9] pry(main)> Rake.application.top_level_tasks => [] but everything is empty.
What can I do that? please help.
UPDATE
if add in Rakefile line like
ENV["RAKE_CURRENT_TASKS"] = Rake.application.top_level_tasks.join(' ') then in future you'll be able to catch it in. but this solution is not good for me, I need to catch rake task name earlier