module Brillo

Constants

ConfigParseError
CredentialsError
VERSION

Public Class Methods

config() { |c| ... } click to toggle source
# File lib/brillo.rb, line 44
def self.config
  @config ||= begin
    static_config = YAML.load(ERB.new(File.read("#{Rails.root.to_s}/config/brillo.yml")).result).deep_symbolize_keys
    c = Config.new(static_config)
    yield c if block_given?
    c
  end
end
config=(config) click to toggle source
# File lib/brillo.rb, line 53
def self.config=(config)
  @config = config
end
configure() { |config| ... } click to toggle source
# File lib/brillo.rb, line 26
def self.configure
  yield config
end
load!(keep_local: false, logger: ::Logger.new(STDOUT), filename: nil) click to toggle source
# File lib/brillo.rb, line 37
def self.load!(keep_local: false, logger: ::Logger.new(STDOUT), filename: nil)
  Brillo::Logger.logger = logger
  configuration = config
  configuration.app_name = filename if filename
  Loader.new(configuration).load! keep_local
end
scrub!(logger: ::Logger.new(STDOUT), filename: nil) click to toggle source
# File lib/brillo.rb, line 30
def self.scrub!(logger: ::Logger.new(STDOUT), filename: nil)
  Brillo::Logger.logger = logger
  configuration = config
  configuration.app_name = filename if filename
  Scrubber.new(configuration).scrub!
end