Sha256: 38c1e0e3a6746d89ac1627e734bc736634eb05531e8025ad60d9e551725467a6
Contents?: true
Size: 644 Bytes
Versions: 4
Compression:
Stored size: 644 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] 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-0.96 | test/helper.rb |
fastly-0.95 | test/helper.rb |
fastly-0.9 | test/helper.rb |
fastly-0.5 | test/helper.rb |