Class: Berkshelf::API::Config

Inherits:
Buff::Config::JSON
  • Object
show all
Defined in:
lib/berkshelf/api/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_pathString

Returns:

  • (String)


8
9
10
11
# File 'lib/berkshelf/api/config.rb', line 8

def default_path
  home_path = ENV['BERKSHELF_API_PATH'] || "#{ENV['HOME']}/.berkshelf/api-server"
  File.expand_path(File.join(home_path, "config.json"))
end

Instance Method Details

#endpoints_checksumObject



30
31
32
# File 'lib/berkshelf/api/config.rb', line 30

def endpoints_checksum
  Digest::SHA1.hexdigest(endpoints.collect {|x| x.to_hash }.to_s)
end