From 3e9054bb2019a5c07fe62ecda01cf09d8a60dd44 Mon Sep 17 00:00:00 2001 From: Kevin Miller Date: Fri, 27 Sep 2019 10:55:47 -0700 Subject: [PATCH 1/3] Update to inherit from correct Faraday error The update to Faraday is causing `require "octokit"` to break. Updating to `Faraday::ClientError` fixes it and is correct based on Faraday code: https://github.com/lostisland/faraday/blob/master/lib/faraday/error.rb --- lib/octokit/middleware/follow_redirects.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/octokit/middleware/follow_redirects.rb b/lib/octokit/middleware/follow_redirects.rb index 00db73b6e..3b3556ee7 100644 --- a/lib/octokit/middleware/follow_redirects.rb +++ b/lib/octokit/middleware/follow_redirects.rb @@ -11,7 +11,7 @@ module Octokit module Middleware # Public: Exception thrown when the maximum amount of requests is exceeded. - class RedirectLimitReached < Faraday::Error::ClientError + class RedirectLimitReached < Faraday::ClientError attr_reader :response def initialize(response) From 11c65a6b8902022138f7ab60d57d51420448b919 Mon Sep 17 00:00:00 2001 From: Kevin Miller Date: Fri, 27 Sep 2019 11:37:58 -0700 Subject: [PATCH 2/3] Add faraday requirement --- octokit.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/octokit.gemspec b/octokit.gemspec index 762f7d937..983738a39 100644 --- a/octokit.gemspec +++ b/octokit.gemspec @@ -6,6 +6,7 @@ require 'octokit/version' Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '>= 1', '< 3' spec.add_dependency 'sawyer', '>= 0.5.3', '~> 0.8.0' + spec.add_dependency 'faraday', '>= 0.9', '< 2.0' spec.authors = ["Wynn Netherland", "Erik Michaels-Ober", "Clint Shryock"] spec.description = %q{Simple wrapper for the GitHub API} spec.email = ['wynn.netherland@gmail.com', 'sferik@gmail.com', 'clint@ctshryock.com'] From d4d77dc1d46bb4c2e0e4923057d2da7410293f8d Mon Sep 17 00:00:00 2001 From: Kevin Miller Date: Fri, 27 Sep 2019 18:54:25 -0700 Subject: [PATCH 3/3] Relax dependency --- octokit.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octokit.gemspec b/octokit.gemspec index 983738a39..765185b12 100644 --- a/octokit.gemspec +++ b/octokit.gemspec @@ -6,7 +6,7 @@ require 'octokit/version' Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '>= 1', '< 3' spec.add_dependency 'sawyer', '>= 0.5.3', '~> 0.8.0' - spec.add_dependency 'faraday', '>= 0.9', '< 2.0' + spec.add_dependency 'faraday', '>= 0.9' spec.authors = ["Wynn Netherland", "Erik Michaels-Ober", "Clint Shryock"] spec.description = %q{Simple wrapper for the GitHub API} spec.email = ['wynn.netherland@gmail.com', 'sferik@gmail.com', 'clint@ctshryock.com']