Class: GovukPublishingComponents::AppHelpers::Environment
- Inherits:
-
Object
- Object
- GovukPublishingComponents::AppHelpers::Environment
- Defined in:
- lib/govuk_publishing_components/app_helpers/environment.rb
Constant Summary collapse
- GOVUK_ENVIRONMENTS =
%w[integration staging production].freeze
Class Method Summary collapse
-
.current_acceptance_environment ⇒ Object
The “acceptance environment” we’re in - not the same as Rails env.
Class Method Details
.current_acceptance_environment ⇒ Object
The “acceptance environment” we’re in - not the same as Rails env. Can be “production”, “staging”, “integration”, “development” or “example” (if running on Heroku)
8 9 10 11 12 |
# File 'lib/govuk_publishing_components/app_helpers/environment.rb', line 8 def self.current_acceptance_environment return "example" if ENV["HEROKU"] GOVUK_ENVIRONMENTS.include?(ENV["GOVUK_ENVIRONMENT"]) ? ENV["GOVUK_ENVIRONMENT"] : "development" end |