em-midori 0.1.5 → 0.1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/em-midori/configure.rb +1 -0
- data/lib/em-midori/runner.rb +5 -0
- data/lib/em-midori/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3959c8ff30ab0b2e7cec8928e735e1fee122c523
|
4
|
+
data.tar.gz: 895bc19c6ceac8a34b4498f6f900d7d514b681c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c210d5205f733618cc67831e324df45bb4c689cd22fd8023dda6c5f52f40515cc56c6ccf8f6435e3a4fcfea39dab8ea732a06e9f9e76246d34435a568f26bbde
|
7
|
+
data.tar.gz: 970900a6a14f9798e1282c13db98b34aeedbb7c32a8e81f741fc6f634118543c87a2271cd7b7ca2f5385a27c6d27b6d1c164cc98946b6bc970e8f8d289647d96
|
data/lib/em-midori/configure.rb
CHANGED
data/lib/em-midori/runner.rb
CHANGED
@@ -7,6 +7,7 @@ class Midori::Runner
|
|
7
7
|
@logger = configure.logger
|
8
8
|
@bind = configure.bind
|
9
9
|
@port = configure.port
|
10
|
+
@before = configure.before
|
10
11
|
@api = ((api.is_a?Midori::APIEngine) ? api : Midori::APIEngine.new(api, configure.route_type))
|
11
12
|
end
|
12
13
|
|
@@ -24,6 +25,10 @@ class Midori::Runner
|
|
24
25
|
|
25
26
|
EventMachine.set_simultaneous_accept_count(40) unless RUBY_PLATFORM == 'java'
|
26
27
|
EventMachine.run do
|
28
|
+
async :before do
|
29
|
+
@before.call
|
30
|
+
end
|
31
|
+
before
|
27
32
|
@logger.info "Midori #{Midori::VERSION} is now running on #{bind}:#{port}".blue
|
28
33
|
@server_signature = EventMachine.start_server bind, port, Midori::Server, @api, @logger
|
29
34
|
end
|
data/lib/em-midori/version.rb
CHANGED