parallel_http 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. data/lib/parallel_http.rb +3 -3
  2. metadata +1 -1
data/lib/parallel_http.rb CHANGED
@@ -17,7 +17,7 @@ class ParallelHttp
17
17
  @@results
18
18
  end
19
19
 
20
- def self.exec_result id, result, error=nil
20
+ def self.exec_result id, result, errors=nil
21
21
  body = ''
22
22
  if RUBY_VERSION.to_f < 1.9
23
23
  body = Iconv.iconv('UTF-8//IGNORE', 'UTF-8', result.response)
@@ -25,7 +25,7 @@ class ParallelHttp
25
25
  body = result.response.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace, :replace => '').encode('UTF-8')
26
26
  end
27
27
  hsh = {:id => id, :response_code => result.response_header.status, :body => body}
28
- hsh.merge!(:error => error) if error
28
+ hsh.merge!(:errors => errors) if errors
29
29
  @@results << hsh
30
30
  if @@request_size == @@results.size
31
31
  EM.stop
@@ -40,7 +40,7 @@ class ParallelHttp
40
40
  ParallelHttp.exec_result(request[:id], http)
41
41
  end
42
42
  http.errback do |error|
43
- ParallelHttp.exec_result(request[:id], http, error)
43
+ ParallelHttp.exec_result(request[:id], http, http.errors)
44
44
  end
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: