Sha256: 2be3efd09594e92071fd2e3ee0e8a926560223ec4cacd7603b0c32731b269709

Contents?: true

Size: 590 Bytes

Versions: 15

Compression:

Stored size: 590 Bytes

Contents

module GovukPublishingComponents
  module AppHelpers
    class Environment
      GOVUK_ENVIRONMENTS = {
        "production" => "production",
        "staging" => "staging",
        "integration-blue-aws" => "integration",
      }.freeze

      # The "acceptance environment" we're in - not the same as Rails env.
      #
      # Can be "production", "staging", "integration", or "development"
      def self.current_acceptance_environment
        return "example" if ENV["HEROKU"]
        GOVUK_ENVIRONMENTS.fetch(ENV["ERRBIT_ENVIRONMENT_NAME"], "development")
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
govuk_publishing_components-12.11.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.10.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.9.1 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.9.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.8.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.7.1 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.7.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.6.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.5.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.4.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.3.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.2.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.1.0 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.0.1 lib/govuk_publishing_components/app_helpers/environment.rb
govuk_publishing_components-12.0.0 lib/govuk_publishing_components/app_helpers/environment.rb