gameon-redis 0.0.0.pre31 → 0.0.0.pre32

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-redis/base.rb +4 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 535f9341aec0b21e9b1ba5f84e553829dcc55258
4
- data.tar.gz: 2226ad5e3b8f1ea6671cd83efb61af56ba3412e4
3
+ metadata.gz: 9db23c0262baaa62a1fa68b91a0d20e1e43169fc
4
+ data.tar.gz: f00551f574eead90b713974325552b79c1dabd75
5
5
  SHA512:
6
- metadata.gz: 86287b1b41dbd0ed7b692e1ba5f27115a39839686870db43b34c419263daa322d6981c25172c2b16579922cb82cd92fa81e4dc57c862314f7c6c82f07b874e2d
7
- data.tar.gz: 3e428c70c0bf1ca8dd01efba76f4648de5037800f73a2ddf8d1d58b881e56420d186bfc8eb5a37165b542e5f88dd5f54787b4c25934da3e1269ca5468c31d2de
6
+ metadata.gz: 81b3842302ffbc977040c4e9d813dd3cb0745d56d4074223f99ab56191d2adc410d6503210dc2861c934eb43a1929223f238269ca974ff1be12297361f1f253e
7
+ data.tar.gz: a4b73c1fe19aa7cb347ce6e18184f18c2824c9b3eab92eff9f002dfef29b8da8da8e330282544ff8bf2547c6c3d9902ef6c9d101000d26037b1fd4a78f3b17b9
@@ -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 !id.nil? && (@@redis.get id) && (Marshal.load @@redis.get id)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameon-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre31
4
+ version: 0.0.0.pre32
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy