This project is archived and is in readonly mode.
script generate does not find generators in symlinked plugins
-
phedders
- Title changed from script generator does not find generators in symlinked plugins to script generate does not find generators in symlinked plugins
-
phedders
Just in case Tom forgets... he's fixed this bug though a hack in the hobo plugin, but it really should be fixed upstream. His fix is in:
git://github.com/tablatom/hobo
commit 5d04b0b4e4413f9c2d3b352f34463022ae8be1d0
That will not apply cleanly to rails since it is in the hobo plugin, but will show the logic of the fix.
Oh heck - here it is:
+# 'orrible 'ack so that generators are found in symlinked plugins
+if caller.grep %r(script/generate:\d+$)
- require "rails_generator"
- Rails.configuration.plugin_paths.each do |path|
- relative_path = Pathname.new(File.expand_path(path)).relative_path_from(Pathname.new(::RAILS_ROOT))
- sources = Rails::Generator::Base.sources
- sources << Rails::Generator::PathSource.new(:"plugins (#{relative_path})", "#{path}/*/**/{,rails_}generators")
- end
+end
--
Cheers
Paul
-
Daniel Guettler
This was originally fixed in commit aa7859c9 see "here": http://github.com/rails/rails/co.... Attached is a patch which brings this change back in the rails_generator/lookup.rb file
-
Daniel Guettler
here the patch again, can't see it from the first commit...
-
Repository
- State changed from new to resolved
- Tag set to 2.1, 2.1.0, generate, patch, plugins
(from [f90eb81c65d5841b591caf0f5e39ef774d02d06e]) Ensure script/generate finds generators from symlinked plugins. [#449 state:resolved]
Signed-off-by: Pratik Naik
-
Repository
(from [84ceff6921a0619de049301a1b8600b51a7e56f8]) Ensure script/generate finds generators from symlinked plugins. [#449 script generate does not find generators in symlinked plugins state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
