From b5742ee9a2e85b09766334a08c637e6673cd9481 Mon Sep 17 00:00:00 2001 From: Jesus Burgos Macia Date: Sat, 5 Mar 2022 10:08:44 +0100 Subject: [PATCH] Fix require when using Faraday 1.0 --- spec/client_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 56cfca01..289a72bb 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true -require 'faraday/net_http_persistent' +if Gem::Requirement.new('>= 2.0').satisfied_by? Gem.loaded_specs['faraday'].version + require 'faraday/net_http_persistent' +end + module DropboxApi describe Client do