gameon 0.0.0.pre61 → 0.0.0.pre62

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 +22 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 811f5d0f4eec0ecae97e93286d03be3a047099de
4
- data.tar.gz: 22917418ad4b673301414f2cf0c2d4d9001f7a33
3
+ metadata.gz: 878ad3632ba39992f2e4c9d502d5e15268afc1d4
4
+ data.tar.gz: fb5d525abff0ba3397897a8871369372a2954a18
5
5
  SHA512:
6
- metadata.gz: 76089123cab45bf7c6c5e3db708985803245261ce5a362218acf45e33e9f9a95e6d118dfc8ecd72eb28b8611ac780f6baec2c1f1384c310a520ae503d7711533
7
- data.tar.gz: d91d7692aa291592d2e78163f46859397e62cef7b97c22a60e307482c2f3594c3ee265cd969c10626b02ea6cced4e837881c0f7077cee5653f4d7dd7b896b149
6
+ metadata.gz: b168afdf9a514c6ae91f0d1dba9a3fcf302c5d5e58cb14aa51e28e850dcca458a8f310bf03441b85473cc4379f42961b0b44135c53cdede5f973ade50ffb13b5
7
+ data.tar.gz: 353def210a4ca3962ebe9b177afc5e91c0ed1346b40976d289427a721c55427554524e9b687a2afc173c267c0e296a9cd1e145f78225add865877d3779660314
data/lib/gameon/base.rb CHANGED
@@ -22,7 +22,7 @@ module GameOn
22
22
  Mushin::DSL.middlewares
23
23
  end
24
24
  end
25
-
25
+ =begin
26
26
  module Engine
27
27
  extend Mushin::Engine
28
28
  attr_accessor :middlewares, :stack
@@ -41,8 +41,27 @@ module GameOn
41
41
  @@middlewares = []
42
42
  end
43
43
  end
44
-
45
- #module Env
44
+ =end
45
+ module Engine
46
+ extend Mushin::Engine
47
+ class << self
48
+ attr_accessor :middlewares, :stack
49
+ def run domain_context, activity
50
+ @middlewares = GameOn::DSL.find domain_context, activity
51
+ @stack = Mushin::Middleware::Builder.new do
52
+ @middlewares.each do |middleware|
53
+ p "Mushin Logging: use #{middleware.name}, #{middleware.opts}, #{middleware.params}"
54
+ use middleware.name, middleware.opts, middleware.params
55
+ end
56
+ end
57
+ @setup_middlewares.each do |setup_middleware|
58
+ @stack.insert_before 0, setup_middleware
59
+ end
60
+ @stack.call
61
+ @middlewares = []
62
+ end
63
+ end
64
+ end
46
65
  class Env
47
66
  extend Mushin::Env
48
67
 
@@ -73,7 +92,6 @@ module GameOn
73
92
  end
74
93
  return GameOn::Persistence::DS.load @id
75
94
  end
76
- alias_method :[], :set
77
95
  end
78
96
  end
79
97
  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.pre61
4
+ version: 0.0.0.pre62
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-28 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: a gamification framework based on mushin
14
14
  email: