File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ class Configuration
4141 attr_accessor :retry
4242 # @return [Boolean] Whether to log requests to STDOUT.
4343 attr_accessor :log
44+ # @return [Hash] Client configurations (eg ssh config) to pass to Faraday
45+ attr_accessor :client_options
46+
47+ def initialize
48+ @client_options = { }
49+ end
4450
4551 # Sets accept and user_agent headers, and url.
4652 #
@@ -52,7 +58,7 @@ def options
5258 :user_agent => "Zendesk API #{ Zendesk ::VERSION } "
5359 } ,
5460 :url => @url
55- }
61+ } . merge ( client_options )
5662 end
5763 end
5864end
Original file line number Diff line number Diff line change 1616 it "should set user agent header properly" do
1717 subject . options [ :headers ] [ :user_agent ] . should =~ /Zendesk API/
1818 end
19+
20+ it "should merge options with client_options" do
21+ subject . client_options = { :ssl => false }
22+ subject . options [ :ssl ] . should == false
23+ end
1924end
You can’t perform that action at this time.
0 commit comments