Skip to content

Commit 58f1f83

Browse files
authored
Adapt to Faraday 1.0. Fixes piotrmurach#352 (piotrmurach#365)
1 parent 9788663 commit 58f1f83

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

github_api.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
1919

2020
gem.add_dependency 'addressable', '~> 2.4'
2121
gem.add_dependency 'hashie', '~> 3.5', '>= 3.5.2'
22-
gem.add_dependency 'faraday', '~> 0.8'
22+
gem.add_dependency 'faraday', '>= 0.8', '< 2'
2323
gem.add_dependency 'oauth2', '~> 1.0'
2424
gem.add_dependency 'descendants_tracker', '~> 0.0.4'
2525

lib/github_api/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def stack(options = {})
6565

6666
# Creates http connection
6767
#
68-
# Returns a Fraday::Connection object
68+
# Returns a Faraday::Connection object
6969
def connection(api, options = {})
7070
connection_options = default_options(options)
7171
connection_options.merge!(builder: stack(options.merge!(api: api)))

lib/github_api/ext/faraday.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def to_query(encoder = nil)
1717
end
1818
end
1919

20+
module_function
21+
2022
def build_nested_query(value, prefix = nil, encoder = nil)
2123
case value
2224
when Array

lib/github_api/response/follow_redirects.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
module Github
1010
# Public: Exception thrown when the maximum amount of requests is exceeded.
11-
class RedirectLimitReached < Faraday::Error::ClientError
11+
class RedirectLimitReached < Faraday::ClientError
1212
attr_reader :response
1313

1414
def initialize(response)

0 commit comments

Comments
 (0)