Sha256: 1ff0a4af5958dae23201678aa86160a3763eec8be55d258501f2614f95a0627d
Contents?: true
Size: 401 Bytes
Versions: 13
Compression:
Stored size: 401 Bytes
Contents
module Gibbon module Helpers def get_data_center_from_api_key(api_key) # Return an empty string for invalid API keys so Gibbon hits the main endpoint data_center = "" if api_key && api_key["-"] # Add a period since the data_center is a subdomain and it keeps things dry data_center = "#{api_key.split('-').last}." end data_center end end end
Version data entries
13 entries across 13 versions & 1 rubygems