Sha256: 0957832ca517e5aa6f0786e6f4d0acdd19e7a903f973dedbc3edd2999c4c7713

Contents?: true

Size: 563 Bytes

Versions: 2

Compression:

Stored size: 563 Bytes

Contents

module Pah
  module Templates
    class CanonicalHost < Pah::Template
      def call
        rack_canonical = <<CANONICAL

#Run heroku config:add CANONICAL_HOST=yourdomain.com
#For more information, see: https://github.com/tylerhunt/rack-canonical-host#usage
use Rack::CanonicalHost, ENV['CANONICAL_HOST'] if ENV['CANONICAL_HOST']
CANONICAL

        inject_into_file 'config.ru', rack_canonical, after: "require_relative 'config/environment'", verbose: false

        git add: 'config.ru'
        git_commit 'Add rack-canonical-host.'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pah-0.0.28 lib/pah/templates/canonical_host.rb
pah-0.0.27 lib/pah/templates/canonical_host.rb