Class: RoughDraft::RailsGenerator

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Defined in:
lib/rough_draft/rails_generator.rb

Instance Method Summary collapse

Instance Method Details

#finish_templateObject



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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/rough_draft/rails_generator.rb', line 40

def finish_template
  super

  build :git_repo

  bundle_command 'install'

  # Development
  build :ruby_version
  build :environment_banners
  build :raise_on_delivery_errors
  build :raise_on_unpermitted_parameters
  build :setup_script
  build :disable_generators
  build :rubocop

  # Test
  build :rspec
  build :factories

  # Production
  build :rack_deflator

  # Stylesheets
  build :stylesheets

  # Javascript
  build :disable_turbolinks

  # Views
  build :human_text
  build :helpers
  build :views

  # Gem Configuration
  build :devise
  build :simple_form
  build :chamber
  build :i18n
  build :xml_parsing
  build :dirty_url
  build :rack_timeout
  build :unicorn
  build :foreman
  build :mail_safe

  # Database
  build :database_seeding
  build :database_backup

  # Mail
  build :smtp

  # Formats and Localization
  build :locales

  # Github
  if !options[:skip_git] && options[:github]
    build :github_repo, options[:github]
  end

  # Heroku
  if options[:heroku]
    build :heroku_specific_gems
    build :heroku_apps
    build :heroku_config
    build :heroku_remotes
  end

  # Integrations
  build :bugsnag            if bugsnag_api_key.present?
  build :skylight
  build :code_climate       if options[:github]
  build :travis             if options[:github]

  # Security
  build :secret_token
  build :secure_configuration_settings

  bundle_command 'update'

  build :git_finalize

  say ''
  say 'Congratulations'
  say 'You just made a rough draft of your Rails app!!'
  say ''
end