gamer_stats 0.2.1 → 0.2.2

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTM4MWUwYmVkZDk4ZTUwMzJkNzA2OGZmYmU1MjI5MTFhMmFkMjdhZQ==
4
+ ODc3MjcyNzM2YzQ5YzgxZTE3ZWFjMTk0MjlhZGUyN2E4NGJiZDVmNA==
5
5
  data.tar.gz: !binary |-
6
- MjE5MmViY2U0YTdmMzJjM2NlMDM0NWU2ZGQ5Y2QwZTdiNTIzOGNlZg==
6
+ YWIzOWY4YjFmZDBkMzEzYWFlNTIzMjc5NTg0MGQ5YjZhYzdlYjk1MQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTI1ZTRhYmUyZmJjMDY2NDEzN2ZiMjg2ZWQyMjZjYTQzYzUwMjU4OGRiNDJi
10
- NzRjM2FkNmE4ODk4ODNkY2UzMjhmNTUyNGUyMmFjMzJkNWIzMTQyYzNiZTJm
11
- MmY0MTcxNWQ1YjNhNWVkZTZmMWFhOWZiNmFhMzEzMDM3NzY3MmY=
9
+ ZTk0OTMxNWNhZjgwOGFlMDYzM2M5MjBlMDkxZDEwMzIzMDU1NzVjZGQwZDg4
10
+ NWU2ODdmNTczN2VhNDAyY2Q5OWVmODFkY2EyOWNhNTMxZDcxYjcxNWU3Y2Y5
11
+ MDQzYTFkNDNmOTNmZjRjNTY4YWRkNWZkYjA1OTNmZDlhZTRhMGU=
12
12
  data.tar.gz: !binary |-
13
- ZDYxNzA0ZTM1ODA5NjNkMTMzMDMwMTUzY2ZmMThlZjA5OTQzMWIwYmM3Zjc2
14
- OTA5MzAxNWQ1NTEzN2M5NWRkNzU0Nzg5YjFkMTJkMDczZjUwMzFhN2FjY2Mw
15
- ODZmYzViN2JiY2E5OTVhZDRkZWQxNWE3MjU4YjY0Yjg4MTcxYzE=
13
+ M2I1MGU0ZmYzZThhZThiNTRmOWZhYTBiODhmYmFmODFiOWY3ZWM1MmU1ZDBl
14
+ NjY2ZmY0MzJkYWUyZTA2M2Q4ZDg4NWI5NjFkY2I1YjE2ZGJiOWI4MGM4YTQ2
15
+ MWE4YzhiYzY4MjgxM2ZkNWViNzYzYTNmMTQ2ODk5MGJjMTI0NmM=
data/lib/bf3/bf3.rb CHANGED
@@ -38,7 +38,7 @@ module GamerStats
38
38
 
39
39
  def kdr
40
40
  load
41
- return get_current('global/kills').to_f / get_current('global/kills')
41
+ return get_current('stats/global/kills').to_f / get_current('stats/global/deaths')
42
42
  end
43
43
 
44
44
  private
@@ -48,7 +48,7 @@ module GamerStats
48
48
  false if val.nil? or val.empty?
49
49
  end
50
50
 
51
- def get_current(path)
51
+ def get_current(path='')
52
52
  @player.deep_dup.path(path)
53
53
  end
54
54
 
@@ -1,3 +1,3 @@
1
1
  module GamerStats
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/test/bf3_test.rb CHANGED
@@ -24,7 +24,7 @@ describe Bf3::Player do
24
24
 
25
25
  it 'should have some global stats' do
26
26
  player.load('clear,global')
27
- player.current['global'].wont_be_nil
27
+ player.current['stats']['global'].wont_be_nil
28
28
  end
29
29
  end
30
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamer_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SeriousM - Bernhard Millauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-03 00:00:00.000000000 Z
11
+ date: 2013-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler