Sha256: e00a40c4390aa9655ae8907c899734431e3db8b324fc398412c9b6bd45985edd
Contents?: true
Size: 655 Bytes
Versions: 4
Compression:
Stored size: 655 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/common') def login_opts(mode=:full) opts = { } [:url,:port].each do |what| key = "FASTLY_TEST_BASE_#{what.to_s.upcase}" opts["base_#{what}".to_sym] = ENV[key] if ENV.has_key?(key) end required = :full == mode ? [:user, :name, :password, :customer] : [:api_key, :customer] required.each do |what| key ="FASTLY_TEST_#{what.to_s.upcase}" unless ENV.has_key?(key) warn "You haven't set the environment variable #{key}" exit(-1) end opts[what] = ENV[key] end opts end def get_rand "#{Process.pid}-#{Time.now.to_i}-#{Kernel.rand(1000)}" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fastly-1.00 | test/helper.rb |
fastly-0.99 | test/helper.rb |
fastly-0.98 | test/helper.rb |
fastly-0.97 | test/helper.rb |