Sha256: e0951d7ccb9b9b2625b80e9fbc6747863cbb0fb3bd8cd375a6a56546604b8196
Contents?: true
Size: 746 Bytes
Versions: 10
Compression:
Stored size: 746 Bytes
Contents
require_relative "../ridley_compat" module Berkshelf module APIClient require_relative "errors" class ChefServerConnection def initialize(**args) @client = Berkshelf::RidleyCompat.new(**args) @url = args[:server_url] end def universe response = @client.get("universe") [].tap do |cookbooks| response.each do |name, versions| versions.each do |version, attributes| attributes[:location_path] = @url cookbooks << RemoteCookbook.new(name, version, attributes) end end end rescue Ridley::Errors::HTTPNotFound raise ServiceNotFound, "service not found at: #{@url}" end end end end
Version data entries
10 entries across 10 versions & 1 rubygems