Skip to content

Commit

Permalink
Make sure that Faraday::Request::Json and Faraday::Response::Json are…
Browse files Browse the repository at this point in the history
… correctly autoloaded
  • Loading branch information
iMacTia committed Sep 20, 2024
1 parent 8208693 commit 572ec54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tmp
.rvmrc
.ruby-version
.yardoc
.DS_Store

## BUNDLER
*.gem
Expand All @@ -17,6 +18,7 @@ vendor/bundle

## PROJECT::SPECIFIC
.rbx
node_modules

## IDEs
.idea/
Expand Down
14 changes: 8 additions & 6 deletions lib/faraday/autoload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,23 @@ class Adapter
class Request
extend AutoloadHelper
autoload_all 'faraday/request',
UrlEncoded: 'url_encoded',
Multipart: 'multipart',
Retry: 'retry',
Authorization: 'authorization',
BasicAuthentication: 'basic_authentication',
Instrumentation: 'instrumentation',
Json: 'json',
Multipart: 'multipart',
Retry: 'retry',
TokenAuthentication: 'token_authentication',
Instrumentation: 'instrumentation'
UrlEncoded: 'url_encoded'
end

# Response represents the returned value of a sent Faraday request.
# @see lib/faraday/response.rb Original class location
class Response
extend AutoloadHelper
autoload_all 'faraday/response',
RaiseError: 'raise_error',
Logger: 'logger'
Json: 'json',
Logger: 'logger',
RaiseError: 'raise_error'
end
end

0 comments on commit 572ec54

Please sign in to comment.