Sha256: 487fee061da6b9a8d6846bcd81a81271c3981367aaf010c15b5e1cb99eee2866

Contents?: true

Size: 662 Bytes

Versions: 35

Compression:

Stored size: 662 Bytes

Contents

require 'faraday_middleware'
require 'test_track/server_error_middleware'

TestTrack::TestTrackApi = Her::API.new.setup url: ENV['TEST_TRACK_API_URL'] do |c|
  # request
  c.request :json

  # response
  c.use TestTrack::ServerErrorMiddleware
  c.use Her::Middleware::DefaultParseJSON

  c.adapter Faraday.default_adapter

  # Set aggressive HTTP timeouts because TestTrack needs to be fast
  c.options[:open_timeout] = (ENV['TEST_TRACK_OPEN_TIMEOUT'] || 2).to_i # Number of seconds to wait for the connection to open.
  c.options[:timeout] = (ENV['TEST_TRACK_TIMEOUT'] || 4).to_i # Number of seconds to wait for one block to be read (via one read(2) call).
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
test_track_rails_client-7.1.2 config/initializers/test_track_api.rb
test_track_rails_client-7.1.1 config/initializers/test_track_api.rb
test_track_rails_client-7.0.0 config/initializers/test_track_api.rb
test_track_rails_client-6.0.0 config/initializers/test_track_api.rb
test_track_rails_client-5.0.1 config/initializers/test_track_api.rb
test_track_rails_client-5.0.0 config/initializers/test_track_api.rb
test_track_rails_client-4.0.2 config/initializers/test_track_api.rb
test_track_rails_client-4.0.1 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.rc3 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.rc2 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha35 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha34 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha33 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha32 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha31 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha30 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha29 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha28 config/initializers/test_track_api.rb
test_track_rails_client-4.0.0.alpha27 config/initializers/test_track_api.rb