em-http-server 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/em-http-server.gemspec +1 -1
- data/lib/em-http-server/server.rb +6 -0
- metadata +4 -4
data/em-http-server.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
12
|
gem.name = "em-http-server"
|
13
13
|
gem.require_paths = ["lib"]
|
14
|
-
gem.version = "0.1.
|
14
|
+
gem.version = "0.1.2"
|
15
15
|
|
16
16
|
gem.add_runtime_dependency "eventmachine"
|
17
17
|
end
|
@@ -29,6 +29,11 @@ module EventMachine
|
|
29
29
|
if respond_to?(:process_http_request)
|
30
30
|
process_http_request
|
31
31
|
end
|
32
|
+
rescue Exception => e
|
33
|
+
# invoke the method in the user-provided instance
|
34
|
+
if respond_to?(:http_request_errback)
|
35
|
+
http_request_errback
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
# parse the first HTTP header line
|
@@ -60,6 +65,7 @@ module EventMachine
|
|
60
65
|
string << "Detected error: HTTP code #{code}"
|
61
66
|
send_data string
|
62
67
|
close_connection_after_writing
|
68
|
+
raise("server error #{code}")
|
63
69
|
end
|
64
70
|
|
65
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-http-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement: &
|
16
|
+
requirement: &70241007172740 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70241007172740
|
25
25
|
description: Simple http server for eventmachine
|
26
26
|
email:
|
27
27
|
- alberto.ornaghi@gmail.com
|