em-http-fetcher 0.1.0 → 0.1.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.rdoc CHANGED
@@ -32,8 +32,7 @@ that has configureable concurrency regardless of EM's thread pool.
32
32
 
33
33
  == Install
34
34
 
35
- After em-http-request *1.0.4* *or* *above* is released, you can install with gem.
36
- Currently em-http-fetcher depends (> 1.0.3) to prevent to install intentionally.
35
+ You can install with gem. However em-http-request (=< 1.0.3) has a redirection issue. If you need to handle redirection properly, try following workaround.
37
36
 
38
37
  $ gem install em-http-fetcher
39
38
 
@@ -74,8 +73,8 @@ If first argument is not a hash, it will be treated as :uri.
74
73
  == Limitations
75
74
 
76
75
  * :host_concurrency is checked only for initial URI.
77
- When request is redirected, number of parallel requests for
78
- one host may be over host_concurrency.
76
+ When request is redirected to another host, number of parallel
77
+ requests for one host may be over host_concurrency.
79
78
  * Redirections will not work until issue #230 of em-http-request
80
79
  is resolved; https://github.com/igrigorik/em-http-request/pull/230
81
80
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.required_ruby_version = '>= 1.9.0'
19
19
 
20
20
  s.add_dependency "addressable", ">= 2.2.3"
21
- s.add_dependency "em-http-request", "> 1.0.3"
21
+ s.add_dependency "em-http-request", ">= 1.0.0"
22
22
 
23
23
  # s.add_development_dependency "rspec"
24
24
  # s.add_development_dependency "rake"
@@ -3,10 +3,21 @@ require 'eventmachine'
3
3
  require 'em/pool'
4
4
  require 'em-http-request'
5
5
  require 'addressable/uri'
6
+ unless EM::HttpRequest.const_defined? :VERSION
7
+ require 'em-http/version'
8
+ end
9
+
10
+ if EM::HttpRequest::VERSION == '1.0.3' &&
11
+ Module.const_defined?(:HttpClientOptions) &&
12
+ !HttpClientOptions.instance_method(:set_uri).parameters.member?([:opt, :path])
13
+ warn "[WARN] EM-HTTP-Request release 1.0.3 has redirection handling issue.\n" +
14
+ " Redirection in same host will NOT wrok and may cause loop!\n" +
15
+ " See https://github.com/igrigorik/em-http-request/pull/230 for details."
16
+ end
6
17
 
7
18
  module EventMachine
8
19
  class HttpFetcher
9
- VERSION = "0.1.0"
20
+ VERSION = "0.1.1"
10
21
 
11
22
  class RequestPool
12
23
  def initialize(total_size, host_resource_size, host_reuse_wait = 0, opts = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-http-fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -32,17 +32,17 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>'
35
+ - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 1.0.3
37
+ version: 1.0.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>'
43
+ - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.0.3
45
+ version: 1.0.0
46
46
  description: HTTP fetch client based on ruby EventMachne and EM-HTTP-Request that
47
47
  has configureable concurrency regardless of EM's thread pool.
48
48
  email: