Class: Berkshelf::API::Config
- Inherits:
-
Buff::Config::JSON
- Object
- Buff::Config::JSON
- Berkshelf::API::Config
- Defined in:
- lib/berkshelf/api/config.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_path ⇒ 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.(File.join(home_path, "config.json")) end |
Instance Method Details
#endpoints_checksum ⇒ Object
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 |