lib/travis/cli/api_command.rb in travis-1.1.3 vs lib/travis/cli/api_command.rb in travis-1.2.0
- old
+ new
@@ -20,9 +20,16 @@
duration = Time.now - start
c.debug(" took %.2g seconds" % duration)
end
end
+ on('--adapter ADAPTER', 'Faraday adapter to use for HTTP requests') do |c, adapter|
+ adapter.gsub! '-', '_'
+ require "faraday/adapter/#{adapter}"
+ require 'typhoeus/adapters/faraday' if adapter == 'typhoeus'
+ c.session.faraday_adapter = adapter.to_sym
+ end
+
def initialize(*)
@session = Travis::Client.new
super
end