excon 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of excon might be problematic. Click here for more details.

@@ -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.0.22'
17
- s.date = '2010-05-09'
16
+ s.version = '0.0.23'
17
+ s.date = '2010-05-10'
18
18
  s.rubyforge_project = 'excon'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -15,7 +15,7 @@ require 'excon/response'
15
15
  module Excon
16
16
 
17
17
  unless const_defined?(:VERSION)
18
- VERSION = '0.0.22'
18
+ VERSION = '0.0.23'
19
19
  end
20
20
 
21
21
  CHUNK_SIZE = 1048576 # 1 megabyte
@@ -3,10 +3,8 @@ module Excon
3
3
 
4
4
  def self.parse(socket, params = {}, &block)
5
5
  if params[:block]
6
- p "params[:block] is deprecated, please pass the block to the method"
7
- end
8
- if block_given?
9
- params[:block] = block
6
+ print " \e[33m[WARN] params[:block] is deprecated, please pass the block to the request\e[0m"
7
+ block = params[:block]
10
8
  end
11
9
 
12
10
  response = new
@@ -23,11 +21,9 @@ module Excon
23
21
  end
24
22
 
25
23
  unless params[:method] == 'HEAD'
26
- block = if !params[:block] || (params[:expects] && ![*params[:expects]].include?(response.status))
24
+ if !block || (params[:expects] && ![*params[:expects]].include?(response.status))
27
25
  response.body = ''
28
26
  lambda { |chunk| response.body << chunk }
29
- else
30
- params[:block]
31
27
  end
32
28
 
33
29
  if response.headers['Connection'] == 'close'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 22
9
- version: 0.0.22
8
+ - 23
9
+ version: 0.0.23
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-09 00:00:00 -07:00
17
+ date: 2010-05-10 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20