lib/spektrix.rb in spektrix-0.0.1 vs lib/spektrix.rb in spektrix-0.0.2.1

- old
+ new

@@ -4,11 +4,11 @@ require_rel "spektrix/deep_symbolize" require_rel '.' class Hash; include DeepSymbolizable; end module Spektrix class << self - attr_accessor :configuration + attr_accessor :configuration, :debug_request end def self.configure self.configuration ||= Configuration.new yield(configuration) @@ -20,11 +20,12 @@ :client_key_path, #your private RSA key :client_cert_path, # the cert signed by Spektrix :api_key, #the key you get from the spektrix interface. :proxy, #note that proxying requests with a client cert might break some stuff. :base_url, - :api_path + :api_path, + :logger attr_reader :connection, :ssl_options def initialize @@ -57,9 +58,15 @@ :verify => false } @connection.setup url: @connection_path, ssl: @ssl_options, proxy: @proxy do |c| + + if @logger + #Connection Debugging + c.use Spektrix::DebugMiddleware, @logger + end + #Api Auth c.params[:api_key] = @api_key # Request