Class: Pah::Templates::Generator
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::Generator
- Defined in:
- lib/pah/templates/generators.rb
Instance Method Summary collapse
Methods inherited from Pah::Template
#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pah/templates/generators.rb', line 4 def call generators = <<GENERATORS # Do not generate specs for views and requests. Also, do not generate assets. config.generators do |g| g.helper false g.view_specs false g.assets false g.integration_tool false end config.app_generators do |g| g.test_framework :rspec end # Prevent initializing your application and connect to the database on assets precompile. config.assets.initialize_on_precompile = false GENERATORS inject_into_file 'config/application.rb', generators, after: 'Rails::Application', verbose: false git add: 'config/application.rb' git_commit 'Add generators.' end |