module Testcloud

Constants

FALLBACK_ENV

Public Class Methods

env() click to toggle source
# File lib/testcloud/support/global_methods.rb, line 16
def env
  @_env ||= begin
    default_env = ENV['TESTCLOUD_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV'] || FALLBACK_ENV
    ActiveSupport::StringInquirer.new(default_env)
  end
end
env=(environment) click to toggle source
# File lib/testcloud/support/global_methods.rb, line 23
def env=(environment)
  @_env = ActiveSupport::StringInquirer.new(environment)
end
uuid() click to toggle source
# File lib/testcloud/support/global_methods.rb, line 33
def uuid
  Thread.current[:uuid] ||= SecureRandom.uuid
end
uuid=(uuid_value) click to toggle source

We want to be able to uniquely identify separate threads but we should probably make this UUIDv5 for more assurance of uniqueness

# File lib/testcloud/support/global_methods.rb, line 29
def uuid=(uuid_value)
  Thread.current[:uuid] = uuid_value
end