Class: FeatureBox::Generators::StandaloneGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
GeneratorBase
Defined in:
lib/generators/feature_box/standalone_generator.rb

Instance Method Summary collapse

Methods included from GeneratorBase

#copy_migrations, included, #trim, #trim_f

Instance Method Details

#feature_box_installObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/feature_box/standalone_generator.rb', line 7

def feature_box_install
  
  #migrate
  copy_migrations [/00_.*/,/01_.*/,/02_.*/,/03_.*/,/04_.*/,/05_.*/]
  rake  "db:migrate"
  
  #route
  route "mount FeatureBox::Engine => '/'"
  template "initializers/initializer.rb", "config/initializers/feature_box.rb"
  
  #devise configuration
  generate "devise:install"
  append_file('config/initializers/devise.rb', open(File.expand_path("./../templates/initializers/new_devise_initializer.rb", __FILE__)).read)
  
  #seed with admin credentials
  rake  "feature_box:seed"

end