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_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
- #generate_devise ⇒ Object
- #outro ⇒ Object
- #remove_routes_comment_lines ⇒ Object
- #remove_useless_files ⇒ Object
- #run_bundle ⇒ Object
- #setup_database ⇒ Object
- #setup_git ⇒ Object
- #topkit_customization ⇒ Object
Instance Method Details
#configure_backbone ⇒ Object
73 74 75 76 77 |
# File 'lib/topkit/generators/app_generator.rb', line 73 def configure_backbone say "Generating backbone" build :generate_backbone build :generate_backtrace end |
#configure_cucumber ⇒ Object
84 85 86 87 |
# File 'lib/topkit/generators/app_generator.rb', line 84 def configure_cucumber say "Installing cucumber" build :generate_cucumber end |
#configure_generators ⇒ Object
29 30 31 32 |
# File 'lib/topkit/generators/app_generator.rb', line 29 def configure_generators say "Configuring rspec generators" build :configure_rspec_generators end |
#configure_rspec ⇒ Object
67 68 69 70 71 |
# File 'lib/topkit/generators/app_generator.rb', line 67 def configure_rspec say "Generating rspec" build :generate_rspec build :enable_database_cleaner end |
#copy_miscellaneous_files ⇒ Object
63 64 65 |
# File 'lib/topkit/generators/app_generator.rb', line 63 def copy_miscellaneous_files build :setup_stylesheets end |
#create_views_and_layouts ⇒ Object
56 57 58 59 60 61 |
# File 'lib/topkit/generators/app_generator.rb', line 56 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
34 35 36 37 38 39 |
# File 'lib/topkit/generators/app_generator.rb', line 34 def customize_gemfile say "Setting up gems" build :replace_gemfile bundle_command "install" bundle_command "package" end |
#finish_template ⇒ Object
9 10 11 12 |
# File 'lib/topkit/generators/app_generator.rb', line 9 def finish_template invoke :topkit_customization super end |
#generate_devise ⇒ Object
79 80 81 82 |
# File 'lib/topkit/generators/app_generator.rb', line 79 def generate_devise say "Generating Devise" build :generate_devise end |
#outro ⇒ Object
95 96 97 |
# File 'lib/topkit/generators/app_generator.rb', line 95 def outro say 'You are good to go!' end |
#remove_routes_comment_lines ⇒ Object
52 53 54 |
# File 'lib/topkit/generators/app_generator.rb', line 52 def remove_routes_comment_lines build :remove_routes_comment_lines end |
#remove_useless_files ⇒ Object
47 48 49 50 |
# File 'lib/topkit/generators/app_generator.rb', line 47 def remove_useless_files build :remove_public_index build :remove_rails_logo_image end |
#run_bundle ⇒ Object
99 100 |
# File 'lib/topkit/generators/app_generator.rb', line 99 def run_bundle end |
#setup_database ⇒ Object
41 42 43 44 45 |
# File 'lib/topkit/generators/app_generator.rb', line 41 def setup_database say "Setting up database" build :template_database_file build :create_database end |
#setup_git ⇒ Object
89 90 91 92 93 |
# File 'lib/topkit/generators/app_generator.rb', line 89 def setup_git say "Initializing git repo" build :add_to_git_ignore build :init_git end |
#topkit_customization ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/topkit/generators/app_generator.rb', line 14 def topkit_customization invoke :configure_generators invoke :customize_gemfile invoke :setup_database invoke :remove_useless_files invoke :remove_routes_comment_lines invoke :create_views_and_layouts invoke :copy_miscellaneous_files invoke :configure_rspec invoke :configure_backbone invoke :configure_cucumber invoke :generate_devise invoke :setup_git end |