Sha256: 1d67f4636416902016739fc9e7b09c232163bb512678808ee481a1af5c663e99

Contents?: true

Size: 587 Bytes

Versions: 7

Compression:

Stored size: 587 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 ::File.expand_path('../config/environment', __FILE__)", verbose: false

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pah-0.0.26 lib/pah/templates/canonical_host.rb
pah-0.0.25 lib/pah/templates/canonical_host.rb
pah-0.0.24 lib/pah/templates/canonical_host.rb
pah-0.0.23 lib/pah/templates/canonical_host.rb
pah-0.0.22 lib/pah/templates/canonical_host.rb
pah-0.0.21 lib/pah/templates/canonical_host.rb
pah-0.0.20 lib/pah/templates/canonical_host.rb