Sha256: 4eb9c77eb562a10d5811142e85da49bf046e811b6595751c0adac096a7e0dbfb

Contents?: true

Size: 711 Bytes

Versions: 1

Compression:

Stored size: 711 Bytes

Contents

Capricorn.runtime_gem('thor', Capricorn::THOR_VERSION)

module Capricorn
  module Apps # :nodoc:
    
    class Dev < Thor
      desc "create NAME", "create a new engine"
      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
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simonmenke-capricorn-0.2.00 lib/capricorn/apps/dev.rb