gameon 0.0.0.pre69 → 0.0.0.pre70
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 +5 -22
- 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: 32a1bcb32e4303eac8e2e587cee156795c1be6e8
|
4
|
+
data.tar.gz: 3df87c44b701e41925902412d1b128d2429ac1d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7edab5a29720e05b4595e4236ad95bfe2119fec9a94de1ac25cb77740d7bf9b2a83b44548ff63da037f14eb43efc13b568ecfa5558c4f242636a3810c1ad905e
|
7
|
+
data.tar.gz: 9672a848f586dd6ca0b0c8f6caf77f33bfef91ad7b36a8d872f9061d768582e46dfe60b1155e00fc930161805a5b5a92877d3c2dd1d31b528aae3f7f4e4b2892
|
data/lib/gameon/base.rb
CHANGED
@@ -22,26 +22,7 @@ module GameOn
|
|
22
22
|
Mushin::DSL.middlewares
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
26
|
-
module Engine
|
27
|
-
extend Mushin::Engine
|
28
|
-
attr_accessor :middlewares, :stack
|
29
|
-
def self.run domain_context, activity
|
30
|
-
@@middlewares = GameOn::DSL.find domain_context, activity
|
31
|
-
@stack = Mushin::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
|
-
@@middlewares = []
|
42
|
-
end
|
43
|
-
end
|
44
|
-
=end
|
25
|
+
|
45
26
|
module Engine
|
46
27
|
extend Mushin::Engine
|
47
28
|
class << self
|
@@ -62,6 +43,7 @@ module GameOn
|
|
62
43
|
end
|
63
44
|
end
|
64
45
|
end
|
46
|
+
|
65
47
|
class Env
|
66
48
|
extend Mushin::Env
|
67
49
|
|
@@ -78,7 +60,8 @@ module GameOn
|
|
78
60
|
@domain_context = domain_context
|
79
61
|
@activities = []
|
80
62
|
def activity statment
|
81
|
-
@activities
|
63
|
+
@activities << statment
|
64
|
+
#@activities += [statment]
|
82
65
|
end
|
83
66
|
instance_eval(&block)
|
84
67
|
end
|
@@ -89,7 +72,7 @@ module GameOn
|
|
89
72
|
@activities.each do |activity|
|
90
73
|
GameOn::Engine.run @domain_context, activity
|
91
74
|
end
|
92
|
-
|
75
|
+
#@activities = [] # reset the activities
|
93
76
|
return GameOn::Persistence::DS.load @id
|
94
77
|
end
|
95
78
|
end
|