Module: Generapp::Actions::Develop
- Included in:
- Generapp::AppBuilder
- Defined in:
- lib/generapp/actions/develop.rb
Overview
App develop environment associated actions
Instance Method Summary collapse
- #add_bullet_gem_configuration ⇒ Object
- #add_secrets ⇒ Object
- #bullet_configuration ⇒ Object protected
- #configure_dalli ⇒ Object
- #configure_generators ⇒ Object
- #generapp_generators ⇒ Object protected
- #generate_annotate ⇒ Object
- #raise_on_delivery_errors ⇒ Object
Instance Method Details
#add_bullet_gem_configuration ⇒ Object
13 14 15 16 17 |
# File 'lib/generapp/actions/develop.rb', line 13 def add_bullet_gem_configuration inject_into_file 'config/environments/development.rb', bullet_configuration, after: "config.action_mailer.raise_delivery_errors = true\n" end |
#add_secrets ⇒ Object
42 43 44 45 |
# File 'lib/generapp/actions/develop.rb', line 42 def add_secrets copy_file 'config/application.yml', 'config/application.yml.example' copy_file 'config/application.yml', 'config/application.yml' end |
#bullet_configuration ⇒ Object (protected)
67 68 69 70 71 72 73 74 75 |
# File 'lib/generapp/actions/develop.rb', line 67 def bullet_configuration <<-RUBY config.after_initialize do Bullet.enable = true Bullet.bullet_logger = true Bullet.rails_logger = true end RUBY end |
#configure_dalli ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/generapp/actions/develop.rb', line 19 def configure_dalli config = <<-RUBY config.cache_store = :dalli_store, '127.0.0.1' RUBY inject_into_file 'config/environments/development.rb', config, after: "config.action_mailer.raise_delivery_errors = true\n" end |
#configure_generators ⇒ Object
31 32 33 34 35 |
# File 'lib/generapp/actions/develop.rb', line 31 def configure_generators inject_into_class 'config/application.rb', 'Application', generapp_generators end |
#generapp_generators ⇒ Object (protected)
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/generapp/actions/develop.rb', line 49 def generapp_generators <<-RUBY config.generators do |g| g.assets false g.test_framework :rspec, fixtures: true, view_specs: false, helper_specs: false, routing_specs: false, controller_specs: true, request_specs: false g.fixture_replacement :factory_girl, dir: 'spec/factories' end RUBY end |
#generate_annotate ⇒ Object
37 38 39 40 |
# File 'lib/generapp/actions/develop.rb', line 37 def generate_annotate copy_file 'tasks/auto_annotate_models.rake', 'lib/tasks/auto_annotate_models.rake' end |
#raise_on_delivery_errors ⇒ Object
7 8 9 10 11 |
# File 'lib/generapp/actions/develop.rb', line 7 def raise_on_delivery_errors gsub_file 'config/environments/development.rb', 'raise_delivery_errors = false', 'raise_delivery_errors = true' end |