alphagov/plek — pull request #8 by bradleywright (2013-01-16 12:08:40+00:00)
Title: Return a sensible default GOVUK_APP_DOMAIN value

*This is a sketch for discussion*

The way Plek works, and is used, means that it tries to find
`ENV['GOVUK_APP_DOMAIN']` immediately, which will causes any Rails apps
that include Plek in an initialiser to die when instantiating themselves.

This makes simple tasks like `rake db:migrate` or `rails generate`
somewhat more painful to run.

This fixes the problem by only failing if the perceived RAILS/RACK_ENV is
production, otherwise it returns a sensible default.