Class: Laces::Generator

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Defined in:
lib/laces/generators/app_generator.rb

Instance Method Summary collapse

Instance Method Details

#finish_templateObject



10
11
12
13
# File 'lib/laces/generators/app_generator.rb', line 10

def finish_template
  invoke :laces_customization
  super
end

#laces_customizationObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/laces/generators/app_generator.rb', line 15

def laces_customization
  say "Remove files we don't need"
  build :remove_public_index
  build :remove_public_images_rails

  say 'Setting up the development environment'
  build :raise_delivery_errors

  say 'Setting up the staging environment'
  build :setup_staging_environment

  say 'Creating laces views'
  build :create_views_shared
  build :create_application_layout

  say 'Create javascript directories'
  build :create_js_directories

  say 'Replace Gemfile'
  build :replaced_gemfile
  bundle_command 'install'

  say 'Setting up database'
  build :use_mysql_config_template if 'mysql' == options[:database]
  build :create_database

  say 'Configuring app'
  build :generate_cucumber
  build :setup_default_rake_task

  say 'Copying miscellaneous support files'
  build :copy_misc_files

  say 'Setting up a root route'
  build :setup_root_route

  say 'Initializing git and initial commit'
  build :gitignore_files
  build :init_git

  say 'Setup api directory'
  build :api_directory

  say 'Generate devise user model'
  build :generate_devise

  say 'Replace application.rb'
  build :replace_application

  say 'Replace application_controller.rb'
  build :replace_application_controller

  build :replace_application
  say 'Add config file'
  build :add_config_file

  say 'Add initializer files'
  build :intializer_files

  say 'Setup Mailing'
  build :setup_mail

  say 'Add templating'
  build :add_templating

  if options['heroku']
    say "Creating heroku apps"
    build :create_heroku_apps
    build :document_heroku
  end

  say 'Add application helper'
  build :add_application_helper

  say 'home page'
  build :add_pages_controller_and_home

  say 'Set up stylesheets'
  build :setup_stylesheets

  say 'Add images'
  build :add_images

  say 'Congratulations! You just tied our laces.'
  say "Remember to run 'rails generate airbrake' with your API key."
end