Class: Bearonrails::AppGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Bearonrails::AppGenerator
- Defined in:
- lib/bearonrails/generators/app_generator.rb
Instance Method Summary collapse
- #add_common_rake_tasks ⇒ Object
- #add_new_relic_config ⇒ Object
- #add_rubocop_config ⇒ Object
- #bearonrails_customization ⇒ Object
- #customize_gemfile ⇒ Object
- #finish_template ⇒ Object
- #init_git ⇒ Object
- #install_rspec ⇒ Object
- #remove_files_we_dont_need ⇒ Object
- #remove_routes_comment_lines ⇒ Object
Instance Method Details
#add_common_rake_tasks ⇒ Object
30 31 32 33 |
# File 'lib/bearonrails/generators/app_generator.rb', line 30 def add_common_rake_tasks say 'Add common rake tasks' build :add_common_rake_tasks end |
#add_new_relic_config ⇒ Object
50 51 52 53 54 |
# File 'lib/bearonrails/generators/app_generator.rb', line 50 def add_new_relic_config say 'Add New Relic config' build :add_dot_env build :add_new_relic_config end |
#add_rubocop_config ⇒ Object
45 46 47 48 |
# File 'lib/bearonrails/generators/app_generator.rb', line 45 def add_rubocop_config say 'Add rubocop config' build :add_rubocop_config end |
#bearonrails_customization ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bearonrails/generators/app_generator.rb', line 13 def bearonrails_customization invoke :remove_files_we_dont_need invoke :add_common_rake_tasks invoke :customize_gemfile invoke :install_rspec invoke :add_rubocop_config invoke :add_new_relic_config invoke :remove_routes_comment_lines invoke :init_git end |
#customize_gemfile ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/bearonrails/generators/app_generator.rb', line 35 def customize_gemfile build :add_custom_gems bundle_command 'install' # skip origin `bundle install` step = .dup = .merge!(skip_bundle: true) end |
#finish_template ⇒ Object
8 9 10 11 |
# File 'lib/bearonrails/generators/app_generator.rb', line 8 def finish_template bearonrails_customization super end |
#init_git ⇒ Object
67 68 69 70 |
# File 'lib/bearonrails/generators/app_generator.rb', line 67 def init_git say 'Init git' build :init_git end |
#install_rspec ⇒ Object
56 57 58 59 60 |
# File 'lib/bearonrails/generators/app_generator.rb', line 56 def install_rspec say 'Install rspec' build :install_rspec build :add_rspec_helper_addon end |
#remove_files_we_dont_need ⇒ Object
24 25 26 27 28 |
# File 'lib/bearonrails/generators/app_generator.rb', line 24 def remove_files_we_dont_need say 'remove files we don\'t need' build :remove_public_index build :remove_rails_logo_image end |
#remove_routes_comment_lines ⇒ Object
62 63 64 65 |
# File 'lib/bearonrails/generators/app_generator.rb', line 62 def remove_routes_comment_lines say 'Remove routes comment lines' build :remove_routes_comment_lines end |