Class: Conjur::CLI

Inherits:
Object
  • Object
show all
Extended by:
GLI::App
Defined in:
lib/conjur/cli.rb

Class Method Summary collapse

Class Method Details

.load_config ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/conjur/cli.rb', line 10

def load_config
  [ File.join("/etc", "conjur.conf"), ( ENV['CONJURRC'] || File.join(ENV['HOME'], ".conjurrc") ) ].each do |f|
    if File.exists?(f)
      if Conjur.log
        Conjur.log << "Loading #{f}\n"
      end
      Conjur::Config.merge YAML.load(IO.read(f))
    end
  end
end