Skip to content
Browse files

ruby 1.8.7 will require the same file multiple times

  • Loading branch information...
1 parent 9befdfa commit 1f6808e61d6b0c71eda3e446212c75b856243bc7 @technoweenie committed Oct 20, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/faraday/adapter.rb
  2. +1 −1 lib/faraday/request.rb
  3. +1 −1 lib/faraday/response.rb
View
2 lib/faraday/adapter.rb
@@ -6,7 +6,7 @@ class Adapter < Middleware
extend MiddlewareRegistry
- register_middleware 'faraday/adapter',
+ register_middleware File.expand_path('../adapter', __FILE__),
:test => [:Test, 'test'],
:net_http => [:NetHttp, 'net_http'],
:net_http_persistent => [:NetHttpPersistent, 'net_http_persistent'],
View
2 lib/faraday/request.rb
@@ -12,7 +12,7 @@ module Faraday
class Request < Struct.new(:method, :path, :params, :headers, :body, :options)
extend MiddlewareRegistry
- register_middleware 'faraday/request',
+ register_middleware File.expand_path('../request', __FILE__),
:url_encoded => [:UrlEncoded, 'url_encoded'],
:multipart => [:Multipart, 'multipart'],
:retry => [:Retry, 'retry'],
View
2 lib/faraday/response.rb
@@ -22,7 +22,7 @@ def on_complete(env)
extend Forwardable
extend MiddlewareRegistry
- register_middleware 'faraday/response',
+ register_middleware File.expand_path('../response', __FILE__),
:raise_error => [:RaiseError, 'raise_error'],
:logger => [:Logger, 'logger']

0 comments on commit 1f6808e

Please sign in to comment.
Something went wrong with that request. Please try again.