Sha256: 26382fb23f320381036dd88d24cadf011b40b04988836ef670bea53290269cbc
Contents?: true
Size: 643 Bytes
Versions: 1
Compression:
Stored size: 643 Bytes
Contents
module Berkshelf::APIClient require_relative 'errors' class ChefServerConnection attr_reader :client def initialize(*args) @client = Ridley.new(*args) @url = args[0][:server_url] end def universe response = client.universe [].tap do |cookbooks| response.each do |name, versions| versions.each { |version, attributes| attributes[:location_path] = @url cookbooks << RemoteCookbook.new(name, version, attributes) } end end rescue Ridley::Errors::HTTPNotFound raise ServiceNotFound, "service not found at: #{url}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
berkshelf-api-client-2.0.2 | lib/berkshelf/api_client/chef_server_connection.rb |