Skip to content

Commit

Permalink
Autoloads by default, but makes it easy to disable.
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Oct 13, 2013
1 parent a9a4aa4 commit 7a23e7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/faraday.rb
Expand Up @@ -238,6 +238,10 @@ def self.const_missing(name)

require_libs "utils", "options", "connection", "rack_builder", "parameters",
"middleware", "adapter", "request", "response", "upload_io", "error"

if !ENV["FARADAY_NO_AUTOLOAD"]
require_lib 'autoload'
end
end

# not pulling in active-support JUST for this method. And I love this method.
Expand Down
1 change: 0 additions & 1 deletion lib/faraday/autoload.rb
Expand Up @@ -82,4 +82,3 @@ class Response
:Logger => 'logger'
end
end

0 comments on commit 7a23e7b

Please sign in to comment.