gameon 0.0.0.pre39 → 0.0.0.pre40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameon/base.rb +14 -0
- 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: de07caf603612cf670819d2769adbbcfaaca1a38
|
4
|
+
data.tar.gz: 709aa7a4ad5802fc782cdf04b4d46a79812a16b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1298adbbdaa80d0a0e6c708408927ff8f956a78c25e14b3ef8e90b96f2784692bc9edde3d930687d8ddebfb6ba6be13d62a1c6e75e6e978aff7cd320ddb203f
|
7
|
+
data.tar.gz: 0860b0a77413e33d28f4ee876d34eb889c983affc588cbdeeaf29c4fa32f376a89d65234cceaa4448c870102059c41a5999cce6d5367d8867b2e98795a38e408
|
data/lib/gameon/base.rb
CHANGED
@@ -25,6 +25,20 @@ module GameOn
|
|
25
25
|
|
26
26
|
module Engine
|
27
27
|
extend Mushin::Engine
|
28
|
+
attr_accessor :middlewares, :stack
|
29
|
+
def self.run domain_context, activity
|
30
|
+
@middlewares = Mushin::DSL.find domain_context, activity
|
31
|
+
@stack = Middleware::Builder.new do
|
32
|
+
@middlewares.each do |middleware|
|
33
|
+
p "Mushin Logging: use #{middleware.name}, #{middleware.opts}, #{middleware.params}"
|
34
|
+
use middleware.name, middleware.opts, middleware.params
|
35
|
+
end
|
36
|
+
end
|
37
|
+
@setup_middlewares.each do |setup_middleware|
|
38
|
+
@stack.insert_before 0, setup_middleware
|
39
|
+
end
|
40
|
+
@stack.call
|
41
|
+
end
|
28
42
|
end
|
29
43
|
|
30
44
|
module Env
|