em-net-http 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/em-net-http.gemspec +2 -3
- data/lib/em-net-http.rb +6 -1
- metadata +6 -29
- data/bin/autospec +0 -14
- data/bin/edit_json.rb +0 -14
- data/bin/htmldiff +0 -14
- data/bin/jeweler +0 -14
- data/bin/ldiff +0 -14
- data/bin/oauth +0 -14
- data/bin/prettify_json.rb +0 -14
- data/bin/rackup +0 -14
- data/bin/rake +0 -14
- data/bin/rubyforge +0 -14
- data/bin/spec +0 -14
- data/bin/tumblr +0 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/em-net-http.gemspec
CHANGED
@@ -5,14 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{em-net-http}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.4"
|
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{2010-
|
12
|
+
s.date = %q{2010-09-01}
|
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
|
-
s.executables = ["autospec", "edit_json.rb", "htmldiff", "jeweler", "ldiff", "oauth", "prettify_json.rb", "rackup", "rake", "rubyforge", "spec", "tumblr"]
|
16
15
|
s.extra_rdoc_files = [
|
17
16
|
"LICENSE",
|
18
17
|
"README.md"
|
data/lib/em-net-http.rb
CHANGED
@@ -101,6 +101,7 @@ module Net
|
|
101
101
|
|
102
102
|
headers['content-type'] ||= "application/x-www-form-urlencoded"
|
103
103
|
|
104
|
+
t0 = Time.now
|
104
105
|
httpreq = EM::HttpRequest.new(uri).send(req.class::METHOD.downcase.to_sym, opts)
|
105
106
|
|
106
107
|
f=Fiber.current
|
@@ -120,7 +121,11 @@ module Net
|
|
120
121
|
httpreq.callback &convert_em_http_response
|
121
122
|
httpreq.errback {|err|f.resume(:error)}
|
122
123
|
res = Fiber.yield
|
123
|
-
|
124
|
+
if res == :error
|
125
|
+
raise 'EM::HttpRequest error - request timed out' if Time.now - self.read_timeout > t0
|
126
|
+
raise 'EM::HttpRequest error - unknown error'
|
127
|
+
end
|
128
|
+
|
124
129
|
yield res if block_given?
|
125
130
|
res
|
126
131
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 4
|
9
|
+
version: 0.2.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- James Fairbairn
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-09-01 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -131,19 +131,8 @@ dependencies:
|
|
131
131
|
version_requirements: *id008
|
132
132
|
description: Monkeypatching Net::HTTP to use em-http-request under the hood.
|
133
133
|
email: james@netlagoon.com
|
134
|
-
executables:
|
135
|
-
|
136
|
-
- edit_json.rb
|
137
|
-
- htmldiff
|
138
|
-
- jeweler
|
139
|
-
- ldiff
|
140
|
-
- oauth
|
141
|
-
- prettify_json.rb
|
142
|
-
- rackup
|
143
|
-
- rake
|
144
|
-
- rubyforge
|
145
|
-
- spec
|
146
|
-
- tumblr
|
134
|
+
executables: []
|
135
|
+
|
147
136
|
extensions: []
|
148
137
|
|
149
138
|
extra_rdoc_files:
|
@@ -165,18 +154,6 @@ files:
|
|
165
154
|
- spec/em-net-http_spec.rb
|
166
155
|
- spec/spec.opts
|
167
156
|
- spec/spec_helper.rb
|
168
|
-
- bin/autospec
|
169
|
-
- bin/edit_json.rb
|
170
|
-
- bin/htmldiff
|
171
|
-
- bin/jeweler
|
172
|
-
- bin/ldiff
|
173
|
-
- bin/oauth
|
174
|
-
- bin/prettify_json.rb
|
175
|
-
- bin/rackup
|
176
|
-
- bin/rake
|
177
|
-
- bin/rubyforge
|
178
|
-
- bin/spec
|
179
|
-
- bin/tumblr
|
180
157
|
has_rdoc: true
|
181
158
|
homepage: http://github.com/jfairbairn/em-net-http
|
182
159
|
licenses: []
|
@@ -191,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
168
|
requirements:
|
192
169
|
- - ">="
|
193
170
|
- !ruby/object:Gem::Version
|
194
|
-
hash:
|
171
|
+
hash: 624102514265912067
|
195
172
|
segments:
|
196
173
|
- 0
|
197
174
|
version: "0"
|
data/bin/autospec
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'autospec' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('rspec', 'autospec')
|
data/bin/edit_json.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'edit_json.rb' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('json_pure', 'edit_json.rb')
|
data/bin/htmldiff
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'htmldiff' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('diff-lcs', 'htmldiff')
|
data/bin/jeweler
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'jeweler' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('jeweler', 'jeweler')
|
data/bin/ldiff
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'ldiff' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('diff-lcs', 'ldiff')
|
data/bin/oauth
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'oauth' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('oauth', 'oauth')
|
data/bin/prettify_json.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'prettify_json.rb' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('json_pure', 'prettify_json.rb')
|
data/bin/rackup
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rackup' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('rack', 'rackup')
|
data/bin/rake
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rake' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('rake', 'rake')
|
data/bin/rubyforge
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rubyforge' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('rubyforge', 'rubyforge')
|
data/bin/spec
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'spec' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('rspec', 'spec')
|
data/bin/tumblr
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'tumblr' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
|
10
|
-
|
11
|
-
require 'rubygems'
|
12
|
-
require 'bundler/setup'
|
13
|
-
|
14
|
-
load Gem.bin_path('tumblr-rb', 'tumblr')
|