mlb_gameday 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mlb_gameday/game.rb +5 -3
- data/lib/mlb_gameday/version.rb +1 -1
- data/spec/game_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1302a0dfbd293aa2eb93dff27788c20e54be5941
|
4
|
+
data.tar.gz: db38d4f94573a9a7c2d15bfe61690108fd5768cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c3a6b10ddb05a6a9aee7fed5464dac444ce8f5c57308afb322f54fbc324ebda53ebed4717ac774159d9828fbc4989be7853a3ccba7092b4a30de04d7b3601e6
|
7
|
+
data.tar.gz: 31e57bfcdacb60a371af13c3bdae16826d3a497ea7da29728a34e588f6f0321efe5fb092b2c54af906580400ebf499ba05c9887ffff5615828e5afd1b191c8c9
|
data/lib/mlb_gameday/game.rb
CHANGED
@@ -25,12 +25,14 @@ module MLBGameday
|
|
25
25
|
@linescore.xpath("//game/@venue").first.value
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
return "#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }" if team == @away
|
30
|
-
|
28
|
+
def home_start_time
|
31
29
|
"#{ @linescore.xpath("//game/@home_time").first.value } #{ @linescore.xpath("//game/@home_time_zone").first.value }"
|
32
30
|
end
|
33
31
|
|
32
|
+
def away_start_time
|
33
|
+
"#{ @linescore.xpath("//game/@away_time").first.value } #{ @linescore.xpath("//game/@away_time_zone").first.value }"
|
34
|
+
end
|
35
|
+
|
34
36
|
# Preview, Pre-Game, In Progress, Final
|
35
37
|
def status
|
36
38
|
@status ||= @linescore.xpath("//game/@status").first.value
|
data/lib/mlb_gameday/version.rb
CHANGED
data/spec/game_spec.rb
CHANGED
@@ -27,14 +27,14 @@ describe "An MLB Gameday Game object" do
|
|
27
27
|
it "should start at the correct time for the home team" do
|
28
28
|
game = @games[0]
|
29
29
|
|
30
|
-
expect(game.
|
30
|
+
expect(game.home_start_time).to eq("1:10 PT")
|
31
31
|
end
|
32
32
|
|
33
33
|
# TODO: Pick another game, LA and SF are both Pacific
|
34
34
|
it "should start at the correct time for the away team" do
|
35
35
|
game = @games[0]
|
36
36
|
|
37
|
-
expect(game.
|
37
|
+
expect(game.away_start_time).to eq("1:10 PT")
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should have Clayton Kershaw starting" do
|