gameon 0.0.0.pre102 → 0.0.0.pre103
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 +19 -18
- 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: 5386eb8f1ba77320a1a5a18ca9b409d2dfee426e
|
4
|
+
data.tar.gz: 1e9bb446b16f9e31b573141a0c8029864af3b945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9afeacccb071b7ad3ad0e910034c6d8571ba14530d58b4e16439212b5902cf900d71b0ad3c49d5a9a8cae5c662d4934a9988983e3748f80c24541512c8d97d
|
7
|
+
data.tar.gz: a8cea821838c3e97f3ef46b9f2dcd50605c7a2c67f9a84cf93fc3d9ddca7ebf34e8d32fd438f446b7d8426300a8b98df07e9d472de983bdbf71e906d2ff3a259
|
data/lib/gameon/base.rb
CHANGED
@@ -6,31 +6,32 @@ module GameOn
|
|
6
6
|
|
7
7
|
module DSL
|
8
8
|
include Mushin::DSL
|
9
|
-
|
9
|
+
|
10
|
+
def self.find current_context_title, current_activity_title
|
10
11
|
|
11
12
|
Mushin::DSL.middlewares = [] #could be GameOn::DSL.middlewares
|
12
13
|
|
13
|
-
Mushin::DSL.contexts.each do |
|
14
|
-
if
|
15
|
-
|
16
|
-
if
|
14
|
+
Mushin::DSL.contexts.each do |context|
|
15
|
+
if context.title == current_context_title
|
16
|
+
context.statments.each do |activity|
|
17
|
+
if activity.title == current_activity_title
|
17
18
|
|
18
|
-
|
19
|
-
if Mushin::DSL.middlewares.empty?
|
20
|
-
|
21
|
-
|
22
|
-
else
|
23
|
-
|
24
|
-
if prev.name == middleware.name && prev.opts == middleware.opts && prev.params == middleware.params
|
25
|
-
|
26
|
-
else
|
27
|
-
|
19
|
+
activity.activations.each do |middleware|
|
20
|
+
#if Mushin::DSL.middlewares.empty?
|
21
|
+
# p "adding first middleware !!!"
|
22
|
+
# Mushin::DSL.middlewares << middleware
|
23
|
+
#else
|
24
|
+
# Mushin::DSL.middlewares.each do |prev|
|
25
|
+
#if prev.name == middleware.name && prev.opts == middleware.opts && prev.params == middleware.params
|
26
|
+
# p "this activation already exists nothing to do!!!"
|
27
|
+
#else
|
28
|
+
# p "adding new activation"
|
28
29
|
Mushin::DSL.middlewares << middleware
|
29
30
|
p "$$$$$$$$$$$$$$$$$$$$$$$$$$$"
|
30
31
|
p Mushin::DSL.middlewares
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
32
|
+
#end
|
33
|
+
#end
|
34
|
+
#end
|
34
35
|
|
35
36
|
end
|
36
37
|
end
|