160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
# File 'lib/sprout/generator/base_mixins.rb', line 160
def use_sprout_sources!(sprout_name, project_path=nil)
reset_sources
if project_path
sources << PathSource.new(:project, "#{project_path}/generators")
sources << PathSource.new(:script, "#{project_path}/script/generators")
sources << PathSource.new(:vendor, "#{project_path}/vendor/generators")
end
system_path = "#{Sprout::Sprout.sprout_cache}/generators/#{sprout_name}"
if(File.exists?(system_path))
sources << PathSource.new(:system, system_path)
end
if(Object.const_defined?(:Gem))
sources << GemGeneratorSource.new(sprout_name)
sources << GemPathSource.new(sprout_name)
end
end
|