faraday 0.12.0.1 → 0.12.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.
- checksums.yaml +4 -4
 - data/LICENSE.md +1 -1
 - data/README.md +15 -1
 - data/lib/faraday.rb +1 -1
 - data/lib/faraday/error.rb +1 -1
 - data/lib/faraday/request/retry.rb +3 -2
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: cbb31a41849c965d7f7afab1cdf77d26fb4abef3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 035b9e1a381df32a062208689d48d5f05ad91553
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e9a7ea04f7acf4b878d687ec1c3981563d82b76687e4f2e5e9b804f3bc1feb99c160c91b1807552fd1012406ece4b3fdb59cb421ecb890975a6d07971e71eab9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 15d8bfbf9bde53177db2b8c92e6b166cf19939138d9a6c4a662ffe1cd6f4e502c30fafa9c4e54e54aa88c37e49e013582fc96279f39e4e6630f30473623792a8
         
     | 
    
        data/LICENSE.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -140,6 +140,20 @@ The value of Faraday `params_encoder` can be any object that responds to: 
     | 
|
| 
       140 
140 
     | 
    
         
             
            The encoder will affect both how query strings are processed and how POST bodies
         
     | 
| 
       141 
141 
     | 
    
         
             
            get serialized. The default encoder is Faraday::NestedParamsEncoder.
         
     | 
| 
       142 
142 
     | 
    
         | 
| 
      
 143 
     | 
    
         
            +
            ## Authentication
         
     | 
| 
      
 144 
     | 
    
         
            +
              
         
     | 
| 
      
 145 
     | 
    
         
            +
            Basic and Token authentication are handled by Faraday::Request::BasicAuthentication and Faraday::Request::TokenAuthentication respectively. These can be added as middleware manually or through the helper methods.
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 148 
     | 
    
         
            +
            Faraday.new(...) do |conn|
         
     | 
| 
      
 149 
     | 
    
         
            +
              conn.basic_auth('username', 'password')
         
     | 
| 
      
 150 
     | 
    
         
            +
            end
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
            Faraday.new(...) do |conn|
         
     | 
| 
      
 153 
     | 
    
         
            +
              conn.token_auth('authentication-token') 
         
     | 
| 
      
 154 
     | 
    
         
            +
            end
         
     | 
| 
      
 155 
     | 
    
         
            +
            ```
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       143 
157 
     | 
    
         
             
            ## Advanced middleware usage
         
     | 
| 
       144 
158 
     | 
    
         | 
| 
       145 
159 
     | 
    
         
             
            The order in which middleware is stacked is important. Like with Rack, the
         
     | 
| 
         @@ -325,7 +339,7 @@ of a major release, support for that Ruby version may be dropped. 
     | 
|
| 
       325 
339 
     | 
    
         | 
| 
       326 
340 
     | 
    
         
             
            ## Copyright
         
     | 
| 
       327 
341 
     | 
    
         | 
| 
       328 
     | 
    
         
            -
            Copyright (c) 2009- 
     | 
| 
      
 342 
     | 
    
         
            +
            Copyright (c) 2009-2017 [Rick Olson](mailto:technoweenie@gmail.com), Zack Hobson.
         
     | 
| 
       329 
343 
     | 
    
         
             
            See [LICENSE][] for details.
         
     | 
| 
       330 
344 
     | 
    
         | 
| 
       331 
345 
     | 
    
         
             
            [net_http]:     http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/Net/HTTP.html
         
     | 
    
        data/lib/faraday.rb
    CHANGED
    
    
    
        data/lib/faraday/error.rb
    CHANGED
    
    
| 
         @@ -151,8 +151,9 @@ module Faraday 
     | 
|
| 
       151 
151 
     | 
    
         
             
                  @options.methods.include?(env[:method]) || @options.retry_if.call(env, exception)
         
     | 
| 
       152 
152 
     | 
    
         
             
                end
         
     | 
| 
       153 
153 
     | 
    
         | 
| 
       154 
     | 
    
         
            -
                def rewind_files( 
     | 
| 
       155 
     | 
    
         
            -
                   
     | 
| 
      
 154 
     | 
    
         
            +
                def rewind_files(body)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  return unless body.is_a?(Hash)
         
     | 
| 
      
 156 
     | 
    
         
            +
                  body.each do |_, value|
         
     | 
| 
       156 
157 
     | 
    
         
             
                    if value.is_a? UploadIO
         
     | 
| 
       157 
158 
     | 
    
         
             
                      value.rewind
         
     | 
| 
       158 
159 
     | 
    
         
             
                    end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: faraday
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.12. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.12.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Rick Olson
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-04-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: multipart-post
         
     |