Sha256: dd690f179d84cfa70c77902a1770704acb59cf562480f9b849e214c6498e0fbe

Contents?: true

Size: 1.38 KB

Versions: 29

Compression:

Stored size: 1.38 KB

Contents

class EngineGenerator < RubiGen::Base
  attr_reader :engine_name

  def initialize(runtime_args, runtime_options = {})
    super
    @destination_root = File.expand_path('.')
    @engine_name = args.shift.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('config/initializers/rails_init.rb', "config/initializers/rails_init.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

29 entries across 29 versions & 2 rubygems

Version Path
simonmenke-capricorn-0.2.03 app_generators/engine/engine_generator.rb
simonmenke-capricorn-0.2.07 app_generators/engine/engine_generator.rb
simonmenke-capricorn-0.2.25 app_generators/engine/engine_generator.rb
simonmenke-capricorn-0.2.26 app_generators/engine/engine_generator.rb
capricorn-0.2.25 app_generators/engine/engine_generator.rb
capricorn-0.2.24 app_generators/engine/engine_generator.rb
capricorn-0.2.23 app_generators/engine/engine_generator.rb
capricorn-0.2.22 app_generators/engine/engine_generator.rb
capricorn-0.2.21 app_generators/engine/engine_generator.rb
capricorn-0.2.20 app_generators/engine/engine_generator.rb
capricorn-0.2.19 app_generators/engine/engine_generator.rb
capricorn-0.2.18 app_generators/engine/engine_generator.rb
capricorn-0.2.17 app_generators/engine/engine_generator.rb
capricorn-0.2.16 app_generators/engine/engine_generator.rb
capricorn-0.2.15 app_generators/engine/engine_generator.rb
capricorn-0.2.14 app_generators/engine/engine_generator.rb
capricorn-0.2.13 app_generators/engine/engine_generator.rb
capricorn-0.2.12 app_generators/engine/engine_generator.rb
capricorn-0.2.11 app_generators/engine/engine_generator.rb
capricorn-0.2.10 app_generators/engine/engine_generator.rb