Permalink
Browse files

I prefer the Requestable module to a generic Configuration mixin

  • Loading branch information...
1 parent 9ed70f2 commit 255e61af40ffebdc0436757dc84a97669c404ef3 @mwunsch committed Sep 16, 2012
Showing with 0 additions and 30 deletions.
  1. +0 −3 lib/weary.rb
  2. +0 −22 lib/weary/configuration.rb
  3. +0 −5 lib/weary/request.rb
View
@@ -1,10 +1,7 @@
require 'weary/version'
require 'weary/client'
-require 'weary/configuration'
module Weary
- extend Configuration
-
USER_AGENTS = {
"Firefox 1.5.0.12 - Mac" => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12",
"Firefox 1.5.0.12 - Windows" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12",
View
@@ -1,22 +0,0 @@
-module Weary
- module Configuration
- # Which adapter you want. Defaults to Weary::Adapter::NetHttp
- attr_accessor :adapter
-
- # Yield self to be able to configure Weary with block-style configuration.
- #
- # Example:
- #
- # Weary.configure do |configuration|
- # configuration.adapter = Weary::Adapter::Excon
- # end
- def configure
- yield self
- end
-
- # Set intelligent default
- def adapter
- @adapter || Weary::Adapter::NetHttp
- end
- end
-end
View
@@ -91,11 +91,6 @@ def body(io=nil)
@attachment ||= stringio_encode("")
end
- def adapter(connection=nil)
- @connection = connection unless connection.nil?
- @connection ||= Weary.adapter
- end
-
def basic_auth(*credentials)
if !credentials.empty?
@basic_auth = true

0 comments on commit 255e61a

Please sign in to comment.