Sha256: 08d5d8d7ab06676f61416eff63893788a505b084c34bf3e700a0d17306a22241

Contents?: true

Size: 582 Bytes

Versions: 8

Compression:

Stored size: 582 Bytes

Contents

module EnvironmentVariableHelpers
  ENVIRONMENT_VARIABLE_DISPLAY_FIELDS = %i[id name value environment_name application_name]

  def known_environment_variables
    begin
      recall_fact(:environment_variables)
    rescue
      memorize_fact(:environment_variables, [])
    end
  end

  def match_environment_variable_regexp(environment_variable)
    regexp_parts = ENVIRONMENT_VARIABLE_DISPLAY_FIELDS.map do |field|
      Regexp.escape(environment_variable.send(field).to_s)
    end
    Regexp.new(regexp_parts.join("(\s+)\\|(\s+)"))
  end
end

World(EnvironmentVariableHelpers)

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ey-core-3.6.0.autoscaling1 features/support/environment_variable_helpers.rb
ey-core-3.6.4 features/support/environment_variable_helpers.rb
ey-core-3.6.3 features/support/environment_variable_helpers.rb
ey-core-3.6.1 features/support/environment_variable_helpers.rb
groove-ey-core-3.6.3 features/support/environment_variable_helpers.rb
groove-ey-core-3.6.2 features/support/environment_variable_helpers.rb
groove-ey-core-3.6.1 features/support/environment_variable_helpers.rb
ey-core-3.5.0 features/support/environment_variable_helpers.rb