Class: Topkit::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Topkit::AppGenerator
- Defined in:
- lib/topkit/generators/app_generator.rb
Instance Method Summary collapse
- #configure_admin ⇒ Object
- #configure_backbone ⇒ Object
- #configure_cucumber ⇒ Object
- #configure_generators ⇒ Object
- #configure_rspec ⇒ Object
- #copy_miscellaneous_files ⇒ Object
- #create_views_and_layouts ⇒ Object
- #customize_gemfile ⇒ Object
- #finish_template ⇒ Object
- #outro ⇒ Object
- #remove_routes_comment_lines ⇒ Object
- #remove_useless_files ⇒ Object
- #run_bundle ⇒ Object
- #setup_database ⇒ Object
- #setup_git ⇒ Object
- #setup_staging_environment ⇒ Object
- #topkit_customization ⇒ Object
Instance Method Details
#configure_admin ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/topkit/generators/app_generator.rb', line 90 def configure_admin return if [:skip_admin] say "Generating devise with admin" build :add_admin_to_gemfile build :generate_devise build :generate_admin build :generate_rich_editor end |
#configure_backbone ⇒ Object
83 84 85 86 87 88 |
# File 'lib/topkit/generators/app_generator.rb', line 83 def configure_backbone say "Generating backbone" build :generate_backbone build :generate_backtrace build :add_relative_url_root if [:client] and [:project] end |
#configure_cucumber ⇒ Object
99 100 101 102 |
# File 'lib/topkit/generators/app_generator.rb', line 99 def configure_cucumber say "Installing cucumber" build :generate_cucumber end |
#configure_generators ⇒ Object
33 34 35 36 |
# File 'lib/topkit/generators/app_generator.rb', line 33 def configure_generators say "Configuring rspec generators" build :configure_rspec_generators end |
#configure_rspec ⇒ Object
77 78 79 80 81 |
# File 'lib/topkit/generators/app_generator.rb', line 77 def configure_rspec say "Generating rspec" build :generate_rspec build :enable_database_cleaner end |
#copy_miscellaneous_files ⇒ Object
73 74 75 |
# File 'lib/topkit/generators/app_generator.rb', line 73 def copy_miscellaneous_files build :setup_stylesheets end |
#create_views_and_layouts ⇒ Object
66 67 68 69 70 71 |
# File 'lib/topkit/generators/app_generator.rb', line 66 def create_views_and_layouts say "Creating partials and default layout" build :create_partials_directory build :create_status_partials build :create_application_layout end |
#customize_gemfile ⇒ Object
38 39 40 41 42 43 |
# File 'lib/topkit/generators/app_generator.rb', line 38 def customize_gemfile say "Setting up gems" build :replace_gemfile bundle_command "install" bundle_command "package" end |
#finish_template ⇒ Object
12 13 14 15 |
# File 'lib/topkit/generators/app_generator.rb', line 12 def finish_template invoke :topkit_customization super end |
#outro ⇒ Object
110 111 112 |
# File 'lib/topkit/generators/app_generator.rb', line 110 def outro say 'You are good to go!' end |
#remove_routes_comment_lines ⇒ Object
56 57 58 |
# File 'lib/topkit/generators/app_generator.rb', line 56 def remove_routes_comment_lines build :remove_routes_comment_lines end |
#remove_useless_files ⇒ Object
51 52 53 54 |
# File 'lib/topkit/generators/app_generator.rb', line 51 def remove_useless_files build :remove_public_index build :remove_rails_logo_image end |
#run_bundle ⇒ Object
114 115 |
# File 'lib/topkit/generators/app_generator.rb', line 114 def run_bundle end |
#setup_database ⇒ Object
45 46 47 48 49 |
# File 'lib/topkit/generators/app_generator.rb', line 45 def setup_database say "Setting up database" build :template_database_file build :create_database end |
#setup_git ⇒ Object
104 105 106 107 108 |
# File 'lib/topkit/generators/app_generator.rb', line 104 def setup_git say "Initializing git repo" build :add_to_git_ignore build :init_git end |
#setup_staging_environment ⇒ Object
60 61 62 63 64 |
# File 'lib/topkit/generators/app_generator.rb', line 60 def setup_staging_environment say "Setting up staging environment" build :setup_staging_environment #build :setup_staging_recipes end |
#topkit_customization ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/topkit/generators/app_generator.rb', line 17 def topkit_customization invoke :configure_generators invoke :customize_gemfile invoke :setup_database invoke :remove_useless_files invoke :remove_routes_comment_lines invoke :setup_staging_environment invoke :create_views_and_layouts invoke :copy_miscellaneous_files invoke :configure_rspec invoke :configure_backbone invoke :configure_admin invoke :configure_cucumber invoke :setup_git end |