public
Description: The web app builder for Rails
Homepage: http://hobocentral.net
Clone URL: git://github.com/tablatom/hobo.git
Symlinked generators now even work when they call each other 
(hobo_model_resource => hobo_model)

Also a little less hacky then previous solution
bluescreen303 (author)
Fri Jul 25 03:43:29 -0700 2008
tablatom (committer)
Fri Jul 25 08:49:32 -0700 2008
commit  fa0d127bfcac7a2ce82ef1c6bc38f2e50eb07c7e
tree    f3d67cbf570facb365f12925658ef7f4c4164125
parent  2c391e3cfefa95b464866fe1467d68ded8be2dca
...
1
 
2
3
4
5
6
7
8
9
 
 
 
 
10
11
12
...
1
2
3
 
 
 
 
 
 
 
4
5
6
7
8
9
10
0
@@ -1,11 +1,9 @@
0
 require File.dirname(__FILE__) + "/lib/hobo"
0
+require 'rails_generator'
0
 
0
-# 'orrible 'ack so that generators are found in symlinked plugins
0
-if caller.grep %r(script/generate:\d+$)
0
- require "rails_generator"
0
- Rails.configuration.plugin_paths.each do |path|
0
- relative_path = Pathname.new(File.expand_path(path)).relative_path_from(Pathname.new(::RAILS_ROOT))
0
- sources = Rails::Generator::Base.sources
0
- sources << Rails::Generator::PathSource.new(:"plugins (#{relative_path})", "#{path}/*/**/{,rails_}generators")
0
+# 'orrible but 'reative 'ack to allow generators to be in symlinked plugins
0
+Rails::Generator::PathSource.class_eval do
0
+ def path
0
+ @path.gsub('**', '*/**')
0
   end
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.