Method: Berkshelf::Source#api_client
- Defined in:
- lib/berkshelf/source.rb
#api_client ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/berkshelf/source.rb', line 60 def api_client @api_client ||= case type when :chef_server APIClient.chef_server(server_url: uri.to_s, **) when :artifactory # Don't accidentally mutate the options. = .dup api_key = .delete(:api_key) APIClient.new(uri, headers: { "X-Jfrog-Art-Api" => api_key }, **) when :chef_repo ChefRepoUniverse.new(uri_string, **) else APIClient.new(uri, **) end end |