lib/berkshelf/source.rb in berkshelf-5.5.0 vs lib/berkshelf/source.rb in berkshelf-5.6.0
- old
+ new
@@ -1,37 +1,37 @@
-require 'berkshelf/api-client'
-require 'berkshelf/ssl_policies'
-require 'openssl'
+require "berkshelf/api-client"
+require "berkshelf/ssl_policies"
+require "openssl"
module Berkshelf
class Source
include Comparable
attr_accessor :source
# @param [String, Berkshelf::SourceURI] source
def initialize(source)
@source = source
- @universe = nil
+ @universe = nil
end
def ssl_policy
@ssl_policy ||= SSLPolicy.new
end
def api_client
@api_client ||= begin
- ssl_options = {verify: Berkshelf::Config.instance.ssl.verify}
+ ssl_options = { verify: Berkshelf::Config.instance.ssl.verify }
ssl_options[:cert_store] = ssl_policy.store if ssl_policy.store
if source == :chef_server
APIClient.chef_server(
ssl: ssl_options,
timeout: api_timeout,
open_timeout: [(api_timeout / 10), 3].max,
client_name: Berkshelf::Config.instance.chef.node_name,
server_url: Berkshelf::Config.instance.chef.chef_server_url,
- client_key: Berkshelf::Config.instance.chef.client_key,
+ client_key: Berkshelf::Config.instance.chef.client_key
)
else
APIClient.new(uri,
timeout: api_timeout,
open_timeout: [(api_timeout / 10), 3].max,