module Ridley
Constants
- CHEF_VERSION
- VERSION
Public Class Methods
from_chef_config(filepath = nil, options = {})
click to toggle source
Create a new Ridley
connection from the Chef
config (knife.rb)
@param [#to_s] filepath
the path to the Chef Config
@param [hash] options
list of options to pass to the Ridley connection (@see {Ridley::Client#new})
@return [Ridley::Client]
# File lib/ridley.rb, line 41 def from_chef_config(filepath = nil, options = {}) config = Ridley::Chef::Config.new(filepath).to_hash config[:validator_client] = config.delete(:validation_client_name) config[:validator_path] = config.delete(:validation_key) config[:client_name] = config.delete(:node_name) config[:server_url] = config.delete(:chef_server_url) if config[:ssl_verify_mode] == :verify_none config[:ssl] = {verify: false} end Client.new(config.merge(options)) end
new(*args)
click to toggle source
@return [Ridley::Client]
# File lib/ridley.rb, line 28 def new(*args) Client.new(*args) end
open(*args, &block)
click to toggle source
# File lib/ridley.rb, line 55 def open(*args, &block) Client.open(*args, &block) end
root()
click to toggle source
@return [Pathname]
# File lib/ridley.rb, line 60 def root @root ||= Pathname.new(File.expand_path('../', File.dirname(__FILE__))) end