sportradar-api 0.11.58 → 0.11.59

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: '0081a0ba4dd2b9c2b8deff3dd10777425436114e'
4
- data.tar.gz: f2f1999e3266856343f45a0a38922e00a4e79da9
3
+ metadata.gz: 2cee5e6615e96e5a453e6c565e9d499ea3cfa0a8
4
+ data.tar.gz: 420209b525ce9c21415ea1eacc662af1658cc042
5
5
  SHA512:
6
- metadata.gz: ca9705f1d3d95e98cb781adcad3c35c7ef4d65a388fbc94fafb982e52e388fa38a55054a42aef8ef955cb56cead15f906ba1a07652cf37179aa568b72198f349
7
- data.tar.gz: ea59f2e985c0ca13ec336581876f0af4ecd7cce9cbd492973ba4cd20151a9ecb0bfa182eeb4d1ff9c1c03418820b269ffc3f419e6ab1dd1c18f993d03f1005f1
6
+ metadata.gz: 4a2c44c5896eb5af865b682f9f0796b005ec6f220d22a62151acc97514c7269b75a9f148ac0977deac1e09b0713b78577183fbc01f9a3e73fdf19d30d2a2eb14
7
+ data.tar.gz: eb002e30e983c4eccb46d39c15e11cd3a12ff6b9721de4adbeb8a714364f319007f719777dc5996b30ebbc80e52be011aadd9c831e3e1394f0618f0e1dc20d7d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sportradar-api (0.11.58)
4
+ sportradar-api (0.11.59)
5
5
  activesupport
6
6
  httparty (>= 0.14.0)
7
7
 
@@ -31,7 +31,13 @@ module Sportradar
31
31
  end
32
32
 
33
33
  def end_reason
34
- plays.reverse_each.detect {|pl| !pl.timeout? && pl.play_type != 'penalty' }&.parsed_ending || 'UNKNOWN' # penalty on TD play, assessed on kickoff
34
+ ending = plays.reverse_each.detect {|pl| !pl.timeout? && pl.play_type != 'penalty' }&.parsed_ending
35
+ last_play = plays.reverse_each.detect {|pl| !pl.timeout? }
36
+ ending ||= if last_play.down == 4 && last_play.yards < last_play.yfd
37
+ 'Downs'
38
+ else
39
+ 'UNKNOWN'
40
+ end
35
41
  end
36
42
 
37
43
  def first_downs
@@ -1,5 +1,5 @@
1
1
  module Sportradar
2
2
  module Api
3
- VERSION = "0.11.58"
3
+ VERSION = "0.11.59"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportradar-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.58
4
+ version: 0.11.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett