Class: Corrupt::Generators::App

Inherits:
Object
  • Object
show all
Defined in:
lib/corrupt/generators/app.rb

Overview

Generator to create a new Corrupt application.

Constant Summary collapse

DIRS =
[
  'app',
  'app/controllers',
  'app/models',
  'app/views',
  'app/views/exceptions',
  'app/views/layouts',
  'app/views/main',
  'config',
  'db',
  'log',
  'public',
  'public/images',
  'public/javascripts',
  'public/stylesheets',
  'spec',
  'spec/app',
  'spec/app/controllers',
  'spec/app/models',
  'tasks',
  'tmp',
]
FILES =
[
  'config.ru',
  'Rakefile',
  'README',
  'app/controllers/app_controller.rb',
  'app/controllers/exceptions.rb',
  'app/controllers/main.rb',
  'app/models/page.rb',
  'app/views/exceptions/404.haml',
  'app/views/layouts/application.haml',
  'app/views/main/index.haml',
  'config/app_config.yml.example',
  'config/routes.rb',
  'public/images/ruby-powered.png',
  'public/javascripts/application.js',
  'public/stylesheets/application.css',
  'public/favicon.ico',
  'public/index.haml',
  'spec/app/controllers/app_controller_spec.rb',
  'spec/app/controllers/main_spec.rb',
  'spec/app/models/page_spec.rb',
  'spec/app/app_spec_helper.rb',
  'spec/rcov.opts',
  'spec/spec.opts',
  'spec/spec_helper.rb',
  'tasks/app.rake',
  'tasks/gem.rake',
  'tasks/notes.rake',
  'tasks/spec.rake',
  'tasks/util.rake',
]

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ App

Returns a new instance of App.



62
63
64
65
# File 'lib/corrupt/generators/app.rb', line 62

def initialize(path)
  @path = File.expand_path(path)
  setup_app!
end