Class: Capricorn::Apps::Dev

Inherits:
Thor
  • Object
show all
Defined in:
lib/capricorn/apps/dev.rb

Instance Method Summary collapse

Methods inherited from Thor

namespace, namespace=

Instance Method Details

#create(name) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/capricorn/apps/dev.rb', line 8

def create(name)
  Capricorn.runtime_gem('rubigen', Capricorn::RUBIGEN_VERSION)
  
  system("rails #{name}")
  
  FileUtils.rm_r("#{name}/doc", :verbose => true)
  FileUtils.rm_r("#{name}/README", :verbose => true)
  FileUtils.rm_r("#{name}/public/javascripts", :verbose => true)
  
  require 'rubigen/scripts/generate'
  RubiGen::Base.use_application_sources!
  RubiGen::Scripts::Generate.new.run(["-f", name], :generator => 'engine')
end