gameon 0.0.0.pre104 → 0.0.0.pre105
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 +18 -15
- 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: 3db3ae7394d8dea8cb37c3777cba63e6b8c5589e
|
4
|
+
data.tar.gz: 6860d168da702bf8a16ee694359149c693b233ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3dac995346953be3c6eebac53713de0823374f42b45d9743d6f0dc7164bf091eb01f0ba6f30f7327c93c169e8d430e3319717827eeeaa8f183704ccf27d77f7
|
7
|
+
data.tar.gz: 391a29264153a631717607299069a3b75636ef88008fbe153a7561ef847ed0fac9723fc8e86cc2bda5cbe546494c221ef6f68ef2426d7b27701293a498e77d57
|
data/lib/gameon/base.rb
CHANGED
@@ -10,30 +10,33 @@ module GameOn
|
|
10
10
|
def self.find current_context_title, current_activity_title
|
11
11
|
|
12
12
|
#Mushin::DSL.middlewares = [] #could be GameOn::DSL.middlewares
|
13
|
-
@middlewares = [] #could be GameOn::DSL.middlewares
|
14
13
|
|
15
14
|
Mushin::DSL.contexts.each do |context|
|
16
15
|
if context.title == current_context_title
|
17
16
|
context.statments.each do |activity|
|
18
17
|
if activity.title == current_activity_title
|
19
|
-
|
18
|
+
|
19
|
+
@@middlewares = []
|
20
20
|
activity.activations.each do |middleware|
|
21
21
|
#if Mushin::DSL.middlewares.empty?
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
if @@middlewares.empty?
|
23
|
+
p "adding first middleware !!!"
|
24
|
+
@@middlewares << middleware
|
25
|
+
# Mushin::DSL.middlewares << middleware
|
26
|
+
else
|
25
27
|
# Mushin::DSL.middlewares.each do |prev|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
@@middlewares.each do |prev|
|
29
|
+
if prev.name == middleware.name && prev.opts == middleware.opts && prev.params == middleware.params
|
30
|
+
p "this activation already exists nothing to do!!!"
|
31
|
+
else
|
32
|
+
p "adding new activation"
|
30
33
|
#Mushin::DSL.middlewares << middleware
|
31
|
-
|
34
|
+
@@middlewares << middleware
|
32
35
|
p "$$$$$$$$$$$$$$$$$$$$$$$$$$$"
|
33
|
-
p Mushin::DSL.middlewares
|
34
|
-
|
35
|
-
|
36
|
-
|
36
|
+
#p Mushin::DSL.middlewares
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
37
40
|
|
38
41
|
end
|
39
42
|
end
|
@@ -42,7 +45,7 @@ module GameOn
|
|
42
45
|
|
43
46
|
end
|
44
47
|
#return Mushin::DSL.middlewares
|
45
|
-
return
|
48
|
+
return @@middlewares
|
46
49
|
#Mushin::DSL.middlewares = []
|
47
50
|
end
|
48
51
|
end
|