Class: Bankai::Generator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Bankai::Generator
- Defined in:
- lib/bankai/generator.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
- #configure_app ⇒ Object
- #customization ⇒ Object
- #customize_gemfile ⇒ Object
- #depends_on_system_test? ⇒ Boolean
- #finish_template ⇒ Object
- #generate_default ⇒ Object
- #setup_default_directories ⇒ Object
- #setup_development_environment ⇒ Object
- #setup_dotfiles ⇒ Object
Class Method Details
.banner ⇒ Object
87 88 89 |
# File 'lib/bankai/generator.rb', line 87 def self. "bankai #{arguments.map(&:usage).join(' ')} [options]" end |
Instance Method Details
#configure_app ⇒ Object
57 58 59 60 61 |
# File 'lib/bankai/generator.rb', line 57 def configure_app say 'Configuring app' # TODO: Configure ActionMailer build :setup_rack_mini_profiler end |
#customization ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/bankai/generator.rb', line 35 def customization invoke :customize_gemfile invoke :setup_development_environment invoke :configure_app invoke :setup_dotfiles invoke :generate_default invoke :setup_default_directories end |
#customize_gemfile ⇒ Object
44 45 46 47 |
# File 'lib/bankai/generator.rb', line 44 def customize_gemfile build :replace_gemfile, [:path] bundle_command 'install' end |
#depends_on_system_test? ⇒ Boolean
83 84 85 |
# File 'lib/bankai/generator.rb', line 83 def depends_on_system_test? !([:skip_system_test] || [:skip_rspec] || [:api]) end |
#finish_template ⇒ Object
30 31 32 33 |
# File 'lib/bankai/generator.rb', line 30 def finish_template invoke :customization super end |
#generate_default ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bankai/generator.rb', line 67 def generate_default run('spring stop') generate('bankai:testing') unless [:skip_rspec] generate('bankai:ci') generate('bankai:json') generate('bankai:db_optimizations') generate('bankai:mailer') generate('bankai:deploy') unless [:skip_capistrano] generate('annotate:install') generate('bankai:lint') end |
#setup_default_directories ⇒ Object
79 80 81 |
# File 'lib/bankai/generator.rb', line 79 def setup_default_directories build :setup_default_directories end |
#setup_development_environment ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/bankai/generator.rb', line 49 def setup_development_environment say 'Setting up the development environment' build :configure_quiet_assets build :configure_generators build :clear_seed_file # TODO: Add setup script end |
#setup_dotfiles ⇒ Object
63 64 65 |
# File 'lib/bankai/generator.rb', line 63 def setup_dotfiles build :copy_dotfiles end |