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 +4 -4
- data/lib/soda_xml_team/schedule.rb +5 -1
- data/lib/soda_xml_team/version.rb +1 -1
- data/spec/soda_xml_team_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd369df063969052f74a54334201c7ba03a42a3b
|
4
|
+
data.tar.gz: bcc9a62ffc0c03a8eee863a0ffd548a3f937bb6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/spec/soda_xml_team_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|