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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameon/base.rb +13 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39b6225c2deda67988fe3f9a3232180581e1e899
4
- data.tar.gz: 6dd0784d2812f1f8ed326d51e600837b0472c010
3
+ metadata.gz: 38e549210da171650d67da8607f4a44b48582ea8
4
+ data.tar.gz: 06f331130b97db7e3f53ff55b0e9df1db0a5683c
5
5
  SHA512:
6
- metadata.gz: ada0b66e54a6dadd25f1a6969676633eb3257e6df3da280aeedaf96cbec6653e9c2fbec7eae273d11fbacce158b6ecf56083b539c38ec76303ec5f7a2ab08720
7
- data.tar.gz: 2ba16e71727757ff8258114ce18610eeaaa5aacdeabfad9f2b7b9fa9792bbae64267c06f381fd37960b36700935a15c2f2398413c286fbf97a92cddeb99906d9
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
- (GameOn::DSL.find domain_context, activity).each do |middleware|
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
- if @domain_context.nil? #TODO trying to check if I am accumlating activities
79
- @domain_context = domain_context
80
- @activities = []
81
- def activity statment
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
- Dir["./gameon/*"].each {|file| load file }
89
- GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
90
- @activities.each do |activity|
91
- GameOn::Engine.run @domain_context, activity
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
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.pre68
4
+ version: 0.0.0.pre69
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy