class Generapp::Generators::AppGenerator

Rails App generator

Public Instance Methods

configure_app() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 86
def configure_app
  say 'Configuring app'
  Generapp::Actions::Configuration.instance_methods(false).each do |action|
    build action.to_sym
  end
end
create_generapp_views() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 79
def create_generapp_views
  say 'Creating views'
  Generapp::Actions::Views.instance_methods(false).each do |action|
    build action.to_sym
  end
end
finish_template() click to toggle source
Calls superclass method
# File lib/generapp/generators/app_generator.rb, line 32
def finish_template
  invoke :generapp_customization
  super
end
generapp_customization() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 37
def generapp_customization
  invoke :setup_gems
  invoke :setup_development_environment
  invoke :setup_test_environment
  invoke :setup_production_environment
  invoke :create_generapp_views
  invoke :configure_app
  invoke :setup_stylesheets
  invoke :setup_database
  invoke :setup_git
  invoke :setup_bundler_audit
  invoke :setup_rubocop
  invoke :generate_spring_binstubs
  invoke :outro
end
generate_spring_binstubs() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 122
def generate_spring_binstubs
  say 'Springifying executables'
  build :generate_spring_binstubs
end
init_git() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 127
def init_git
  build :init_git
end
outro() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 131
def outro
  say "Done generating #{app_name}"
  say "Remember to run 'bundle exec honeybadger install [YOUR API KEY HERE]'"
end
setup_bundler_audit() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 112
def setup_bundler_audit
  say 'Setting up bundler-audit'
  build :setup_bundler_audit
end
setup_database() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 98
def setup_database
  say 'Setting up database'
  if 'postgresql' == options[:database]
    build :use_postgres_config_template
  end
  build :create_database
end
setup_development_environment() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 58
def setup_development_environment
  say 'Setting up the development environment'
  Generapp::Actions::Develop.instance_methods(false).each do |action|
    build action.to_sym
  end
end
setup_gems() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 53
def setup_gems
  build :set_ruby_version
  bundle_command 'install'
end
setup_git() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 106
def setup_git
  return if options[:skip_git]
  say 'Initializing git'
  invoke :init_git
end
setup_production_environment() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 72
def setup_production_environment
  say 'Setting up the production environment'
  Generapp::Actions::Production.instance_methods(false).each do |action|
    build action.to_sym
  end
end
setup_rubocop() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 117
def setup_rubocop
  say 'Setting up rubocop'
  build :setup_rubocop
end
setup_stylesheets() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 93
def setup_stylesheets
  say 'Setting up stylesheets'
  build :setup_stylesheets
end
setup_test_environment() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 65
def setup_test_environment
  say 'Setting up the test environment'
  Generapp::Actions::Test.instance_methods(false).each do |action|
    build action.to_sym
  end
end

Protected Instance Methods

get_builder_class() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 138
def get_builder_class
  Generapp::AppBuilder
end
using_active_record?() click to toggle source
# File lib/generapp/generators/app_generator.rb, line 142
def using_active_record?
  !options[:skip_active_record]
end