Skip to content

Commit

Permalink
Use net_http as default HTTP adapter for Jruby (#124)
Browse files Browse the repository at this point in the history
* Use net_http as default http adapter for Jruby
* Add jruby to travis
* Use faraday stubbing with VCR
  • Loading branch information
bmulvihill authored and forest committed Aug 13, 2018
1 parent 4e08e4a commit dc1785a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rvm:
- 2.3
- 2.4
- 2.5
# - "jruby"
- "jruby"
# - rbx
# - "1.8.7"
# uncomment this line if your project needs to run something other than `rake`:
Expand Down
2 changes: 1 addition & 1 deletion lib/tracker_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def initialize(options={}, &block)
@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]
Expand Down
2 changes: 1 addition & 1 deletion test/minitest_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
c.ignore_localhost = true
c.cassette_library_dir = File.expand_path('../vcr/cassettes', __FILE__).to_s
c.default_cassette_options = { serialize_with: :json }
c.hook_into :excon
c.hook_into :faraday
c.allow_http_connections_when_no_cassette = false
end

Expand Down

0 comments on commit dc1785a

Please sign in to comment.