6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/merb-gen.rb', line 6
def self.run(path, argv, generator, command)
if command == "destroy"
puts "destroying app"
FileUtils.rm_rf(File.expand_path(path))
puts "done"
exit
end
source = RubiGen::PathSource.new(:application,
File.join(File.dirname(__FILE__), "..", "app_generators"))
RubiGen::Base.reset_sources
RubiGen::Base.append_sources source
puts RubiGen::Scripts.const_get(command.capitalize).inspect
RubiGen::Scripts.const_get(command.capitalize).new.run([File.expand_path(path), *argv], :generator => generator, :backtrace => true)
end
|