class Gleis::Config

Global parameters of gleis gem and app config env variables

Constants

API_URL

Override default API URL if GLEIS_API_URL env variable is set

API_VERSION
SSH_KEY_FILE_BASE
TOKEN_FILE

Public Class Methods

get_env_var(app_name, token, var_name) click to toggle source
# File lib/gleis/config.rb, line 16
def self.get_env_var(app_name, token, var_name)
  body = API.request('get', "config/#{app_name}/#{var_name}", token)
  return body['data'] if body['success'] == 1
end
get_env_vars(app_name, token) click to toggle source
# File lib/gleis/config.rb, line 10
def self.get_env_vars(app_name, token)
  body = API.request('get', "config/#{app_name}", token)
  abort("Failed to get app environment variables: #{body['message']}") if body['success'] != 1
  body
end