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



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
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
128
129
# File 'lib/rough_draft/rails_generator.rb', line 23

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 :deploy_script
  build :disable_generators
  build :rubocop
  build :jshint
  build :coffeelint
  build :css_lint
  build :scss_lint
  build :git_hooks

  # Test
  build :rspec
  build :factories

  # Staging
  build :add_staging_environment

  # Production
  build :rack_deflator
  build :daily_log_rotation if !logentries_config && !heroku_enabled?
  build :asset_host         if asset_host_config

  # 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] && github_enabled?
    build :github_repo, github_config['repo']
  end

  # Heroku
  if heroku_enabled?
    build :heroku_specific_gems
    build :heroku_apps
    build :heroku_app_config
    build :heroku_remotes
  end

  # Caching
  build :memcached          if memcached_config

  # Integrations
  build :redis              if redis_config
  build :sidekiq            if sidekiq_config && redis_config
  build :segment            if segment_config
  build :bugsnag            if bugsnag_config
  build :logentries         if logentries_config
  build :skylight           if skylight_config
  build :code_climate       if code_climate_config
  build :travis             if github_enabled?

  # Security
  build :secret_token
  build :secure_configuration_settings

  bundle_command 'update'

  build :git_finalize
  build :setup

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