Class: ReleaseStage

Inherits:
Object
  • Object
show all
Defined in:
lib/release_stage.rb,
lib/release_stage/version.rb

Constant Summary collapse

VALID_RELEASE_STAGES =
%w[development review staging production].freeze
VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.currentObject



10
11
12
13
14
15
16
# File 'lib/release_stage.rb', line 10

def current
  stage = ENV.fetch("RELEASE_STAGE", "development")

  raise "Invalid release stage #{stage}" unless VALID_RELEASE_STAGES.include?(stage)

  ActiveSupport::StringInquirer.new(stage)
end