From f2df56e8651c96998b8734a89ab2521a1a3746b8 Mon Sep 17 00:00:00 2001 From: Eric Leohner <17093330+leohner@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:12:53 +0200 Subject: [PATCH] removing typhoeus to fix Server Error Status 0 response --- lib/lurch.rb | 3 +-- lib/lurch/client.rb | 3 ++- lurch.gemspec | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/lurch.rb b/lib/lurch.rb index 538fd56..4f716a8 100644 --- a/lib/lurch.rb +++ b/lib/lurch.rb @@ -5,8 +5,7 @@ require "inflecto" require "rack" require "faraday" -require "typhoeus" -require "typhoeus/adapters/faraday" +require 'net/http' require "lurch/configuration" require "lurch/logger" diff --git a/lib/lurch/client.rb b/lib/lurch/client.rb index 98d8740..76a44ce 100644 --- a/lib/lurch/client.rb +++ b/lib/lurch/client.rb @@ -21,6 +21,7 @@ def initialize(url, config, &block) def get(path) response = timed_request("GET", path) { client.get(path) } + catch_errors(response).body end @@ -90,7 +91,7 @@ def client conn.response :jsonapi @customize_faraday&.yield(conn) - conn.adapter :typhoeus + conn.adapter :net_http end end diff --git a/lurch.gemspec b/lurch.gemspec index 80ed067..f708bfa 100644 --- a/lurch.gemspec +++ b/lurch.gemspec @@ -18,7 +18,6 @@ Gem::Specification.new do |gem| gem.add_dependency("faraday", "< 1.0") gem.add_dependency("inflecto", "~> 0.0") gem.add_dependency("rack", ">= 1.0") - gem.add_dependency("typhoeus", "< 2.0") gem.add_development_dependency("codecov") gem.add_development_dependency("minitest")