gameon-redis 0.0.0.pre31 → 0.0.0.pre32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gameon-redis/base.rb +4 -11
- 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: 9db23c0262baaa62a1fa68b91a0d20e1e43169fc
|
4
|
+
data.tar.gz: f00551f574eead90b713974325552b79c1dabd75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81b3842302ffbc977040c4e9d813dd3cb0745d56d4074223f99ab56191d2adc410d6503210dc2861c934eb43a1929223f238269ca974ff1be12297361f1f253e
|
7
|
+
data.tar.gz: a4b73c1fe19aa7cb347ce6e18184f18c2824c9b3eab92eff9f002dfef29b8da8da8e330282544ff8bf2547c6c3d9902ef6c9d101000d26037b1fd4a78f3b17b9
|
data/lib/gameon-redis/base.rb
CHANGED
@@ -20,23 +20,16 @@ module GameOn
|
|
20
20
|
@id = GameOn::Env.id.to_s + 'gameon'
|
21
21
|
end
|
22
22
|
|
23
|
-
#def initialize(app)
|
24
|
-
#@@app = app
|
25
|
-
#@id = GameOn::Env.id.to_s + 'gameon'
|
26
|
-
#@id = GameOn::Env.new.id.to_s + 'gameon'
|
27
|
-
#@id = GameOn::Env.new.id.to_s + 'gameon'
|
28
|
-
#end
|
29
|
-
|
30
23
|
def call(env)
|
31
24
|
p "GameOn::Persistence::DS instance id = #{@id}"
|
32
25
|
if exists? @id
|
33
|
-
#if (@@redis.get @id ) && (Marshal.load @@redis.get @id)
|
34
26
|
env[:gameon] = DS.load @id
|
35
27
|
p "resotred #{env[:gameon]}"
|
36
28
|
else
|
37
29
|
p 'new obj from GameOn::Env class '
|
38
30
|
env[:gameon] = GameOn::Env.new
|
39
31
|
env[:gameon].id = @id
|
32
|
+
p "env[:gameon].id equals #{env[:gameon].id}"
|
40
33
|
end
|
41
34
|
@app.call(env)
|
42
35
|
DS.store env[:gameon]
|
@@ -51,8 +44,8 @@ module GameOn
|
|
51
44
|
# code that deals with some exception
|
52
45
|
#rescue SomeOtherException => some_other_variable
|
53
46
|
# code that deals with some other exception
|
54
|
-
else
|
55
|
-
return false
|
47
|
+
#else
|
48
|
+
# return false
|
56
49
|
# code that runs only if *no* exception was raised
|
57
50
|
ensure
|
58
51
|
p "storing GameOn Env #{obj}"
|
@@ -66,7 +59,7 @@ module GameOn
|
|
66
59
|
end
|
67
60
|
|
68
61
|
def exists? id
|
69
|
-
if
|
62
|
+
if (@@redis.get id) && (Marshal.load @@redis.get id)
|
70
63
|
p "GameOn::Persistence::DS.exists? true"
|
71
64
|
return true
|
72
65
|
else
|