mlb_gameday 0.2.0 → 0.2.1

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: ffc7edac538b2d044423bf79f8a6212cbc149fd4
4
- data.tar.gz: b3d1fcc715b2c8fa71ee72718161336803f0a8e8
3
+ metadata.gz: a62502a24c79fdfd9b04f5ad9a33fc8661380a6b
4
+ data.tar.gz: 3a7999487c46b3142490f8647ca3a0a72cc8d171
5
5
  SHA512:
6
- metadata.gz: 2240a4e97e7a6797d3370e60a57bfdb0c6c0792febf959555062dd328cd0f0dee0c821b2a43e19e0cbda1204103bc5c568d2559d0edb5d8ba02c55ae3d1f157c
7
- data.tar.gz: 2b95fe77dc317cf0a63c95cd8f6efd3773a208337bb26c5774b905bcfeaa68773a70e9c22ae4e05464b43fc26ec866fc3b2dda5b827c3e6d763b8668dd1eb465
6
+ metadata.gz: e6340b07738718b875ec7206ae33293b839110412bf016425b751a728de5d548f7ca347e18487e3661ecacb57d22fd0fb53eaf44aa8ddde7513df4abc4d6ba73
7
+ data.tar.gz: ba810b9de273e341955ea69e981ca47a90ffcacf737a2d816877e9818b4b257c2a41230047ac043496c07a0ba355c8dcd78848b04f85fdcbf3fe34438ceae7b3
@@ -13,8 +13,13 @@ module MLBGameday
13
13
 
14
14
  @files = files
15
15
 
16
- @home_team = @api.team files[:linescore].xpath('//game/@home_team_name').text
17
- @away_team = @api.team files[:linescore].xpath('//game/@away_team_name').text
16
+ if files[:linescore]
17
+ @home_team = @api.team files[:linescore].xpath('//game/@home_name_abbrev').text
18
+ @away_team = @api.team files[:linescore].xpath('//game/@away_name_abbrev').text
19
+ else
20
+ @home_team = @api.team files[:gamecenter].xpath('//game/@id').text[18, 6]
21
+ @away_team = @api.team files[:gamecenter].xpath('//game/@id').text[11, 6]
22
+ end
18
23
  end
19
24
 
20
25
  def teams
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MLBGameday
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mlb_gameday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Hoffman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-20 00:00:00.000000000 Z
11
+ date: 2017-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler