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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameon-points/base.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a69cf3636ad3310c50692cb800df7353aeeb262b
4
- data.tar.gz: 84faf2010832df07c8ff7c7445d1b6803821b5ed
3
+ metadata.gz: 4693cce8dec6093e4340a9a5800c23f4b121a88a
4
+ data.tar.gz: 61410b74c113623ade6927b44ff6946ae378979c
5
5
  SHA512:
6
- metadata.gz: 2aad6f58066e444b85c9a1e3bb5c87dc35eeba9727f8c63e68d6740f5594e7de1647d1e7fe66d6aa522c31161192614f5052de5cf531b4d55f9c093f47972aa3
7
- data.tar.gz: 9d2b7c9b68efc2686b814f5a905165831c143be00026bb34e8004cacd6b0d353890c5c74129f4a839b9f16974857adc338ca65ecc0f8a94d9cc2b451c05f030c
6
+ metadata.gz: 8181effd1a11cb372c8fcd2d956cadb508f7b814abcf126a1a63d79ad1283b3173a7c451d70da157542c9e3fad62a20df6c6a6a91e54cd4bb263ed09056bbf23
7
+ data.tar.gz: 0924c8b489c3c97673e1c6dc668b89f2918056f7150b44d7efdb514e1f0329678f2f7e8cd98b30547341288cb7605c9d643e7b9feb4133b491d079961f0e24a9
@@ -24,10 +24,10 @@ module GameOn
24
24
  @params = params
25
25
  end
26
26
  def call(env)
27
- if @params.has_key?(:add) && !@params.nil?
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) && !@params.nil?
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
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.pre5
4
+ version: 0.0.0.pre6
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy