gameon-points 0.0.0.pre18 → 0.0.0.pre19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77f31643f20ba90644348333d3530e1370de20e4
4
- data.tar.gz: 761bef70c3e05b1ed1a78a1e6873b98ae47a05a1
3
+ metadata.gz: d17b695e6711f1f6a6a106d2c468cda5d246f576
4
+ data.tar.gz: 47940971f56fa7827f4e0b8b0c38b6adf4212131
5
5
  SHA512:
6
- metadata.gz: 303c4119fb48362f0a98c40f321340a056edc579d19e672982af3303bf2871889af74cdc8b478d9be488a0e0139d3926e0136938dca77af729a0ee0d7ac18972
7
- data.tar.gz: 0e41fc5eabbb085e9e437b99509b3dd946cc00e80ce7fef97a2395dccc99d09f0ae0d7f29df0ffda9a83c2aced522cef6d131883973dc8ed1287603f0d9cd5bd
6
+ metadata.gz: ebde8e71c55e4db93aa775d175c342d8d401cc9691b1e79c3b7265b823bf7c07429ea968b196a4c325b01c708b9818856f1adb6b8abd4fcba60996fed703d21b
7
+ data.tar.gz: 40123436f34009ff4a644b55f4cb55872909a63f8db4868a944e4de32f19715cfbcafd9d00bbda61a3e576cc17a5265a273b120df5ff28cb1dc3ca97b18d089b
@@ -1,5 +1,7 @@
1
1
  GameOn::Env.register do
2
2
  attr_accessor :points
3
+ @mutex = Mutex.new
4
+ @mutex.synchronize {
3
5
  def add_points value
4
6
  if @points.nil?
5
7
  @points = value
@@ -9,11 +11,14 @@ GameOn::Env.register do
9
11
  end
10
12
  def remove_points value
11
13
  if @points.nil?
12
- @points = -(value)
14
+ p "- value"
15
+ @points = -value
13
16
  else
14
- @points += -(value)
17
+ p "- points"
18
+ @points -= value
15
19
  end
16
20
  end
21
+ }
17
22
  end
18
23
 
19
24
  module GameOn
data/lib/gameon-points.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'gameon'
2
- require 'gameon-redis'
2
+ require 'gameon-redis' #TODO should be pstore instead as the default and overwritten on the namespace GameOn::Presistance or similar
3
3
 
4
4
  require 'gameon-points/base'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameon-points
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre18
4
+ version: 0.0.0.pre19
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy