lib/berkshelf/api/config.rb in berkshelf-api-0.2.0 vs lib/berkshelf/api/config.rb in berkshelf-api-1.0.0

- old
+ new

@@ -1,6 +1,7 @@ require 'buff/config/json' +require 'digest/sha1' module Berkshelf::API class Config < Buff::Config::JSON class << self # @return [String] @@ -22,7 +23,11 @@ options: { url: 'http://cookbooks.opscode.com/api/v1' } } ] + + def endpoints_checksum + Digest::SHA1.hexdigest(endpoints.collect {|x| x.to_hash }.to_s) + end end end