soda_xml_team 1.0.7 → 1.0.8

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: 1349ccb613b09ee152716d7e5dab5b60e47e963d
4
- data.tar.gz: df2b7f516ecab65cc1d62fa611bf6ff15d1101e6
3
+ metadata.gz: dd369df063969052f74a54334201c7ba03a42a3b
4
+ data.tar.gz: bcc9a62ffc0c03a8eee863a0ffd548a3f937bb6c
5
5
  SHA512:
6
- metadata.gz: 952d7cd6e69f57d2f7cb9b3f20024f63d75d5bd3717c831be107cb49950c2017f8b1917b2eed0bd72e1f4611e450b678933bca2962b1dad3ac09af10057ae5e3
7
- data.tar.gz: 0545cd1b66ad23d16a896462492d6b3a3a69a4adb3d81e3add30cba4d5c5df69659381e32a772feafc7ce6161f20e11e2682b1b0fad21aae5333313eecd33b98
6
+ metadata.gz: 920b62776eb519efbae2fb0ac70666df56e9088aa37d0587c9fb25614075a085f748c9cbfaef4bff167aad400075c97ec22045628c156a97cfeb8883d28ea486
7
+ data.tar.gz: ced2bb9b28e85bcaea8eef6a31eca2f1d678941b272225e36fa6950fb52f37da180fb5e528e2e051fd2068b3b93e5b1063496993c4602e435a24617cd9a8cddf
@@ -18,7 +18,11 @@ module SodaXmlTeam
18
18
 
19
19
  event.css('event-metadata').each do |eventmeta|
20
20
  row[:event_key] = eventmeta['event-key']
21
- row[:start_date_time] = eventmeta['start-date-time']
21
+ row[:start_date_time] = DateTime.parse(eventmeta['start-date-time'])
22
+ row[:time_certainty] = eventmeta['time-certainty']
23
+ eventmeta.css('site name').each do |sitemeta|
24
+ row[:site] = sitemeta['full']
25
+ end
22
26
  end
23
27
  event.css('team team-metadata[alignment="away"]').each do |away_team|
24
28
  team_name = away_team.css('name').first
@@ -1,3 +1,3 @@
1
1
  module SodaXmlTeam
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -68,5 +68,25 @@ describe SodaXmlTeam do
68
68
  expect(output.length).to eq 82
69
69
  end
70
70
 
71
+ it 'has expected home team' do
72
+ expect(output[1][:home_team]).to eq 'Nashville Predators'
73
+ end
74
+
75
+ it 'has expected away team' do
76
+ expect(output[1][:away_team]).to eq 'Colorado Avalanche'
77
+ end
78
+
79
+ it 'has expected start date/time' do
80
+ expect(output[1][:start_date_time]).to eq DateTime.parse('October 8, 2009 7:00 PM CDT')
81
+ end
82
+
83
+ it 'has expected site' do
84
+ expect(output[1][:site]).to eq 'Sommet Center'
85
+ end
86
+
87
+ it 'has expected time certainty' do
88
+ expect(output[1][:time_certainty]).to eq 'certain'
89
+ end
90
+
71
91
  end
72
92
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soda_xml_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Yeargin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-21 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler