class WCC::Data::Config
Public Class Methods
new()
click to toggle source
# File lib/wcc/data/config.rb, line 6 def initialize set_default_applications end
Public Instance Methods
applications()
click to toggle source
# File lib/wcc/data/config.rb, line 10 def applications @applications ||= Hash.new { |hash, key| hash[key] = Application.new(key) } end
Also aliased as: apps
Private Instance Methods
set_default_applications()
click to toggle source
# File lib/wcc/data/config.rb, line 17 def set_default_applications raise ArgumentError, "Missing NUCLEUS_URL environment variable" unless ENV['NUCLEUS_URL'] applications[:nucleus].uri = ENV['NUCLEUS_URL'] if ENV['APP_CLIENT_ID'] && ENV['APP_CLIENT_SECRET'] applications[:nucleus].connection .basic_auth(ENV['APP_CLIENT_ID'], ENV['APP_CLIENT_SECRET']) end end