excon 0.9.4 → 0.9.5
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.
Potentially problematic release.
This version of excon might be problematic. Click here for more details.
- data/Gemfile +2 -0
 - data/{README.rdoc → README.md} +55 -47
 - data/changelog.txt +7 -0
 - data/excon.gemspec +5 -5
 - data/lib/excon/connection.rb +8 -1
 - data/lib/excon/constants.rb +1 -1
 - data/lib/excon/socket.rb +2 -2
 - data/tests/rackups/thread_safety.ru +3 -2
 - data/tests/stub_tests.rb +13 -2
 - data/tests/test_helper.rb +21 -7
 - metadata +89 -111
 
    
        data/Gemfile
    CHANGED
    
    
    
        data/{README.rdoc → README.md}
    RENAMED
    
    | 
         @@ -1,23 +1,26 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            excon
         
     | 
| 
      
 2 
     | 
    
         
            +
            =====
         
     | 
| 
       2 
3 
     | 
    
         | 
| 
       3 
4 
     | 
    
         
             
            Http(s) EXtended CONnections
         
     | 
| 
       4 
5 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 6 
     | 
    
         
            +
            [](http://travis-ci.org/geemus/excon)
         
     | 
| 
      
 7 
     | 
    
         
            +
            [](https://gemnasium.com/geemus/excon)
         
     | 
| 
       6 
8 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 9 
     | 
    
         
            +
            Getting Started
         
     | 
| 
      
 10 
     | 
    
         
            +
            ---------------
         
     | 
| 
       8 
11 
     | 
    
         | 
| 
       9 
12 
     | 
    
         
             
            Install the gem.
         
     | 
| 
       10 
13 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
      
 14 
     | 
    
         
            +
                $ sudo gem install excon
         
     | 
| 
       12 
15 
     | 
    
         | 
| 
       13 
16 
     | 
    
         
             
            Require with rubygems.
         
     | 
| 
       14 
17 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
      
 18 
     | 
    
         
            +
                require 'rubygems'
         
     | 
| 
      
 19 
     | 
    
         
            +
                require 'excon'
         
     | 
| 
       17 
20 
     | 
    
         | 
| 
       18 
21 
     | 
    
         
             
            The simplest way to use excon is with one-off requests:
         
     | 
| 
       19 
22 
     | 
    
         | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
      
 23 
     | 
    
         
            +
                response = Excon.get('http://geemus.com')
         
     | 
| 
       21 
24 
     | 
    
         | 
| 
       22 
25 
     | 
    
         
             
            Supported one-off request methods are #connect, #delete, #get, #head, #options, #post, #put, and #trace.
         
     | 
| 
       23 
26 
     | 
    
         | 
| 
         @@ -25,97 +28,102 @@ The returned response object has #body, #headers and #status attributes. 
     | 
|
| 
       25 
28 
     | 
    
         | 
| 
       26 
29 
     | 
    
         
             
            Alternately you can create a connection object which is reusable across multiple requests (more performant!).
         
     | 
| 
       27 
30 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
      
 31 
     | 
    
         
            +
                connection = Excon.new('http://geemus.com')
         
     | 
| 
      
 32 
     | 
    
         
            +
                response_one = connection.get
         
     | 
| 
      
 33 
     | 
    
         
            +
                response_two = connection.post(:path => '/foo')
         
     | 
| 
      
 34 
     | 
    
         
            +
                response_three = connection.delete(:path => '/bar')
         
     | 
| 
       32 
35 
     | 
    
         | 
| 
       33 
36 
     | 
    
         
             
            Sometimes it is more convenient to specify the request type as an argument:
         
     | 
| 
       34 
37 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 38 
     | 
    
         
            +
                response_four = connection.request(:method => :get, :path => '/more')
         
     | 
| 
       36 
39 
     | 
    
         | 
| 
       37 
40 
     | 
    
         
             
            Both one-off and persistent connections support many other options. Here are a few common examples:
         
     | 
| 
       38 
41 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
      
 42 
     | 
    
         
            +
                # Custom headers
         
     | 
| 
      
 43 
     | 
    
         
            +
                Excon.get('http://geemus.com', :headers => {'Authorization' => 'Basic 0123456789ABCDEF'})
         
     | 
| 
      
 44 
     | 
    
         
            +
                connection.get(:headers => {'Authorization' => 'Basic 0123456789ABCDEF'})
         
     | 
| 
       42 
45 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
      
 46 
     | 
    
         
            +
                # Changing query strings
         
     | 
| 
      
 47 
     | 
    
         
            +
                connection = Excon.new('http://geemus.com/')
         
     | 
| 
      
 48 
     | 
    
         
            +
                connection.get(:query => {:foo => 'bar'})
         
     | 
| 
       46 
49 
     | 
    
         | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
      
 50 
     | 
    
         
            +
                # POST body
         
     | 
| 
      
 51 
     | 
    
         
            +
                Excon.post('http://geemus.com', :body => 'language=ruby&class=fog')
         
     | 
| 
       49 
52 
     | 
    
         | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
      
 53 
     | 
    
         
            +
                # request accepts either symbols or strings
         
     | 
| 
      
 54 
     | 
    
         
            +
                connection.request(:method => :get)
         
     | 
| 
      
 55 
     | 
    
         
            +
                connection.request(:method => 'GET')
         
     | 
| 
       53 
56 
     | 
    
         | 
| 
       54 
57 
     | 
    
         
             
            These options can be combined to make pretty much any request you might need.
         
     | 
| 
       55 
58 
     | 
    
         | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
      
 59 
     | 
    
         
            +
            Streaming Responses
         
     | 
| 
      
 60 
     | 
    
         
            +
            -------------------
         
     | 
| 
       57 
61 
     | 
    
         | 
| 
       58 
62 
     | 
    
         
             
            You can stream responses by passing a block that will receive each chunk.
         
     | 
| 
       59 
63 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
      
 64 
     | 
    
         
            +
                Excon.get('http://geemus.com') do |chunk, remaining_bytes, total_bytes|
         
     | 
| 
      
 65 
     | 
    
         
            +
                  puts chunk
         
     | 
| 
      
 66 
     | 
    
         
            +
                  puts "Remaining: #{remaining_bytes.to_f / total_bytes}%"
         
     | 
| 
      
 67 
     | 
    
         
            +
                end
         
     | 
| 
       64 
68 
     | 
    
         | 
| 
       65 
69 
     | 
    
         
             
            Iterating over each chunk will allow you to do work on the response incrementally without buffering the entire response first. For very large responses this can lead to significant memory savings.
         
     | 
| 
       66 
70 
     | 
    
         | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
      
 71 
     | 
    
         
            +
            Proxy Support
         
     | 
| 
      
 72 
     | 
    
         
            +
            -------------
         
     | 
| 
       68 
73 
     | 
    
         | 
| 
       69 
74 
     | 
    
         
             
            You can specify a proxy URL that Excon will use with both HTTP and HTTPS connections:
         
     | 
| 
       70 
75 
     | 
    
         | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
      
 76 
     | 
    
         
            +
                connection = Excon.new('http://geemus.com', :proxy => 'http://my.proxy:3128')
         
     | 
| 
      
 77 
     | 
    
         
            +
                connection.request(:method => 'GET')
         
     | 
| 
       73 
78 
     | 
    
         | 
| 
       74 
79 
     | 
    
         
             
            The proxy URL must be fully specified, including scheme (e.g. "http://") and port. 
         
     | 
| 
       75 
80 
     | 
    
         | 
| 
       76 
81 
     | 
    
         
             
            Proxy support must be set when establishing a connection object and cannot be overridden in individual requests. Because of this it is unavailable in one-off requests (Excon.get, etc.)
         
     | 
| 
       77 
82 
     | 
    
         | 
| 
       78 
     | 
    
         
            -
            NOTE: Excon will use the environment variables  
     | 
| 
      
 83 
     | 
    
         
            +
            NOTE: Excon will use the environment variables `http_proxy` and `https_proxy` if they are present. If these variables are set they will take precedence over a :proxy option specified in code. If "https_proxy" is not set, the value of "http_proxy" will be used for both HTTP and HTTPS connections.
         
     | 
| 
       79 
84 
     | 
    
         | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
      
 85 
     | 
    
         
            +
            Stubs
         
     | 
| 
      
 86 
     | 
    
         
            +
            -----
         
     | 
| 
       81 
87 
     | 
    
         | 
| 
       82 
88 
     | 
    
         
             
            You can stub out requests for testing purposes by enabling mock mode on a connection.
         
     | 
| 
       83 
89 
     | 
    
         | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
      
 90 
     | 
    
         
            +
                connection = Excon.new('http://example.com', :mock => true)
         
     | 
| 
       85 
91 
     | 
    
         | 
| 
       86 
92 
     | 
    
         
             
            Or by enabling mock mode for a request.
         
     | 
| 
       87 
93 
     | 
    
         | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
      
 94 
     | 
    
         
            +
                connection.request(:method => :get, :path => 'example', :mock => true)
         
     | 
| 
       89 
95 
     | 
    
         | 
| 
       90 
96 
     | 
    
         
             
            Then you can add stubs, for instance:
         
     | 
| 
       91 
97 
     | 
    
         | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
      
 98 
     | 
    
         
            +
                # Excon.stub(request_attributes, response_attributes)
         
     | 
| 
      
 99 
     | 
    
         
            +
                Excon.stub({:method => :get}, {:body => 'body', :status => 200})
         
     | 
| 
       94 
100 
     | 
    
         | 
| 
       95 
101 
     | 
    
         
             
            Omitted attributes are assumed to match, so this stub will match any get request and return an Excon::Response with a body of 'body' and status of 200.  You can add whatever stubs you might like this way and they will be checked against in the order they were added, if none of them match then excon will raise an error to let you know.
         
     | 
| 
       96 
102 
     | 
    
         | 
| 
       97 
     | 
    
         
            -
            Alternatively you can pass a block instead of response_attributes and it will be called with the request params.  For example, you could create a stub that echoes the body given to it like this:
         
     | 
| 
      
 103 
     | 
    
         
            +
            Alternatively you can pass a block instead of `response_attributes` and it will be called with the request params.  For example, you could create a stub that echoes the body given to it like this:
         
     | 
| 
       98 
104 
     | 
    
         | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
      
 105 
     | 
    
         
            +
                # Excon.stub(request_attributes, &response_block)
         
     | 
| 
      
 106 
     | 
    
         
            +
                Excon.stub({:method => :put}) do |params|
         
     | 
| 
      
 107 
     | 
    
         
            +
                  {:body => params[:body], :status => 200}
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
       103 
109 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
      
 110 
     | 
    
         
            +
            HTTPS/SSL Issues
         
     | 
| 
      
 111 
     | 
    
         
            +
            ----------------
         
     | 
| 
       105 
112 
     | 
    
         | 
| 
       106 
     | 
    
         
            -
            By default excon will try to verify peer certificates when using SSL for HTTPS. Unfortunately on some operating systems the defaults will not work. This will likely manifest itself as something like  
     | 
| 
      
 113 
     | 
    
         
            +
            By default excon will try to verify peer certificates when using SSL for HTTPS. Unfortunately on some operating systems the defaults will not work. This will likely manifest itself as something like `Excon::Errors::SocketError: SSL_connect returned=1 ...`
         
     | 
| 
       107 
114 
     | 
    
         | 
| 
       108 
115 
     | 
    
         
             
            If you have the misfortune of running into this problem you have a couple options. If you have certificates but they aren't being auto-discovered, you can specify the path to your certificates:
         
     | 
| 
       109 
116 
     | 
    
         | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
      
 117 
     | 
    
         
            +
                Excon.ssl_ca_path = '/path/to/certs'
         
     | 
| 
       111 
118 
     | 
    
         | 
| 
       112 
119 
     | 
    
         
             
            Failing that, you can turn off peer verification (less secure):
         
     | 
| 
       113 
120 
     | 
    
         | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
      
 121 
     | 
    
         
            +
                Excon.ssl_verify_peer = false
         
     | 
| 
       115 
122 
     | 
    
         | 
| 
       116 
123 
     | 
    
         
             
            Either of these should allow you to work around the socket error and continue with your work.
         
     | 
| 
       117 
124 
     | 
    
         | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
      
 125 
     | 
    
         
            +
            Copyright
         
     | 
| 
      
 126 
     | 
    
         
            +
            ---------
         
     | 
| 
       119 
127 
     | 
    
         | 
| 
       120 
128 
     | 
    
         
             
            (The MIT License)
         
     | 
| 
       121 
129 
     | 
    
         | 
    
        data/changelog.txt
    CHANGED
    
    
    
        data/excon.gemspec
    CHANGED
    
    | 
         @@ -13,8 +13,8 @@ Gem::Specification.new do |s| 
     | 
|
| 
       13 
13 
     | 
    
         
             
              ## If your rubyforge_project name is different, then edit it and comment out
         
     | 
| 
       14 
14 
     | 
    
         
             
              ## the sub! line in the Rakefile
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.name              = 'excon'
         
     | 
| 
       16 
     | 
    
         
            -
              s.version           = '0.9. 
     | 
| 
       17 
     | 
    
         
            -
              s.date              = ' 
     | 
| 
      
 16 
     | 
    
         
            +
              s.version           = '0.9.5'
         
     | 
| 
      
 17 
     | 
    
         
            +
              s.date              = '2012-01-16'
         
     | 
| 
       18 
18 
     | 
    
         
             
              s.rubyforge_project = 'excon'
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
              ## Make sure your summary is short. The description may be as long
         
     | 
| 
         @@ -44,7 +44,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       44 
44 
     | 
    
         
             
              ## Specify any RDoc options here. You'll want to add your README and
         
     | 
| 
       45 
45 
     | 
    
         
             
              ## LICENSE files to the extra_rdoc_files list.
         
     | 
| 
       46 
46 
     | 
    
         
             
              s.rdoc_options = ["--charset=UTF-8"]
         
     | 
| 
       47 
     | 
    
         
            -
              s.extra_rdoc_files = %w[README. 
     | 
| 
      
 47 
     | 
    
         
            +
              s.extra_rdoc_files = %w[README.md]
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
              ## List your runtime dependencies here. Runtime dependencies are those
         
     | 
| 
       50 
50 
     | 
    
         
             
              ## that are needed for an end user to actually USE your code.
         
     | 
| 
         @@ -58,7 +58,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       58 
58 
     | 
    
         
             
              s.add_development_dependency('open4')
         
     | 
| 
       59 
59 
     | 
    
         
             
              s.add_development_dependency('rake')
         
     | 
| 
       60 
60 
     | 
    
         
             
              s.add_development_dependency('rdoc')
         
     | 
| 
       61 
     | 
    
         
            -
              s.add_development_dependency('shindo' 
     | 
| 
      
 61 
     | 
    
         
            +
              s.add_development_dependency('shindo')
         
     | 
| 
       62 
62 
     | 
    
         
             
              s.add_development_dependency('sinatra')
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
       64 
64 
     | 
    
         
             
              ## Leave this section as-is. It will be automatically generated from the
         
     | 
| 
         @@ -67,7 +67,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       67 
67 
     | 
    
         
             
              # = MANIFEST =
         
     | 
| 
       68 
68 
     | 
    
         
             
              s.files = %w[
         
     | 
| 
       69 
69 
     | 
    
         
             
                Gemfile
         
     | 
| 
       70 
     | 
    
         
            -
                README. 
     | 
| 
      
 70 
     | 
    
         
            +
                README.md
         
     | 
| 
       71 
71 
     | 
    
         
             
                Rakefile
         
     | 
| 
       72 
72 
     | 
    
         
             
                benchmarks/class_vs_lambda.rb
         
     | 
| 
       73 
73 
     | 
    
         
             
                benchmarks/concat_vs_insert.rb
         
     | 
    
        data/lib/excon/connection.rb
    CHANGED
    
    | 
         @@ -236,6 +236,7 @@ module Excon 
     | 
|
| 
       236 
236 
     | 
    
         
             
                end
         
     | 
| 
       237 
237 
     | 
    
         | 
| 
       238 
238 
     | 
    
         
             
                def invoke_stub(params)
         
     | 
| 
      
 239 
     | 
    
         
            +
                  block_given = block_given?
         
     | 
| 
       239 
240 
     | 
    
         
             
                  params[:captures] = {:headers => {}} # setup data to hold captures
         
     | 
| 
       240 
241 
     | 
    
         
             
                  for stub, response in Excon.stubs
         
     | 
| 
       241 
242 
     | 
    
         
             
                    headers_match = !stub.has_key?(:headers) || stub[:headers].keys.all? do |key|
         
     | 
| 
         @@ -267,7 +268,13 @@ module Excon 
     | 
|
| 
       267 
268 
     | 
    
         
             
                      else
         
     | 
| 
       268 
269 
     | 
    
         
             
                        response
         
     | 
| 
       269 
270 
     | 
    
         
             
                      end
         
     | 
| 
       270 
     | 
    
         
            -
             
     | 
| 
      
 271 
     | 
    
         
            +
             
     | 
| 
      
 272 
     | 
    
         
            +
                      # don't pass stuff into a block if there was an error
         
     | 
| 
      
 273 
     | 
    
         
            +
                      if params[:expects] && ![*params[:expects]].include?(response_attributes[:status])
         
     | 
| 
      
 274 
     | 
    
         
            +
                        block_given = false
         
     | 
| 
      
 275 
     | 
    
         
            +
                      end
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
                      if block_given && response_attributes.has_key?(:body)
         
     | 
| 
       271 
278 
     | 
    
         
             
                        body = response_attributes.delete(:body)
         
     | 
| 
       272 
279 
     | 
    
         
             
                        content_length = remaining = body.bytesize
         
     | 
| 
       273 
280 
     | 
    
         
             
                        i = 0
         
     | 
    
        data/lib/excon/constants.rb
    CHANGED
    
    
    
        data/lib/excon/socket.rb
    CHANGED
    
    | 
         @@ -21,9 +21,9 @@ module Excon 
     | 
|
| 
       21 
21 
     | 
    
         
             
                  exception = nil
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                  addrinfo = if @proxy
         
     | 
| 
       24 
     | 
    
         
            -
                    ::Socket.getaddrinfo(@proxy[:host], @proxy[:port].to_i,  
     | 
| 
      
 24 
     | 
    
         
            +
                    ::Socket.getaddrinfo(@proxy[:host], @proxy[:port].to_i, ::Socket::Constants::AF_UNSPEC, ::Socket::Constants::SOCK_STREAM)
         
     | 
| 
       25 
25 
     | 
    
         
             
                  else
         
     | 
| 
       26 
     | 
    
         
            -
                    ::Socket.getaddrinfo(@params[:host], @params[:port].to_i,  
     | 
| 
      
 26 
     | 
    
         
            +
                    ::Socket.getaddrinfo(@params[:host], @params[:port].to_i, ::Socket::Constants::AF_UNSPEC, ::Socket::Constants::SOCK_STREAM)
         
     | 
| 
       27 
27 
     | 
    
         
             
                  end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                  addrinfo.each do |_, port, _, ip, a_family, s_type|
         
     | 
| 
         @@ -1,7 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'sinatra'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            require 'rack/head' # workaround for rbx thread safety issue (most likely autoload related)
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
3 
     | 
    
         
             
            class App < Sinatra::Base
         
     | 
| 
       6 
4 
     | 
    
         
             
              get('/id/:id/wait/:wait') do |id, wait|
         
     | 
| 
       7 
5 
     | 
    
         
             
                sleep(wait.to_i)
         
     | 
| 
         @@ -9,4 +7,7 @@ class App < Sinatra::Base 
     | 
|
| 
       9 
7 
     | 
    
         
             
              end
         
     | 
| 
       10 
8 
     | 
    
         
             
            end
         
     | 
| 
       11 
9 
     | 
    
         | 
| 
      
 10 
     | 
    
         
            +
            # get everything autoloaded, mainly for rbx
         
     | 
| 
      
 11 
     | 
    
         
            +
            App.new
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       12 
13 
     | 
    
         
             
            run App
         
     | 
    
        data/tests/stub_tests.rb
    CHANGED
    
    | 
         @@ -125,15 +125,26 @@ Shindo.tests('Excon stubs') do 
     | 
|
| 
       125 
125 
     | 
    
         | 
| 
       126 
126 
     | 
    
         
             
              Excon.stubs.clear
         
     | 
| 
       127 
127 
     | 
    
         | 
| 
       128 
     | 
    
         
            -
              tests("stub({}, {:status => 404}") do
         
     | 
| 
      
 128 
     | 
    
         
            +
              tests("stub({}, {:status => 404, :body => 'Not Found'}") do
         
     | 
| 
       129 
129 
     | 
    
         | 
| 
       130 
130 
     | 
    
         
             
                connection = Excon.new('http://127.0.0.1:9292', :mock => true)
         
     | 
| 
       131 
     | 
    
         
            -
                Excon.stub({}, {:status => 404})
         
     | 
| 
      
 131 
     | 
    
         
            +
                Excon.stub({}, {:status => 404, :body => 'Not Found'})
         
     | 
| 
       132 
132 
     | 
    
         | 
| 
       133 
133 
     | 
    
         
             
                tests("request(:expects => 200, :method => :get, :path => '/')").raises(Excon::Errors::NotFound) do
         
     | 
| 
       134 
134 
     | 
    
         
             
                  connection.request(:expects => 200, :method => :get, :path => '/')
         
     | 
| 
       135 
135 
     | 
    
         
             
                end
         
     | 
| 
       136 
136 
     | 
    
         | 
| 
      
 137 
     | 
    
         
            +
                test("request(:expects => 200, :method => :get, :path => '/') with block does not invoke the block since it raises an error") do
         
     | 
| 
      
 138 
     | 
    
         
            +
                  block_called = false
         
     | 
| 
      
 139 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 140 
     | 
    
         
            +
                    connection.request(:expects => 200, :method => :get, :path => '/') do |_, _, _|
         
     | 
| 
      
 141 
     | 
    
         
            +
                      block_called = true
         
     | 
| 
      
 142 
     | 
    
         
            +
                    end
         
     | 
| 
      
 143 
     | 
    
         
            +
                  rescue Excon::Errors::NotFound
         
     | 
| 
      
 144 
     | 
    
         
            +
                  end
         
     | 
| 
      
 145 
     | 
    
         
            +
                  !block_called
         
     | 
| 
      
 146 
     | 
    
         
            +
                end
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
       137 
148 
     | 
    
         
             
                Excon.stubs.clear
         
     | 
| 
       138 
149 
     | 
    
         | 
| 
       139 
150 
     | 
    
         
             
              end
         
     | 
    
        data/tests/test_helper.rb
    CHANGED
    
    | 
         @@ -54,7 +54,7 @@ def basic_tests(url = 'http://127.0.0.1:9292') 
     | 
|
| 
       54 
54 
     | 
    
         
             
              tests('POST /body-sink') do
         
     | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
                connection = Excon.new(url)
         
     | 
| 
       57 
     | 
    
         
            -
                response = connection.request(:method => :post, :path => '/body-sink', :body => 'x' * 5_000_000)
         
     | 
| 
      
 57 
     | 
    
         
            +
                response = connection.request(:method => :post, :path => '/body-sink', :headers => { 'Content-Type' => 'text/plain' }, :body => 'x' * 5_000_000)
         
     | 
| 
       58 
58 
     | 
    
         | 
| 
       59 
59 
     | 
    
         
             
                tests('response.body').returns("5000000") do
         
     | 
| 
       60 
60 
     | 
    
         
             
                  response.body
         
     | 
| 
         @@ -67,13 +67,20 @@ def rackup_path(*parts) 
     | 
|
| 
       67 
67 
     | 
    
         
             
            end
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
69 
     | 
    
         
             
            def with_rackup(name)
         
     | 
| 
       70 
     | 
    
         
            -
               
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
      
 70 
     | 
    
         
            +
              unless RUBY_PLATFORM == 'java'
         
     | 
| 
      
 71 
     | 
    
         
            +
                GC.disable
         
     | 
| 
      
 72 
     | 
    
         
            +
                pid, w, r, e = Open4.popen4("rackup", rackup_path(name))
         
     | 
| 
      
 73 
     | 
    
         
            +
              else
         
     | 
| 
      
 74 
     | 
    
         
            +
                pid, w, r, e = IO.popen4("rackup", rackup_path(name))
         
     | 
| 
      
 75 
     | 
    
         
            +
              end
         
     | 
| 
       72 
76 
     | 
    
         
             
              until e.gets =~ /HTTPServer#start:/; end
         
     | 
| 
       73 
77 
     | 
    
         
             
              yield
         
     | 
| 
       74 
78 
     | 
    
         
             
            ensure
         
     | 
| 
       75 
     | 
    
         
            -
              GC.enable
         
     | 
| 
       76 
79 
     | 
    
         
             
              Process.kill(9, pid)
         
     | 
| 
      
 80 
     | 
    
         
            +
              unless RUBY_PLATFORM == 'java'
         
     | 
| 
      
 81 
     | 
    
         
            +
                GC.enable
         
     | 
| 
      
 82 
     | 
    
         
            +
                Process.wait(pid)
         
     | 
| 
      
 83 
     | 
    
         
            +
              end
         
     | 
| 
       77 
84 
     | 
    
         
             
            end
         
     | 
| 
       78 
85 
     | 
    
         | 
| 
       79 
86 
     | 
    
         
             
            def server_path(*parts)
         
     | 
| 
         @@ -81,11 +88,18 @@ def server_path(*parts) 
     | 
|
| 
       81 
88 
     | 
    
         
             
            end
         
     | 
| 
       82 
89 
     | 
    
         | 
| 
       83 
90 
     | 
    
         
             
            def with_server(name)
         
     | 
| 
       84 
     | 
    
         
            -
               
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
      
 91 
     | 
    
         
            +
              unless RUBY_PLATFORM == 'java'
         
     | 
| 
      
 92 
     | 
    
         
            +
                GC.disable
         
     | 
| 
      
 93 
     | 
    
         
            +
                pid, w, r, e = Open4.popen4(server_path("#{name}.rb"))
         
     | 
| 
      
 94 
     | 
    
         
            +
              else
         
     | 
| 
      
 95 
     | 
    
         
            +
                pid, w, r, e = IO.popen4(server_path("#{name}.rb"))
         
     | 
| 
      
 96 
     | 
    
         
            +
              end
         
     | 
| 
       86 
97 
     | 
    
         
             
              until e.gets =~ /ready/; end
         
     | 
| 
       87 
98 
     | 
    
         
             
              yield
         
     | 
| 
       88 
99 
     | 
    
         
             
            ensure
         
     | 
| 
       89 
     | 
    
         
            -
              GC.enable
         
     | 
| 
       90 
100 
     | 
    
         
             
              Process.kill(9, pid)
         
     | 
| 
      
 101 
     | 
    
         
            +
              unless RUBY_PLATFORM == 'java'
         
     | 
| 
      
 102 
     | 
    
         
            +
                GC.enable
         
     | 
| 
      
 103 
     | 
    
         
            +
                Process.wait(pid)
         
     | 
| 
      
 104 
     | 
    
         
            +
              end
         
     | 
| 
       91 
105 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,123 +1,104 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: excon
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
               
     | 
| 
       6 
     | 
    
         
            -
              - 0
         
     | 
| 
       7 
     | 
    
         
            -
              - 9
         
     | 
| 
       8 
     | 
    
         
            -
              - 4
         
     | 
| 
       9 
     | 
    
         
            -
              version: 0.9.4
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.9.5
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
       10 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
     | 
    
         
            -
            authors: 
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
       12 
8 
     | 
    
         
             
            - dpiddy (Dan Peterson)
         
     | 
| 
       13 
9 
     | 
    
         
             
            - geemus (Wesley Beary)
         
     | 
| 
       14 
10 
     | 
    
         
             
            - nextmat (Matt Sanders)
         
     | 
| 
       15 
11 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       16 
12 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
13 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
            dependencies: 
         
     | 
| 
       22 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2012-01-16 00:00:00.000000000Z
         
     | 
| 
      
 15 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 16 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       23 
17 
     | 
    
         
             
              name: activesupport
         
     | 
| 
       24 
     | 
    
         
            -
               
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                requirements: 
     | 
| 
      
 18 
     | 
    
         
            +
              requirement: &70238243324360 !ruby/object:Gem::Requirement
         
     | 
| 
      
 19 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 20 
     | 
    
         
            +
                requirements:
         
     | 
| 
       27 
21 
     | 
    
         
             
                - - ~>
         
     | 
| 
       28 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       29 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       30 
     | 
    
         
            -
                    - 3
         
     | 
| 
       31 
     | 
    
         
            -
                    - 1
         
     | 
| 
       32 
     | 
    
         
            -
                    - 3
         
     | 
| 
      
 22 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
23 
     | 
    
         
             
                    version: 3.1.3
         
     | 
| 
       34 
24 
     | 
    
         
             
              type: :development
         
     | 
| 
       35 
     | 
    
         
            -
              version_requirements: *id001
         
     | 
| 
       36 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       37 
     | 
    
         
            -
              name: delorean
         
     | 
| 
       38 
25 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       39 
     | 
    
         
            -
               
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
      
 26 
     | 
    
         
            +
              version_requirements: *70238243324360
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: delorean
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: &70238243323780 !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 31 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 32 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 33 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 34 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       46 
35 
     | 
    
         
             
              type: :development
         
     | 
| 
       47 
     | 
    
         
            -
              version_requirements: *id002
         
     | 
| 
       48 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       49 
     | 
    
         
            -
              name: open4
         
     | 
| 
       50 
36 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       51 
     | 
    
         
            -
               
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
      
 37 
     | 
    
         
            +
              version_requirements: *70238243323780
         
     | 
| 
      
 38 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 39 
     | 
    
         
            +
              name: open4
         
     | 
| 
      
 40 
     | 
    
         
            +
              requirement: &70238243322680 !ruby/object:Gem::Requirement
         
     | 
| 
      
 41 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 42 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 43 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 44 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 45 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       58 
46 
     | 
    
         
             
              type: :development
         
     | 
| 
       59 
     | 
    
         
            -
              version_requirements: *id003
         
     | 
| 
       60 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       61 
     | 
    
         
            -
              name: rake
         
     | 
| 
       62 
47 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       63 
     | 
    
         
            -
               
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
      
 48 
     | 
    
         
            +
              version_requirements: *70238243322680
         
     | 
| 
      
 49 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 50 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 51 
     | 
    
         
            +
              requirement: &70238243322040 !ruby/object:Gem::Requirement
         
     | 
| 
      
 52 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 53 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 54 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 55 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 56 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       70 
57 
     | 
    
         
             
              type: :development
         
     | 
| 
       71 
     | 
    
         
            -
              version_requirements: *id004
         
     | 
| 
       72 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       73 
     | 
    
         
            -
              name: rdoc
         
     | 
| 
       74 
58 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       75 
     | 
    
         
            -
               
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
      
 59 
     | 
    
         
            +
              version_requirements: *70238243322040
         
     | 
| 
      
 60 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 61 
     | 
    
         
            +
              name: rdoc
         
     | 
| 
      
 62 
     | 
    
         
            +
              requirement: &70238243321160 !ruby/object:Gem::Requirement
         
     | 
| 
      
 63 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 64 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 65 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 66 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 67 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       82 
68 
     | 
    
         
             
              type: :development
         
     | 
| 
       83 
     | 
    
         
            -
              version_requirements: *id005
         
     | 
| 
       84 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       85 
     | 
    
         
            -
              name: shindo
         
     | 
| 
       86 
69 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       87 
     | 
    
         
            -
               
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
                    version: 0 
     | 
| 
      
 70 
     | 
    
         
            +
              version_requirements: *70238243321160
         
     | 
| 
      
 71 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 72 
     | 
    
         
            +
              name: shindo
         
     | 
| 
      
 73 
     | 
    
         
            +
              requirement: &70238243320420 !ruby/object:Gem::Requirement
         
     | 
| 
      
 74 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 75 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 76 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 78 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       96 
79 
     | 
    
         
             
              type: :development
         
     | 
| 
       97 
     | 
    
         
            -
              version_requirements: *id006
         
     | 
| 
       98 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       99 
     | 
    
         
            -
              name: sinatra
         
     | 
| 
       100 
80 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       101 
     | 
    
         
            -
               
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
      
 81 
     | 
    
         
            +
              version_requirements: *70238243320420
         
     | 
| 
      
 82 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 83 
     | 
    
         
            +
              name: sinatra
         
     | 
| 
      
 84 
     | 
    
         
            +
              requirement: &70238243319760 !ruby/object:Gem::Requirement
         
     | 
| 
      
 85 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       108 
90 
     | 
    
         
             
              type: :development
         
     | 
| 
       109 
     | 
    
         
            -
               
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: *70238243319760
         
     | 
| 
       110 
93 
     | 
    
         
             
            description: EXtended http(s) CONnections
         
     | 
| 
       111 
94 
     | 
    
         
             
            email: geemus@gmail.com
         
     | 
| 
       112 
95 
     | 
    
         
             
            executables: []
         
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
96 
     | 
    
         
             
            extensions: []
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 97 
     | 
    
         
            +
            extra_rdoc_files:
         
     | 
| 
      
 98 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 99 
     | 
    
         
            +
            files:
         
     | 
| 
       119 
100 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       120 
     | 
    
         
            -
            - README. 
     | 
| 
      
 101 
     | 
    
         
            +
            - README.md
         
     | 
| 
       121 
102 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       122 
103 
     | 
    
         
             
            - benchmarks/class_vs_lambda.rb
         
     | 
| 
       123 
104 
     | 
    
         
             
            - benchmarks/concat_vs_insert.rb
         
     | 
| 
         @@ -164,35 +145,32 @@ files: 
     | 
|
| 
       164 
145 
     | 
    
         
             
            - tests/stub_tests.rb
         
     | 
| 
       165 
146 
     | 
    
         
             
            - tests/test_helper.rb
         
     | 
| 
       166 
147 
     | 
    
         
             
            - tests/thread_safety_tests.rb
         
     | 
| 
       167 
     | 
    
         
            -
            has_rdoc: true
         
     | 
| 
       168 
148 
     | 
    
         
             
            homepage: https://github.com/geemus/excon
         
     | 
| 
       169 
149 
     | 
    
         
             
            licenses: []
         
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
       171 
150 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       172 
     | 
    
         
            -
            rdoc_options: 
     | 
| 
      
 151 
     | 
    
         
            +
            rdoc_options:
         
     | 
| 
       173 
152 
     | 
    
         
             
            - --charset=UTF-8
         
     | 
| 
       174 
     | 
    
         
            -
            require_paths: 
     | 
| 
      
 153 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       175 
154 
     | 
    
         
             
            - lib
         
     | 
| 
       176 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
       177 
     | 
    
         
            -
               
     | 
| 
       178 
     | 
    
         
            -
               
     | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
                   
     | 
| 
       182 
     | 
    
         
            -
                   
     | 
| 
       183 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
       184 
     | 
    
         
            -
              requirements: 
         
     | 
| 
       185 
     | 
    
         
            -
              - - ">="
         
     | 
| 
       186 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
         
     | 
| 
       187 
     | 
    
         
            -
                  segments: 
         
     | 
| 
      
 155 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 156 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 157 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 158 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 159 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 160 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 161 
     | 
    
         
            +
                  segments:
         
     | 
| 
       188 
162 
     | 
    
         
             
                  - 0
         
     | 
| 
       189 
     | 
    
         
            -
                   
     | 
| 
      
 163 
     | 
    
         
            +
                  hash: 1843710619352471147
         
     | 
| 
      
 164 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 165 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 166 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 167 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 168 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 169 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       190 
170 
     | 
    
         
             
            requirements: []
         
     | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
       192 
171 
     | 
    
         
             
            rubyforge_project: excon
         
     | 
| 
       193 
     | 
    
         
            -
            rubygems_version: 1. 
     | 
| 
      
 172 
     | 
    
         
            +
            rubygems_version: 1.8.10
         
     | 
| 
       194 
173 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       195 
174 
     | 
    
         
             
            specification_version: 2
         
     | 
| 
       196 
175 
     | 
    
         
             
            summary: speed, persistence, http(s)
         
     | 
| 
       197 
176 
     | 
    
         
             
            test_files: []
         
     | 
| 
       198 
     | 
    
         
            -
             
     |