gameon 0.0.0.pre92 → 0.0.0.pre93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameon/base.rb +42 -41
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea96c7f8d12a9e7527fe4b1bb2b35218c76cb965
4
- data.tar.gz: fd0f14bd3bf83f98fb13cf51762bd12f198ebe39
3
+ metadata.gz: e4f5fc15008c80652f4713632adaa23e501de174
4
+ data.tar.gz: 2b58f21e25c6984fb17bc1fd0549bab65bb1b484
5
5
  SHA512:
6
- metadata.gz: 244025142cbc8cdd8c35fef26b0adc8328a6dd6bc9cfc27c24f4c680ca309bc3330c2aec85ea3e07026cc5aabb57d137dc5e4c93ba9e9e01d24e9bf5323c4cc7
7
- data.tar.gz: 9262f67e68e592d5949a3a89f7330ae38eb815755da3dfe6d7133d904aeea6a6e6908a9334e6a64c089788872e60b0d1f5dfd5249dc2e270d539b2da0c5b7364
6
+ metadata.gz: 7b06b85f0774b935df1134579928e7bc4bbf73d8137f4095abcf8eaa1528e940504212f04771efe6daa02e7f6759f34a892c9cdb1d87107afce396b1226d1519
7
+ data.tar.gz: dfc0b228fe393b77a28e56caf883488234945e24a631e35146a31eba64ad46d57d11fde7a59068865553c7e8f56ca302b847545d09b788380eab04361c49fa30
data/lib/gameon/base.rb CHANGED
@@ -25,62 +25,63 @@ module GameOn
25
25
  end
26
26
  end
27
27
  end
28
- p "$$$$$$$$$$$$$$$$$$$$$$$$$$$"
29
- p Mushin::DSL.middlewares
30
- Mushin::DSL.middlewares
31
28
  end
29
+ p "$$$$$$$$$$$$$$$$$$$$$$$$$$$"
30
+ p Mushin::DSL.middlewares
31
+ Mushin::DSL.middlewares
32
32
  end
33
+ end
33
34
 
34
- module Engine
35
- extend Mushin::Engine
36
- class << self
37
- #attr_accessor :middlewares, :stack
38
- def run domain_context, activity
39
- #@middlewares = GameOn::DSL.find domain_context, activity
40
- stack = Mushin::Middleware::Builder.new do
41
- (GameOn::DSL.find domain_context, activity).uniq.each do |middleware|
42
- p "GameOn Logging: use #{middleware.name}, #{middleware.opts}, #{middleware.params}"
43
- use middleware.name, middleware.opts, middleware.params
44
- end
45
- end
46
- @setup_middlewares.each do |setup_middleware|
47
- stack.insert_before 0, setup_middleware
35
+ module Engine
36
+ extend Mushin::Engine
37
+ class << self
38
+ #attr_accessor :middlewares, :stack
39
+ def run domain_context, activity
40
+ #@middlewares = GameOn::DSL.find domain_context, activity
41
+ stack = Mushin::Middleware::Builder.new do
42
+ (GameOn::DSL.find domain_context, activity).uniq.each do |middleware|
43
+ p "GameOn Logging: use #{middleware.name}, #{middleware.opts}, #{middleware.params}"
44
+ use middleware.name, middleware.opts, middleware.params
48
45
  end
49
- stack.call
50
46
  end
47
+ @setup_middlewares.each do |setup_middleware|
48
+ stack.insert_before 0, setup_middleware
49
+ end
50
+ stack.call
51
51
  end
52
52
  end
53
+ end
53
54
 
54
- class Env
55
- extend Mushin::Env
55
+ class Env
56
+ extend Mushin::Env
56
57
 
57
- class << self
58
- attr_accessor :id
58
+ class << self
59
+ attr_accessor :id
59
60
 
60
- def get id
61
- GameOn::Persistence::DS.load id.to_s + 'gameon' #TODO some app key based encryption method
62
- end
61
+ def get id
62
+ GameOn::Persistence::DS.load id.to_s + 'gameon' #TODO some app key based encryption method
63
+ end
63
64
 
64
- def set id, &block
65
- @id = id.to_s + 'gameon'
66
- def on domain_context, &block
67
- @domain_context = domain_context
68
- @activities = []
69
- def activity statment
70
- @activities << statment
71
- end
72
- instance_eval(&block)
65
+ def set id, &block
66
+ @id = id.to_s + 'gameon'
67
+ def on domain_context, &block
68
+ @domain_context = domain_context
69
+ @activities = []
70
+ def activity statment
71
+ @activities << statment
73
72
  end
74
73
  instance_eval(&block)
74
+ end
75
+ instance_eval(&block)
75
76
 
76
- Dir["./gameon/*"].each {|file| load file }
77
- GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
78
- @activities.uniq.each do |activity|
79
- GameOn::Engine.run @domain_context, activity
80
- end
81
- #@activities = [] # reset the activities
82
- return GameOn::Persistence::DS.load @id
77
+ Dir["./gameon/*"].each {|file| load file }
78
+ GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
79
+ @activities.uniq.each do |activity|
80
+ GameOn::Engine.run @domain_context, activity
83
81
  end
82
+ #@activities = [] # reset the activities
83
+ return GameOn::Persistence::DS.load @id
84
84
  end
85
85
  end
86
86
  end
87
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre92
4
+ version: 0.0.0.pre93
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy