Method: Fog.credentials_path

Defined in:
lib/fog/core/credentials.rb

.credentials_pathString

Returns The path for configuration_file.

Returns:

  • (String)

    The path for configuration_file



20
21
22
23
24
25
26
27
# File 'lib/fog/core/credentials.rb', line 20

def self.credentials_path
  @credential_path ||= begin
    path = ENV["FOG_RC"] || (ENV['HOME'] && File.directory?(ENV['HOME']) && '~/.fog')
    File.expand_path(path) if path
  rescue
    nil
  end
end