sports_data_api 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e5e93f381c616ef9ff64c811f387feff83cc7906
4
- data.tar.gz: be5bba5bb5537373623d429a764d474545db9df7
2
+ SHA256:
3
+ metadata.gz: 6ae5faea8a0a8e130100724deb7335333238cb7114658d4fe0dfee932d7cfe2c
4
+ data.tar.gz: 52dfa6d4f6d1cf10a88c03e1ae40965fe3f86c349aa534c2e27466bd94dd5dc1
5
5
  SHA512:
6
- metadata.gz: d94b2a7cb477a33ea8004f0ca8bb6fb79f03e4a5720ab19e40ffc8f7f40506c5fc034450afdbb16c7f051cc4dda12164a1c84746c4a01e53bb17dbf26d0b6acf
7
- data.tar.gz: 716dda446a8975d6a22ed1be93025356471f4e99ef50132562fc7b8924ddb2c3fcfcad5b1352b621288d4304acbe3bed57fbc444d49bf624e4db52afcace7aac
6
+ metadata.gz: 57ec288babdaf8e2cbee4fff543af9f539c29b66073d31d4676b6277868f7c74bddc47f7faa1801b945ebd206678de0f374ba02d2edcb124c85784bded052aec
7
+ data.tar.gz: a6d8d2cef91f37d6140da90c94c3c112795a1ad0c7c66ee3f85bb9875c47bc3c0f71e9929d08831a1cac319cc9929e2a5ff56f7c09d354669fecb5e1d1650b7b
data/.travis.yml CHANGED
@@ -1,12 +1,22 @@
1
1
  language: ruby
2
- before_install: gem install bundler && bundler -v
2
+
3
3
  rvm:
4
4
  - 2.2
5
5
  - 2.3
6
6
  - 2.4
7
7
  - 2.5
8
- addons:
9
- code_climate:
10
- repo_token: a3efbc440cb5027fc10a3cfa845aab934cf8c48c27fa0b2ff34855933245aca1
11
- after_success:
12
- - bundle exec codeclimate-test-reporter
8
+
9
+ env:
10
+ global:
11
+ - CC_TEST_REPORTER_ID=a3efbc440cb5027fc10a3cfa845aab934cf8c48c27fa0b2ff34855933245aca1
12
+
13
+ before_script:
14
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
15
+ - chmod +x ./cc-test-reporter
16
+ - ./cc-test-reporter before-build
17
+
18
+ script:
19
+ - bundle exec rspec --format progress
20
+
21
+ after_script:
22
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.14.1
4
+
5
+ * [#90](https://github.com/RLovelett/sports_data_api/pull/90) [FIX] NHL Player was not parsing goaltending stats
6
+
3
7
  ## v0.14.0
4
8
 
5
9
  * [#88](https://github.com/RLovelett/sports_data_api/pull/88) Change SportsDataApi::Exception => SportsDataApi::Error
@@ -1,9 +1,21 @@
1
1
  module SportsDataApi
2
2
  module Nhl
3
3
  class Player < SportsDataApi::JsonData
4
+ GOALIE_POSITION = 'G'.freeze
5
+
4
6
  def stats
5
- return if player[:statistics].nil? || player[:statistics].empty?
6
- @stats ||= SportsDataApi::MergedStats.new(player[:statistics])
7
+ return if player[stats_key].nil? || player[stats_key].empty?
8
+ @stats ||= SportsDataApi::MergedStats.new(player[stats_key])
9
+ end
10
+
11
+ def goalie?
12
+ player[:primary_position] == GOALIE_POSITION
13
+ end
14
+
15
+ private
16
+
17
+ def stats_key
18
+ goalie? ? :goaltending : :statistics
7
19
  end
8
20
  end
9
21
  end
@@ -1,3 +1,3 @@
1
1
  module SportsDataApi
2
- VERSION = '0.14.0'
2
+ VERSION = '0.14.1'
3
3
  end