Class: MoshGenerator::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- MoshGenerator::AppGenerator
- Defined in:
- lib/mosh_generator/generators/app_generator.rb
Overview
Override Rails default AppGenerator.
Class Method Summary collapse
-
.banner ⇒ Object
Banner for the cli.
Instance Method Summary collapse
-
#create_application_structure ⇒ Object
Create the minimal application structure.
-
#create_configuration_files ⇒ Object
Creates some configuration files for tools.
-
#create_staging_environment ⇒ Object
Creates a staging environment.
-
#finish_template ⇒ Object
Overrides default implementation to run customization code.
-
#mosh_generator_customization ⇒ Object
Customized generator wrapper.
-
#remove_files_we_dont_need ⇒ Object
Do some clean up.
-
#run_bundle ⇒ Object
Override the original run_bundle to do nothing.
Class Method Details
.banner ⇒ Object
Banner for the cli.
15 16 17 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 15 def "mosh_generator #{self.arguments.map(&:usage).join(' ')} [options]" end |
Instance Method Details
#create_application_structure ⇒ Object
Create the minimal application structure.
78 79 80 81 82 83 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 78 def create_application_structure build :create_helpers build :create_layout build :create_partial_views build :configure_grunt end |
#create_configuration_files ⇒ Object
Creates some configuration files for tools.
62 63 64 65 66 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 62 def create_configuration_files build :create_editorconfig_file build :create_ruby_version_file build :create_ruby_gemset_file end |
#create_staging_environment ⇒ Object
Creates a staging environment
71 72 73 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 71 def create_staging_environment build :create_staging_environment_file end |
#finish_template ⇒ Object
Overrides default implementation to run customization code.
35 36 37 38 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 35 def finish_template invoke :mosh_generator_customization super end |
#mosh_generator_customization ⇒ Object
Customized generator wrapper.
43 44 45 46 47 48 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 43 def mosh_generator_customization invoke :remove_files_we_dont_need invoke :create_configuration_files invoke :create_staging_environment invoke :create_application_structure end |
#remove_files_we_dont_need ⇒ Object
Do some clean up.
53 54 55 56 57 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 53 def remove_files_we_dont_need build :remove_public_index build :remove_assets_directories build :remove_doc_directory end |
#run_bundle ⇒ Object
Override the original run_bundle to do nothing.
88 89 90 |
# File 'lib/mosh_generator/generators/app_generator.rb', line 88 def run_bundle bundle_command 'install --without production staging' end |