Sha256: bb4859695dbfe7d9d217eb16fe90abf5e164b110fc70f27fa1fddcc4f2d41b1a

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

class EngineGenerator < RubiGen::Base
  attr_reader :engine_name

  def initialize(runtime_args, runtime_options = {})
    super
    @destination_root = args.shift
    @engine_name = File.basename(File.expand_path(@destination_root)).underscore
  end
  
  def manifest
    record do |m|
      
      m.directory "app/controllers"
      m.directory "app/models"
      m.directory "app/views"
      m.directory "app/helpers"
      m.directory "config"
      m.directory "db/migrate"
      m.directory "lib"
      m.directory "public/images"
      m.directory "public/javascripts"
      m.directory "public/stylesheets"
      m.directory "rails"
      m.directory "tasks"
      
      m.template('config/routes.rb',        "config/routes.rb")
      m.template('Gmfile',                  "Gmfile")
      m.template('rails/init.rb',           "rails/init.rb")
      m.template('init.rb',                 "init.rb")
      m.template('tasks/engine_tasks.rake', "tasks/#{engine_name}_tasks.rake")
      m.template('README.rdoc',             "README.rdoc")
      m.template('MIT-LICENSE.txt',         "MIT-LICENSE.txt")
      m.template('lib/engine.rb',           "lib/#{engine_name}.rb")
      m.template('gitignore',               ".gitignore")
      
    end
  end
  
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
simonmenke-capricorn-0.2.00 app_generators/engine/engine_generator.rb
simonmenke-shuttle-0.1.07 app_generators/engine/engine_generator.rb
simonmenke-shuttle-0.1.08 app_generators/engine/engine_generator.rb
simonmenke-shuttle-0.1.09 app_generators/engine/engine_generator.rb
capricorn-0.2.00 app_generators/engine/engine_generator.rb