Class: Pah::Templates::RackDeflater

Inherits:
Pah::Template
  • Object
show all
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

#callObject



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"
  options = { before: '    # Settings in config/environments/* take precedence over those specified here.', verbose: false }

  inject_into_file file, inject, options

  git add: 'config/application.rb'
  git_commit 'Add Rack::Deflater middleware.'
end