gameon 0.0.0.pre29 → 0.0.0.pre30
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 +34 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5013784b5a8d280743f02c1df4e366487a5fa41d
|
4
|
+
data.tar.gz: 6523d4b1e089fb3425b1daf1ccf91b577246cbd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7366d48ea5b5d88add464ced3e108ecd851704853233eb443132fe26fe55f03eaeec59bc36f9281f2eff90966b5b0c04e346a11873d0a87438a3b2659c74ae51
|
7
|
+
data.tar.gz: ec332b1b5522fb4d0282ea481f84a1ec267d5304e107cb32f4e05b6c065409c7b62de581ed7a85a6fe364c2fbfeb1fd70636a507c7704ebdeeb515f00b9c4e47
|
data/lib/gameon/base.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
module GameOn
|
2
2
|
module Gamebook
|
3
|
-
extend Mushin::DSL
|
4
|
-
#Mushin::DSL::Notebook.build [:game], [:rule,:2ndlevelconstruct,[:nested_constructA, :nested_contructB]], [:activate]
|
5
|
-
#Mushin::DSL::Notebook.build 'game', 'rule', 'activate'
|
6
|
-
#TODO As a Framework developer you get to add alias_methods
|
7
|
-
# Example alias_method :ninja, :rule
|
3
|
+
extend Mushin::DSL
|
8
4
|
end
|
9
5
|
|
10
6
|
class Middleware
|
@@ -12,10 +8,40 @@ module GameOn
|
|
12
8
|
end
|
13
9
|
|
14
10
|
class Env < Mushin::Env
|
15
|
-
|
16
|
-
|
17
|
-
def Env.get id
|
11
|
+
@ds = 'GameOn::Persistence::DS'
|
12
|
+
def get id
|
18
13
|
GameOn::Persistence::DS.load id
|
19
14
|
end
|
15
|
+
|
16
|
+
include Mushin::Env
|
17
|
+
|
18
|
+
extend Mushin::DSL
|
19
|
+
extend Mushin::Engine
|
20
|
+
@domain_folder = 'gameon'
|
21
|
+
Dir["./#{@domain_folder}/*"].each {|file| load file }
|
22
|
+
#run
|
23
|
+
def set id, &block
|
24
|
+
yield
|
25
|
+
end
|
26
|
+
|
27
|
+
def set id, &block
|
28
|
+
@id = id
|
29
|
+
def on domain_context, &block
|
30
|
+
@domain_context = domain_context
|
31
|
+
@activities = []
|
32
|
+
def activity statment
|
33
|
+
@activities += [statment]
|
34
|
+
end
|
35
|
+
class_eval(&block)
|
36
|
+
end
|
37
|
+
class_eval(&block)
|
38
|
+
|
39
|
+
Dir["./#{@domain_folder}/*"].each {|file| load file }
|
40
|
+
|
41
|
+
Mushin::Engine.setup [Object.const_get(@@ds)]
|
42
|
+
@activities.each do |activity|
|
43
|
+
Mushin::Engine.run @domain_context, activity
|
44
|
+
end
|
45
|
+
end
|
20
46
|
end
|
21
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gameon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.pre30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- theotherstupidguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a gamification framework based on mushin
|
14
14
|
email:
|