mlb_gameday 0.1.6 → 0.1.7

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
2
  SHA1:
3
- metadata.gz: d319478cdfbad1583047a57c5f0ff2c330934025
4
- data.tar.gz: 979d08035e4b307ce5e1c9f04e261c9197aaa192
3
+ metadata.gz: 8b76b4b0b9d0de823f43ad85fefb9e4f6e6c5b13
4
+ data.tar.gz: 2e59be9da631d4642e1a49d1c821a56b345c827a
5
5
  SHA512:
6
- metadata.gz: dd97135fb7495acc98db9fcaf79f750ea634c8b6fed4f6a4d5169a6108075481504a51bdd617317f3738ee6f3326b1e7839efd32198bef135526173b7c11bfac
7
- data.tar.gz: 1a5faaed83dc8bcf38124e706a82ccba8b3f873a5f9ed50fd20b7244f724d6ba4810a37b71a3456902122c67d73af886c6668f564a88e44c32141a44e2ad5a06
6
+ metadata.gz: 74aad1463f619a9c511e8324ce55ac7347be6b1d9a58891108d949bff89300b14d75de809ea01559a6acf58976cf4c4d0a0047395459529034fa8243edc2d023
7
+ data.tar.gz: 5cedc4a127fad4ab1d3c12b6181bcbfdfbaf7a0f99178281c43050efea38794c406877a58fce91ad11d008c184216cb08eca32c68f0f54d9b9426935794ce823
@@ -13,8 +13,13 @@ module MLBGameday
13
13
  @gamecenter = gamecenter
14
14
  @boxscore = boxscore
15
15
 
16
- @home_team = @api.team linescore.xpath('//game/@home_name_abbrev').text
17
- @away_team = @api.team linescore.xpath('//game/@away_name_abbrev').text
16
+ if linescore
17
+ @home_team = @api.team linescore.xpath('//game/@home_name_abbrev').text
18
+ @away_team = @api.team linescore.xpath('//game/@away_name_abbrev').text
19
+ else
20
+ @home_team = @api.team gamecenter.xpath('//game/@id').text[18, 6]
21
+ @away_team = @api.team gamecenter.xpath('//game/@id').text[11, 6]
22
+ end
18
23
  end
19
24
 
20
25
  def teams
@@ -22,7 +27,9 @@ module MLBGameday
22
27
  end
23
28
 
24
29
  def venue
25
- @linescore.xpath('//game/@venue').text
30
+ return @linescore.xpath('//game/@venue').text if @linescore
31
+
32
+ @gamecenter.xpath('//game/venueShort').text
26
33
  end
27
34
 
28
35
  def home_start_time(ampm: true)
@@ -1,3 +1,3 @@
1
1
  module MLBGameday
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
data/resources/data.yml CHANGED
@@ -15,6 +15,7 @@
15
15
  code: BAL
16
16
  file_code: bal
17
17
  id: 110
18
+ alt_names: [balmlb]
18
19
  :BOS: !ruby/object:MLBGameday::Team
19
20
  name: Red Sox
20
21
  city: Boston
@@ -23,8 +24,7 @@
23
24
  code: BOS
24
25
  file_code: bos
25
26
  id: 111
26
- alt_names:
27
- - bosox
27
+ alt_names: [bosox, bosmlb]
28
28
  :NYY: !ruby/object:MLBGameday::Team
29
29
  name: Yankees
30
30
  city: New York
@@ -35,6 +35,7 @@
35
35
  id: 147
36
36
  alt_names:
37
37
  - new york yankee
38
+ - nyamlb
38
39
  :TB: !ruby/object:MLBGameday::Team
39
40
  name: Rays
40
41
  city: Tampa Bay
@@ -47,6 +48,7 @@
47
48
  - devil rays
48
49
  - devil ray
49
50
  - tampa
51
+ - tbamlb
50
52
  :TOR: !ruby/object:MLBGameday::Team
51
53
  name: Blue Jays
52
54
  city: Toronto
@@ -59,6 +61,7 @@
59
61
  - bluejay
60
62
  - jays
61
63
  - jay
64
+ - tormlb
62
65
  :Central: &alcentral !ruby/object:MLBGameday::Division
63
66
  name: Central
64
67
  league: *al
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mlb_gameday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Hoffman