em-net-http 0.2.4 → 0.2.5
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/VERSION +1 -1
- data/em-net-http.gemspec +1 -1
- data/lib/em-net-http.rb +9 -0
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.5
|
data/em-net-http.gemspec
CHANGED
data/lib/em-net-http.rb
CHANGED
|
@@ -78,6 +78,15 @@ module Net
|
|
|
78
78
|
class HTTP
|
|
79
79
|
alias_method :orig_net_http_request, :request
|
|
80
80
|
|
|
81
|
+
alias_method :orig_net_http_do_start, :do_start
|
|
82
|
+
|
|
83
|
+
def do_start
|
|
84
|
+
|
|
85
|
+
return orig_net_http_do_start unless ::EM.reactor_running?
|
|
86
|
+
|
|
87
|
+
@started = true
|
|
88
|
+
end
|
|
89
|
+
|
|
81
90
|
def request(req, body = nil, &block)
|
|
82
91
|
|
|
83
92
|
return orig_net_http_request(req, body, &block) unless ::EM.reactor_running?
|
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
|
+
- 5
|
|
9
|
+
version: 0.2.5
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- James Fairbairn
|
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
168
168
|
requirements:
|
|
169
169
|
- - ">="
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
|
-
hash:
|
|
171
|
+
hash: -390204610589570680
|
|
172
172
|
segments:
|
|
173
173
|
- 0
|
|
174
174
|
version: "0"
|