em-net-http 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -11
- data/README.md +11 -5
- data/Rakefile +3 -14
- data/VERSION +1 -1
- data/em-net-http.gemspec +44 -25
- data/lib/em-net-http.rb +62 -17
- data/spec/em-net-http_spec.rb +52 -9
- data/spec/image.jpg +0 -0
- data/spec/spec_helper.rb +14 -3
- metadata +98 -54
- data/.gitignore +0 -24
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ fiber:
|
|
21
21
|
|
22
22
|
The above will run without blocking your carefully-tuned nonblocking webapp.
|
23
23
|
|
24
|
-
There are a few tests (taking advantage of
|
24
|
+
There are a few tests (taking advantage of the very useful [Mimic][6] gem)
|
25
25
|
that assert that responses are identical to those created by <tt>Net::HTTP</tt>.
|
26
26
|
These are by no means exhaustive; if you're using <tt>Net::HTTP</tt> in some other way
|
27
27
|
and the <tt>em-net-http</tt>'s behaviour is not what you expect, do send me a failing test
|
@@ -31,13 +31,19 @@ Currently tested with Ruby (MRI) 1.9.1 and 1.9.2.
|
|
31
31
|
|
32
32
|
### Caveat
|
33
33
|
|
34
|
-
The <tt>Net::HTTP</tt> API is a many-headed hydra -- I haven't patched much of it
|
35
|
-
|
36
|
-
|
34
|
+
The <tt>Net::HTTP</tt> API is a many-headed hydra -- I haven't patched much of it.
|
35
|
+
Your mileage may therefore vary. Please feed me patches, pull requests and bug reports!
|
36
|
+
|
37
|
+
### Thanks
|
38
|
+
|
39
|
+
* [Luke Redpath][7], for [Mimic][6].
|
40
|
+
* [Mathieu Ravaux][8], for adding streaming and buffering support.
|
37
41
|
|
38
42
|
[1]: http://github.com/igrigorik/em-http-request
|
39
43
|
[2]: http://rubyeventmachine.com/
|
40
44
|
[3]: http://rightaws.rubyforge.org/
|
41
45
|
[4]: http://github.com/mwunsch/weary
|
42
46
|
[5]: http://github.com/mwunsch/tumblr
|
43
|
-
[6]: http://github.com/lukeredpath/mimic
|
47
|
+
[6]: http://github.com/lukeredpath/mimic
|
48
|
+
[7]: http://lukeredpath.co.uk/
|
49
|
+
[8]: http://mathieuravaux.com/
|
data/Rakefile
CHANGED
@@ -13,7 +13,7 @@ begin
|
|
13
13
|
gem.add_dependency 'eventmachine', '>= 0.12.10'
|
14
14
|
gem.add_dependency 'addressable'
|
15
15
|
gem.add_dependency 'em-http-request', '>= 0.2.10'
|
16
|
-
gem.add_development_dependency "rspec", "
|
16
|
+
gem.add_development_dependency "rspec", "~> 2.5"
|
17
17
|
gem.add_development_dependency "mimic", ">= 0.3.0"
|
18
18
|
gem.add_development_dependency 'weary'
|
19
19
|
gem.add_development_dependency 'right_aws'
|
@@ -24,19 +24,8 @@ rescue LoadError
|
|
24
24
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
25
25
|
end
|
26
26
|
|
27
|
-
require '
|
28
|
-
|
29
|
-
spec.libs << 'lib' << 'spec'
|
30
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
31
|
-
end
|
32
|
-
|
33
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
34
|
-
spec.libs << 'lib' << 'spec'
|
35
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
-
spec.rcov = true
|
37
|
-
end
|
38
|
-
|
39
|
-
task :spec => :check_dependencies
|
27
|
+
require 'rspec/core/rake_task'
|
28
|
+
RSpec::Core::RakeTask.new(:spec)
|
40
29
|
|
41
30
|
task :default => :spec
|
42
31
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/em-net-http.gemspec
CHANGED
@@ -1,76 +1,95 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{em-net-http}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["James Fairbairn"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-04-22}
|
13
13
|
s.description = %q{Monkeypatching Net::HTTP to use em-http-request under the hood.}
|
14
14
|
s.email = %q{james@netlagoon.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
21
|
+
"Gemfile",
|
22
|
+
"LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"em-net-http.gemspec",
|
27
|
+
"lib/em-net-http.rb",
|
28
|
+
"lib/em-net-http/weary.rb",
|
29
|
+
"lib/test.rb",
|
30
|
+
"lib/test_weary.rb",
|
31
|
+
"spec/em-net-http_spec.rb",
|
32
|
+
"spec/image.jpg",
|
33
|
+
"spec/spec.opts",
|
34
|
+
"spec/spec_helper.rb"
|
35
35
|
]
|
36
36
|
s.homepage = %q{http://github.com/jfairbairn/em-net-http}
|
37
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
38
37
|
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.
|
38
|
+
s.rubygems_version = %q{1.5.0}
|
40
39
|
s.summary = %q{Non-blocking replacement for Net::HTTP, for use in EventMachine}
|
41
40
|
s.test_files = [
|
42
41
|
"spec/em-net-http_spec.rb",
|
43
|
-
|
42
|
+
"spec/spec_helper.rb"
|
44
43
|
]
|
45
44
|
|
46
45
|
if s.respond_to? :specification_version then
|
47
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
46
|
s.specification_version = 3
|
49
47
|
|
50
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_runtime_dependency(%q<em-net-http>, [">= 0"])
|
50
|
+
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
51
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
52
|
+
s.add_development_dependency(%q<mimic>, [">= 0.3.0"])
|
53
|
+
s.add_development_dependency(%q<weary>, [">= 0"])
|
54
|
+
s.add_development_dependency(%q<right_aws>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<tumblr-rb>, [">= 0"])
|
51
56
|
s.add_runtime_dependency(%q<eventmachine>, [">= 0.12.10"])
|
52
57
|
s.add_runtime_dependency(%q<addressable>, [">= 0"])
|
53
58
|
s.add_runtime_dependency(%q<em-http-request>, [">= 0.2.10"])
|
54
|
-
s.add_development_dependency(%q<rspec>, ["
|
59
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5"])
|
55
60
|
s.add_development_dependency(%q<mimic>, [">= 0.3.0"])
|
56
61
|
s.add_development_dependency(%q<weary>, [">= 0"])
|
57
62
|
s.add_development_dependency(%q<right_aws>, [">= 0"])
|
58
63
|
s.add_development_dependency(%q<tumblr-rb>, [">= 0"])
|
59
64
|
else
|
65
|
+
s.add_dependency(%q<em-net-http>, [">= 0"])
|
66
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
67
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
68
|
+
s.add_dependency(%q<mimic>, [">= 0.3.0"])
|
69
|
+
s.add_dependency(%q<weary>, [">= 0"])
|
70
|
+
s.add_dependency(%q<right_aws>, [">= 0"])
|
71
|
+
s.add_dependency(%q<tumblr-rb>, [">= 0"])
|
60
72
|
s.add_dependency(%q<eventmachine>, [">= 0.12.10"])
|
61
73
|
s.add_dependency(%q<addressable>, [">= 0"])
|
62
74
|
s.add_dependency(%q<em-http-request>, [">= 0.2.10"])
|
63
|
-
s.add_dependency(%q<rspec>, ["
|
75
|
+
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
64
76
|
s.add_dependency(%q<mimic>, [">= 0.3.0"])
|
65
77
|
s.add_dependency(%q<weary>, [">= 0"])
|
66
78
|
s.add_dependency(%q<right_aws>, [">= 0"])
|
67
79
|
s.add_dependency(%q<tumblr-rb>, [">= 0"])
|
68
80
|
end
|
69
81
|
else
|
82
|
+
s.add_dependency(%q<em-net-http>, [">= 0"])
|
83
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
84
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
85
|
+
s.add_dependency(%q<mimic>, [">= 0.3.0"])
|
86
|
+
s.add_dependency(%q<weary>, [">= 0"])
|
87
|
+
s.add_dependency(%q<right_aws>, [">= 0"])
|
88
|
+
s.add_dependency(%q<tumblr-rb>, [">= 0"])
|
70
89
|
s.add_dependency(%q<eventmachine>, [">= 0.12.10"])
|
71
90
|
s.add_dependency(%q<addressable>, [">= 0"])
|
72
91
|
s.add_dependency(%q<em-http-request>, [">= 0.2.10"])
|
73
|
-
s.add_dependency(%q<rspec>, ["
|
92
|
+
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
74
93
|
s.add_dependency(%q<mimic>, [">= 0.3.0"])
|
75
94
|
s.add_dependency(%q<weary>, [">= 0"])
|
76
95
|
s.add_dependency(%q<right_aws>, [">= 0"])
|
data/lib/em-net-http.rb
CHANGED
@@ -10,12 +10,16 @@ module EventMachine
|
|
10
10
|
attr_reader :code, :body, :header, :message, :http_version
|
11
11
|
alias_method :msg, :message
|
12
12
|
|
13
|
-
def initialize(
|
14
|
-
@code =
|
15
|
-
@message =
|
16
|
-
@http_version =
|
17
|
-
@header =
|
18
|
-
|
13
|
+
def initialize(response_header)
|
14
|
+
@code = response_header.http_status
|
15
|
+
@message = response_header.http_reason
|
16
|
+
@http_version = response_header.http_version
|
17
|
+
@header = response_header
|
18
|
+
end
|
19
|
+
|
20
|
+
def set_body body
|
21
|
+
@already_buffered = true
|
22
|
+
@body = body
|
19
23
|
end
|
20
24
|
|
21
25
|
def content_type
|
@@ -70,8 +74,28 @@ module Net
|
|
70
74
|
alias_method :orig_net_http_read_body, :read_body
|
71
75
|
|
72
76
|
def read_body(dest=nil, &block)
|
77
|
+
return @body if @already_buffered
|
73
78
|
return orig_net_http_read_body(dest, &block) unless ::EM.reactor_running?
|
74
|
-
|
79
|
+
if block_given?
|
80
|
+
f = Fiber.current
|
81
|
+
@httpreq.callback { |res| f.resume }
|
82
|
+
@httpreq.stream &block
|
83
|
+
Fiber.yield
|
84
|
+
else
|
85
|
+
unless @body || @already_buffered
|
86
|
+
if self.class.body_permitted?
|
87
|
+
f = Fiber.current
|
88
|
+
io = StringIO.new '', 'wb'
|
89
|
+
io.set_encoding 'ASCII-8BIT'
|
90
|
+
@httpreq.callback { |res| f.resume io.string }
|
91
|
+
@httpreq.errback { |err| f.resume err }
|
92
|
+
@httpreq.stream { |chunk| io.write chunk }
|
93
|
+
@body = Fiber.yield
|
94
|
+
end
|
95
|
+
@already_buffered = true
|
96
|
+
end
|
97
|
+
@body
|
98
|
+
end
|
75
99
|
end
|
76
100
|
end
|
77
101
|
|
@@ -116,7 +140,8 @@ module Net
|
|
116
140
|
f=Fiber.current
|
117
141
|
|
118
142
|
convert_em_http_response = lambda do |res|
|
119
|
-
emres = EM::NetHTTP::Response.new(res)
|
143
|
+
emres = EM::NetHTTP::Response.new(res.response_header)
|
144
|
+
emres.set_body res.response
|
120
145
|
nhresclass = Net::HTTPResponse.response_class(emres.code)
|
121
146
|
nhres = nhresclass.new(emres.http_version, emres.code, emres.message)
|
122
147
|
emres.to_hash.each do |k, v|
|
@@ -127,16 +152,36 @@ module Net
|
|
127
152
|
f.resume nhres
|
128
153
|
end
|
129
154
|
|
130
|
-
httpreq.callback &convert_em_http_response
|
131
|
-
httpreq.errback {|err|f.resume(:error)}
|
132
|
-
res = Fiber.yield
|
133
|
-
if res == :error
|
134
|
-
raise 'EM::HttpRequest error - request timed out' if Time.now - self.read_timeout > t0
|
135
|
-
raise 'EM::HttpRequest error - unknown error'
|
136
|
-
end
|
137
155
|
|
138
|
-
|
139
|
-
|
156
|
+
if block_given?
|
157
|
+
httpreq.headers { |headers|
|
158
|
+
|
159
|
+
emres = EM::NetHTTP::Response.new(headers)
|
160
|
+
nhresclass = Net::HTTPResponse.response_class(emres.code)
|
161
|
+
nhres = nhresclass.new(emres.http_version, emres.code, emres.message)
|
162
|
+
emres.to_hash.each do |k, v|
|
163
|
+
nhres.add_field(k, v)
|
164
|
+
end
|
165
|
+
f.resume nhres
|
166
|
+
}
|
167
|
+
|
168
|
+
nhres = Fiber.yield
|
169
|
+
nhres.instance_variable_set :@httpreq, httpreq
|
170
|
+
|
171
|
+
yield nhres
|
172
|
+
nhres
|
173
|
+
else
|
174
|
+
httpreq.callback &convert_em_http_response
|
175
|
+
httpreq.errback {|err|f.resume(:error)}
|
176
|
+
res = Fiber.yield
|
177
|
+
|
178
|
+
if res == :error
|
179
|
+
raise 'EM::HttpRequest error - request timed out' if Time.now - self.read_timeout > t0
|
180
|
+
raise 'EM::HttpRequest error - unknown error'
|
181
|
+
end
|
182
|
+
|
183
|
+
res
|
184
|
+
end
|
140
185
|
end
|
141
186
|
|
142
187
|
end
|
data/spec/em-net-http_spec.rb
CHANGED
@@ -1,9 +1,39 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
3
|
describe "em-net-http" do
|
4
|
+
|
5
|
+
it 'should support streaming the response' do
|
6
|
+
assert_identical(:streamed => true) {
|
7
|
+
body = StringIO.new '', 'wb'
|
8
|
+
|
9
|
+
Net::HTTP.start('localhost', Mimic::MIMIC_DEFAULT_PORT) do |http|
|
10
|
+
http.request_get "/image" do |resp|
|
11
|
+
resp.should be_a_kind_of(Net::HTTPOK)
|
12
|
+
resp.read_body { |chunk| body.write chunk }
|
13
|
+
resp
|
14
|
+
end
|
15
|
+
end.tap do |resp|
|
16
|
+
resp.instance_variable_set :@streamed_body, body.string
|
17
|
+
end
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should support buffering the response' do
|
22
|
+
assert_identical {
|
23
|
+
Net::HTTP.start('localhost', Mimic::MIMIC_DEFAULT_PORT) do |http|
|
24
|
+
respone = http.request_get "/image" do |resp|
|
25
|
+
resp.should be_a_kind_of(Net::HTTPOK)
|
26
|
+
resp.read_body # force reading the body before the test tears down the EM loop
|
27
|
+
resp
|
28
|
+
end
|
29
|
+
respone.tap { respone.should be_a_kind_of(Net::HTTPOK) }
|
30
|
+
end
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
4
34
|
describe 'should be compatible' do
|
5
35
|
it 'for Net::HTTP.get()' do
|
6
|
-
run_requests {Net::HTTP.get(URI.parse(
|
36
|
+
run_requests {Net::HTTP.get(URI.parse("http://localhost:#{Mimic::MIMIC_DEFAULT_PORT}/hello"))}
|
7
37
|
@expected_res.should == @actual_res
|
8
38
|
end
|
9
39
|
|
@@ -17,7 +47,10 @@ describe "em-net-http" do
|
|
17
47
|
it "for Net::HTTP.start(host, port, &block) with response code #{code}" do
|
18
48
|
assert_identical {
|
19
49
|
Net::HTTP.start('localhost', Mimic::MIMIC_DEFAULT_PORT) do |http|
|
20
|
-
http.get("/code/#{code}")
|
50
|
+
http.get("/code/#{code}").tap { |resp|
|
51
|
+
# Force the response to be buffered while we are still in the EM loop, since we shut it down EM before the verifications
|
52
|
+
resp.body
|
53
|
+
}
|
21
54
|
end
|
22
55
|
}
|
23
56
|
end
|
@@ -68,18 +101,20 @@ describe "em-net-http" do
|
|
68
101
|
end
|
69
102
|
end
|
70
103
|
|
71
|
-
def assert_identical(&block)
|
104
|
+
def assert_identical(streamed=false, &block)
|
72
105
|
run_requests(&block)
|
73
|
-
@actual_res.should
|
106
|
+
@actual_res.should be_a_kind_of(Net::HTTPResponse)
|
107
|
+
@actual_res.should match_response(@expected_res, :streamed => streamed)
|
74
108
|
end
|
75
109
|
|
76
|
-
def match_response(expected)
|
77
|
-
ResponseMatcher.new(expected)
|
110
|
+
def match_response(expected, streamed=false)
|
111
|
+
ResponseMatcher.new(expected, streamed)
|
78
112
|
end
|
79
113
|
|
80
114
|
class ResponseMatcher
|
81
|
-
def initialize(expected)
|
115
|
+
def initialize(expected, streamed=false)
|
82
116
|
@expected = expected
|
117
|
+
@streamed = streamed
|
83
118
|
end
|
84
119
|
|
85
120
|
def matches?(actual)
|
@@ -88,8 +123,16 @@ describe "em-net-http" do
|
|
88
123
|
actual_date = Time.parse(actual.delete('date').join)
|
89
124
|
actual_date.should >= expected_date
|
90
125
|
actual_date.should <= expected_date + 2
|
91
|
-
|
92
|
-
|
126
|
+
|
127
|
+
actual.class.should == @expected.class
|
128
|
+
actual.code.should == @expected.code
|
129
|
+
actual.to_hash.should == @expected.to_hash.merge({"connection" => ['close']})
|
130
|
+
|
131
|
+
if @streamed
|
132
|
+
actual.instance_variable_get(:@streamed_body).should ==
|
133
|
+
@expected.instance_variable_get(:@streamed_body)
|
134
|
+
else
|
135
|
+
actual.body.should == @expected.body
|
93
136
|
end
|
94
137
|
true
|
95
138
|
end
|
data/spec/image.jpg
ADDED
Binary file
|
data/spec/spec_helper.rb
CHANGED
@@ -2,12 +2,11 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
2
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
3
|
require 'em-net-http'
|
4
4
|
require 'time'
|
5
|
-
require '
|
6
|
-
require 'spec/autorun'
|
5
|
+
require 'rspec'
|
7
6
|
|
8
7
|
require 'mimic'
|
9
8
|
|
10
|
-
|
9
|
+
RSpec.configure do |config|
|
11
10
|
config.before(:all) do
|
12
11
|
Mimic.mimic do
|
13
12
|
Net::HTTPResponse::CODE_TO_OBJ.each do |code, klass|
|
@@ -16,6 +15,18 @@ Spec::Runner.configure do |config|
|
|
16
15
|
|
17
16
|
get('/hello').returning('Hello World!', 200, {'Content-Type'=>'text/plain'})
|
18
17
|
|
18
|
+
class BigImageResponse
|
19
|
+
def each
|
20
|
+
::File.open('spec/image.jpg', "rb") { |file|
|
21
|
+
while part = file.read(8192)
|
22
|
+
yield part
|
23
|
+
end
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
resp = BigImageResponse.new
|
28
|
+
get('/image').returning(resp, 200, {"Content-Type" => 'image/jpeg'})
|
29
|
+
|
19
30
|
post('/testpost') do
|
20
31
|
"You said #{request.body.read}."
|
21
32
|
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-net-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 5
|
9
|
-
version: 0.2.5
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- James Fairbairn
|
@@ -14,121 +10,174 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
13
|
+
date: 2011-04-22 00:00:00 +01:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
17
|
+
name: em-net-http
|
22
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
19
|
none: false
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
- 12
|
30
|
-
- 10
|
31
|
-
version: 0.12.10
|
23
|
+
version: "0"
|
32
24
|
type: :runtime
|
33
25
|
prerelease: false
|
34
26
|
version_requirements: *id001
|
35
27
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
28
|
+
name: rake
|
37
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
30
|
none: false
|
39
31
|
requirements:
|
40
32
|
- - ">="
|
41
33
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 0
|
44
34
|
version: "0"
|
45
35
|
type: :runtime
|
46
36
|
prerelease: false
|
47
37
|
version_requirements: *id002
|
48
38
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
39
|
+
name: rspec
|
50
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
51
41
|
none: false
|
52
42
|
requirements:
|
53
43
|
- - ">="
|
54
44
|
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
|
57
|
-
- 2
|
58
|
-
- 10
|
59
|
-
version: 0.2.10
|
60
|
-
type: :runtime
|
45
|
+
version: 1.2.9
|
46
|
+
type: :development
|
61
47
|
prerelease: false
|
62
48
|
version_requirements: *id003
|
63
49
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
50
|
+
name: mimic
|
65
51
|
requirement: &id004 !ruby/object:Gem::Requirement
|
66
52
|
none: false
|
67
53
|
requirements:
|
68
54
|
- - ">="
|
69
55
|
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
- 1
|
72
|
-
- 2
|
73
|
-
- 9
|
74
|
-
version: 1.2.9
|
56
|
+
version: 0.3.0
|
75
57
|
type: :development
|
76
58
|
prerelease: false
|
77
59
|
version_requirements: *id004
|
78
60
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
61
|
+
name: weary
|
80
62
|
requirement: &id005 !ruby/object:Gem::Requirement
|
81
63
|
none: false
|
82
64
|
requirements:
|
83
65
|
- - ">="
|
84
66
|
- !ruby/object:Gem::Version
|
85
|
-
|
86
|
-
- 0
|
87
|
-
- 3
|
88
|
-
- 0
|
89
|
-
version: 0.3.0
|
67
|
+
version: "0"
|
90
68
|
type: :development
|
91
69
|
prerelease: false
|
92
70
|
version_requirements: *id005
|
93
71
|
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
72
|
+
name: right_aws
|
95
73
|
requirement: &id006 !ruby/object:Gem::Requirement
|
96
74
|
none: false
|
97
75
|
requirements:
|
98
76
|
- - ">="
|
99
77
|
- !ruby/object:Gem::Version
|
100
|
-
segments:
|
101
|
-
- 0
|
102
78
|
version: "0"
|
103
79
|
type: :development
|
104
80
|
prerelease: false
|
105
81
|
version_requirements: *id006
|
106
82
|
- !ruby/object:Gem::Dependency
|
107
|
-
name:
|
83
|
+
name: tumblr-rb
|
108
84
|
requirement: &id007 !ruby/object:Gem::Requirement
|
109
85
|
none: false
|
110
86
|
requirements:
|
111
87
|
- - ">="
|
112
88
|
- !ruby/object:Gem::Version
|
113
|
-
segments:
|
114
|
-
- 0
|
115
89
|
version: "0"
|
116
90
|
type: :development
|
117
91
|
prerelease: false
|
118
92
|
version_requirements: *id007
|
119
93
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
94
|
+
name: eventmachine
|
121
95
|
requirement: &id008 !ruby/object:Gem::Requirement
|
122
96
|
none: false
|
123
97
|
requirements:
|
124
98
|
- - ">="
|
125
99
|
- !ruby/object:Gem::Version
|
126
|
-
|
127
|
-
|
100
|
+
version: 0.12.10
|
101
|
+
type: :runtime
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: *id008
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: addressable
|
106
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
128
111
|
version: "0"
|
112
|
+
type: :runtime
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: *id009
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: em-http-request
|
117
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 0.2.10
|
123
|
+
type: :runtime
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: *id010
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rspec
|
128
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: "2.5"
|
129
134
|
type: :development
|
130
135
|
prerelease: false
|
131
|
-
version_requirements: *
|
136
|
+
version_requirements: *id011
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: mimic
|
139
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.3.0
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: *id012
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: weary
|
150
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: "0"
|
156
|
+
type: :development
|
157
|
+
prerelease: false
|
158
|
+
version_requirements: *id013
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: right_aws
|
161
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: "0"
|
167
|
+
type: :development
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: *id014
|
170
|
+
- !ruby/object:Gem::Dependency
|
171
|
+
name: tumblr-rb
|
172
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
173
|
+
none: false
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: "0"
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: *id015
|
132
181
|
description: Monkeypatching Net::HTTP to use em-http-request under the hood.
|
133
182
|
email: james@netlagoon.com
|
134
183
|
executables: []
|
@@ -140,7 +189,6 @@ extra_rdoc_files:
|
|
140
189
|
- README.md
|
141
190
|
files:
|
142
191
|
- .document
|
143
|
-
- .gitignore
|
144
192
|
- Gemfile
|
145
193
|
- LICENSE
|
146
194
|
- README.md
|
@@ -152,6 +200,7 @@ files:
|
|
152
200
|
- lib/test.rb
|
153
201
|
- lib/test_weary.rb
|
154
202
|
- spec/em-net-http_spec.rb
|
203
|
+
- spec/image.jpg
|
155
204
|
- spec/spec.opts
|
156
205
|
- spec/spec_helper.rb
|
157
206
|
has_rdoc: true
|
@@ -159,8 +208,8 @@ homepage: http://github.com/jfairbairn/em-net-http
|
|
159
208
|
licenses: []
|
160
209
|
|
161
210
|
post_install_message:
|
162
|
-
rdoc_options:
|
163
|
-
|
211
|
+
rdoc_options: []
|
212
|
+
|
164
213
|
require_paths:
|
165
214
|
- lib
|
166
215
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -168,22 +217,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
217
|
requirements:
|
169
218
|
- - ">="
|
170
219
|
- !ruby/object:Gem::Version
|
171
|
-
hash: -390204610589570680
|
172
|
-
segments:
|
173
|
-
- 0
|
174
220
|
version: "0"
|
175
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
222
|
none: false
|
177
223
|
requirements:
|
178
224
|
- - ">="
|
179
225
|
- !ruby/object:Gem::Version
|
180
|
-
segments:
|
181
|
-
- 0
|
182
226
|
version: "0"
|
183
227
|
requirements: []
|
184
228
|
|
185
229
|
rubyforge_project:
|
186
|
-
rubygems_version: 1.
|
230
|
+
rubygems_version: 1.5.0
|
187
231
|
signing_key:
|
188
232
|
specification_version: 3
|
189
233
|
summary: Non-blocking replacement for Net::HTTP, for use in EventMachine
|
data/.gitignore
DELETED