lib/tracker_api/client.rb in tracker_api-1.9.0 vs lib/tracker_api/client.rb in tracker_api-1.9.1
- old
+ new
@@ -23,10 +23,10 @@
def initialize(options={}, &block)
url = options.fetch(:url, 'https://www.pivotaltracker.com')
@url = Addressable::URI.parse(url).to_s
@api_version = options.fetch(:api_version, '/services/v5')
@logger = options.fetch(:logger, ::Logger.new(nil))
- adapter = options.fetch(:adapter, :excon)
+ adapter = options.fetch(:adapter) { defined?(JRUBY_VERSION) ? :net_http : :excon }
connection_options = options.fetch(:connection_options, { ssl: { verify: true } })
@auto_paginate = options.fetch(:auto_paginate, true)
@token = options[:token]
raise 'Missing required options: :token' unless @token