gameon-redis 0.0.0.pre20 → 0.0.0.pre21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameon-redis/base.rb +5 -4
- 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: 0d9a0c99d2a6a42f90a6e84d7d93be385185acc2
|
4
|
+
data.tar.gz: 6334bcc2d062206951bfc2100eb03b03303c6fef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0aeff98eff329e1c557526432b2e01e0105803524387763471b2d23ac16a9717a0ce06d45530c33bc5c365c8698b57ad9967ac68a966b74fec44709d985dee
|
7
|
+
data.tar.gz: 56d592272a866317cc7d6d5bb75e99f11961b3bc3b6d3d8a55aaf6660d2b8ae719964134c13539868ffe21150bdd00596b9e5e840b9aabadad1b44be5c4b0696
|
data/lib/gameon-redis/base.rb
CHANGED
@@ -19,7 +19,8 @@ module GameOn
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def call(env)
|
22
|
-
|
22
|
+
p "GameOn::Persistence::DS instance id = #{@id}"
|
23
|
+
if self.exists? @id
|
23
24
|
#if (@@redis.get @id ) && (Marshal.load @@redis.get @id)
|
24
25
|
env[:gameon] = DS.load @id
|
25
26
|
p "resotred #{env[:gameon]}"
|
@@ -29,7 +30,7 @@ module GameOn
|
|
29
30
|
env[:gameon].id = @id
|
30
31
|
end
|
31
32
|
@app.call(env)
|
32
|
-
|
33
|
+
self.store env[:gameon]
|
33
34
|
p "stored #{env[:gameon]}"
|
34
35
|
end
|
35
36
|
|
@@ -45,10 +46,10 @@ module GameOn
|
|
45
46
|
|
46
47
|
def DS.exists? id
|
47
48
|
if (@@redis.get id) && (Marshal.load @@redis.get id)
|
48
|
-
p true
|
49
|
+
p "GameOn::Persistence::DS.exists? true"
|
49
50
|
return true
|
50
51
|
else
|
51
|
-
p false
|
52
|
+
p "GameOn::Persistence::DS.exists? false"
|
52
53
|
return false
|
53
54
|
end
|
54
55
|
end
|