Ryan Kinderman
2008-May-27 03:35 UTC
Loading plugin rake tasks before #{RAILS_ROOT}/lib/tasks
I would like to be able to have the ability to access/modify rake tasks provided by a plugin from within my application, in tasks defined in #{RAILS_ROOT}/lib/tasks. Right now, the plugin .rake files are loaded after those found in #{RAILS_ROOT}/lib/tasks, so the latter can''t access the former without an explicit rake_require, which seems kind of odd. If you''ve ever needed to overwrite a rake task provided by a plugin, and didn''t want to modify the original plugin source, please check this patch out and +1 if it looks okay. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg (Radar)
2008-May-27 04:24 UTC
Re: Loading plugin rake tasks before #{RAILS_ROOT}/lib/tasks
Isn''t it best if you actually link to the patch? On Tue, May 27, 2008 at 1:05 PM, Ryan Kinderman <ryan@kinderman.net> wrote:> > I would like to be able to have the ability to access/modify rake > tasks provided by a plugin from within my application, in tasks > defined in #{RAILS_ROOT}/lib/tasks. Right now, the plugin .rake files > are loaded after those found in #{RAILS_ROOT}/lib/tasks, so the latter > can''t access the former without an explicit rake_require, which seems > kind of odd. > > If you''ve ever needed to overwrite a rake task provided by a plugin, > and didn''t want to modify the original plugin source, please check > this patch out and +1 if it looks okay. > > Thanks > > >-- Appreciated my help? Recommend me on Working With Rails http://workingwithrails.com/person/11030-ryan-bigg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
James Adam
2008-May-27 21:15 UTC
Re: Loading plugin rake tasks before #{RAILS_ROOT}/lib/tasks
I would''ve guessed it was more common that plugins might overwrite one of the default rake tasks, no? On Tue, May 27, 2008 at 4:35 AM, Ryan Kinderman <ryan@kinderman.net> wrote:> > I would like to be able to have the ability to access/modify rake > tasks provided by a plugin from within my application, in tasks > defined in #{RAILS_ROOT}/lib/tasks. Right now, the plugin .rake files > are loaded after those found in #{RAILS_ROOT}/lib/tasks, so the latter > can''t access the former without an explicit rake_require, which seems > kind of odd. > > If you''ve ever needed to overwrite a rake task provided by a plugin, > and didn''t want to modify the original plugin source, please check > this patch out and +1 if it looks okay. > > Thanks > > >-- * J * ~ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Kinderman
2008-May-28 02:20 UTC
Re: Loading plugin rake tasks before #{RAILS_ROOT}/lib/tasks
Right, a link to the patch! Hah. Here it is: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/259-load-plugin-rake-tasks-before-root-lib-tasks On May 26, 10:35 pm, Ryan Kinderman <r...@kinderman.net> wrote:> I would like to be able to have the ability to access/modify rake > tasks provided by a plugin from within my application, in tasks > defined in #{RAILS_ROOT}/lib/tasks. Right now, the plugin .rake files > are loaded after those found in #{RAILS_ROOT}/lib/tasks, so the latter > can''t access the former without an explicit rake_require, which seems > kind of odd. > > If you''ve ever needed to overwrite a rake task provided by a plugin, > and didn''t want to modify the original plugin source, please check > this patch out and +1 if it looks okay. > > Thanks--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Kinderman
2008-May-28 02:22 UTC
Re: Loading plugin rake tasks before #{RAILS_ROOT}/lib/tasks
Plugins would still be able to overwrite the Rails-provided rake tasks. The patch just makes it so that the rake tasks you define in .rake files in your application are able to overwrite those defined by either Rails *or* plugins. On May 27, 4:15 pm, "James Adam" <james.a...@gmail.com> wrote:> I would''ve guessed it was more common that plugins might overwrite one > of the default rake tasks, no? > > > > On Tue, May 27, 2008 at 4:35 AM, Ryan Kinderman <r...@kinderman.net> wrote: > > > I would like to be able to have the ability to access/modify rake > > tasks provided by a plugin from within my application, in tasks > > defined in #{RAILS_ROOT}/lib/tasks. Right now, the plugin .rake files > > are loaded after those found in #{RAILS_ROOT}/lib/tasks, so the latter > > can''t access the former without an explicit rake_require, which seems > > kind of odd. > > > If you''ve ever needed to overwrite a rake task provided by a plugin, > > and didn''t want to modify the original plugin source, please check > > this patch out and +1 if it looks okay. > > > Thanks > > -- > * J * > ~--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---