Class: Pah::Templates::RackDeflater
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::RackDeflater
- Defined in:
- lib/pah/templates/rack_deflater.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 |
# File 'lib/pah/templates/rack_deflater.rb', line 4 def call file = 'config/application.rb' inject = " config.middleware.use Rack::Deflater\n\n" = { before: ' # Settings in config/environments/* take precedence over those specified here.', verbose: false } inject_into_file file, inject, git add: 'config/application.rb' git_commit 'Add Rack::Deflater middleware.' end |