rack-client 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +1 -1
 - data/lib/rack/client/adapter/simple.rb +2 -2
 - data/lib/rack/client/core/headers.rb +1 -1
 - data/lib/rack/client/handler/excon.rb +5 -1
 - data/lib/rack/client/handler/net_http.rb +1 -1
 - data/lib/rack/client/handler/typhoeus.rb +1 -1
 - data/lib/rack/client/version.rb +1 -1
 - metadata +4 -4
 
    
        data/README.textile
    CHANGED
    
    
| 
         @@ -34,7 +34,7 @@ module Rack 
     | 
|
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
                    def_delegators :response, :[], :[]=, :close, :delete_cookie, :each,
         
     | 
| 
       36 
36 
     | 
    
         
             
                                              :empty?, :finish, :headers, :redirect,
         
     | 
| 
       37 
     | 
    
         
            -
                                              :set_cookie, :status, :to_a, :write
         
     | 
| 
      
 37 
     | 
    
         
            +
                                              :set_cookie, :status, :to_a, :to_ary, :write
         
     | 
| 
       38 
38 
     | 
    
         
             
                    def_delegator  :response, :body, :chunked_body
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
                    def initialize(*tuple)
         
     | 
| 
         @@ -86,7 +86,7 @@ module Rack 
     | 
|
| 
       86 
86 
     | 
    
         
             
                  def request_tuple(url, headers = {}, body_or_params = nil, query_params = {}, &block)
         
     | 
| 
       87 
87 
     | 
    
         
             
                    query_hash = Hash === query_params ? query_params : Utils.build_query(query_params)
         
     | 
| 
       88 
88 
     | 
    
         | 
| 
       89 
     | 
    
         
            -
                    uri = URI.parse(url)
         
     | 
| 
      
 89 
     | 
    
         
            +
                    uri = url.is_a?(URI) ? url : URI.parse(url)
         
     | 
| 
       90 
90 
     | 
    
         | 
| 
       91 
91 
     | 
    
         
             
                    unless query_params.empty?
         
     | 
| 
       92 
92 
     | 
    
         
             
                      uri.query = Utils.build_nested_query(Utils.parse_nested_query(uri.query).merge(query_params))
         
     | 
| 
         @@ -30,7 +30,11 @@ module Rack 
     | 
|
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
                    def parse(excon_response)
         
     | 
| 
       32 
32 
     | 
    
         
             
                      body = excon_response.body.empty? ? [] : StringIO.new(excon_response.body)
         
     | 
| 
       33 
     | 
    
         
            -
                       
     | 
| 
      
 33 
     | 
    
         
            +
                      headers = {}
         
     | 
| 
      
 34 
     | 
    
         
            +
                      excon_response.headers.map do |key,value|
         
     | 
| 
      
 35 
     | 
    
         
            +
                        headers[key] = value.split(", ")
         
     | 
| 
      
 36 
     | 
    
         
            +
                      end
         
     | 
| 
      
 37 
     | 
    
         
            +
                      Response.new(excon_response.status, Headers.new(headers).to_http, body)
         
     | 
| 
       34 
38 
     | 
    
         
             
                    end
         
     | 
| 
       35 
39 
     | 
    
         | 
| 
       36 
40 
     | 
    
         
             
                    def connection_for(request)
         
     | 
    
        data/lib/rack/client/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rack-client
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 13
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 4
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.4.1
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Tim Carey-Smith
         
     | 
| 
         @@ -15,7 +15,7 @@ autorequire: 
     | 
|
| 
       15 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date:  
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2013-02-25 00:00:00 -08:00
         
     | 
| 
       19 
19 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |