module Kongrations::CurrentEnvironment
Constants
- FILE_NAME
Public Class Methods
kong_admin_api_key()
click to toggle source
# File lib/kongrations/current_environment.rb, line 37 def self.kong_admin_api_key @kong_admin_api_key end
kong_admin_url()
click to toggle source
# File lib/kongrations/current_environment.rb, line 33 def self.kong_admin_url @kong_admin_url end
load!(name)
click to toggle source
# File lib/kongrations/current_environment.rb, line 10 def self.load!(name) yaml = File.read(FILE_NAME) template = ERB.new(yaml) yaml = template.result(binding) config = YAML.safe_load(yaml) environment = config['environments'].detect { |e| e['name'] == name } @migrations_folder = config.fetch('path', './migrations') @name = name @kong_admin_url = environment['kong-admin-url'] @kong_admin_api_key = environment['kong-admin-api-key'] end
migrations_folder()
click to toggle source
# File lib/kongrations/current_environment.rb, line 25 def self.migrations_folder @migrations_folder end
name()
click to toggle source
# File lib/kongrations/current_environment.rb, line 29 def self.name @name end