gameon-points 0.0.0.pre5 → 0.0.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameon-points/base.rb +2 -2
- 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: 4693cce8dec6093e4340a9a5800c23f4b121a88a
|
4
|
+
data.tar.gz: 61410b74c113623ade6927b44ff6946ae378979c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8181effd1a11cb372c8fcd2d956cadb508f7b814abcf126a1a63d79ad1283b3173a7c451d70da157542c9e3fad62a20df6c6a6a91e54cd4bb263ed09056bbf23
|
7
|
+
data.tar.gz: 0924c8b489c3c97673e1c6dc668b89f2918056f7150b44d7efdb514e1f0329678f2f7e8cd98b30547341288cb7605c9d643e7b9feb4133b491d079961f0e24a9
|
data/lib/gameon-points/base.rb
CHANGED
@@ -24,10 +24,10 @@ module GameOn
|
|
24
24
|
@params = params
|
25
25
|
end
|
26
26
|
def call(env)
|
27
|
-
if @params.has_key?(:add)
|
27
|
+
if !@params.nil? && @params.has_key?(:add)
|
28
28
|
env[:gameon].add_points(@params[:add] * @opts[:inc_by])
|
29
29
|
end
|
30
|
-
if @params.has_key?(:remove)
|
30
|
+
if !@params.nil? && @params.has_key?(:remove)
|
31
31
|
env[:gameon].remove_points(@params[:remove] * @opts[:dec_by])
|
32
32
|
end
|
33
33
|
@app.call(env) # run the next middleware
|