gameon 0.0.0.pre68 → 0.0.0.pre69
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 +13 -16
- 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: 38e549210da171650d67da8607f4a44b48582ea8
|
4
|
+
data.tar.gz: 06f331130b97db7e3f53ff55b0e9df1db0a5683c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a30a7c85f81e9c88b9f9f8af55b7a52b803b46e22cb3c8ac8097f636f44830f901d08228f794e3817ae4b34ec32d5060d83c1a09f82c55fef54bc4f0ca6f12e
|
7
|
+
data.tar.gz: 5c015ca95bf19768b3390730164f4b4b1ea4e3a3b7ef7243080ac5ff06ce16062fccdb6031e224c6655f1d87f8392c386b6a8eec951f4f1baa0c9de44b51ed76
|
data/lib/gameon/base.rb
CHANGED
@@ -49,7 +49,7 @@ module GameOn
|
|
49
49
|
def run domain_context, activity
|
50
50
|
#@middlewares = GameOn::DSL.find domain_context, activity
|
51
51
|
@stack = Mushin::Middleware::Builder.new do
|
52
|
-
|
52
|
+
(GameOn::DSL.find domain_context, activity).each do |middleware|
|
53
53
|
p "GameOn Logging: use #{middleware.name}, #{middleware.opts}, #{middleware.params}"
|
54
54
|
use middleware.name, middleware.opts, middleware.params
|
55
55
|
end
|
@@ -75,25 +75,22 @@ module GameOn
|
|
75
75
|
def set id, &block
|
76
76
|
@id = id.to_s + 'gameon'
|
77
77
|
def on domain_context, &block
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
@activities += [statment]
|
83
|
-
end
|
84
|
-
instance_eval(&block)
|
78
|
+
@domain_context = domain_context
|
79
|
+
@activities = []
|
80
|
+
def activity statment
|
81
|
+
@activities += [statment]
|
85
82
|
end
|
86
83
|
instance_eval(&block)
|
84
|
+
end
|
85
|
+
instance_eval(&block)
|
87
86
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
end
|
93
|
-
return GameOn::Persistence::DS.load @id
|
94
|
-
else
|
95
|
-
"nothing"
|
87
|
+
Dir["./gameon/*"].each {|file| load file }
|
88
|
+
GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
|
89
|
+
@activities.each do |activity|
|
90
|
+
GameOn::Engine.run @domain_context, activity
|
96
91
|
end
|
92
|
+
@activities = [] # reset the activities
|
93
|
+
return GameOn::Persistence::DS.load @id
|
97
94
|
end
|
98
95
|
end
|
99
96
|
end
|