greenmonster 0.5.0 → 1.0.0
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 +7 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/LICENSE.txt +21 -0
- data/README.markdown +11 -28
- data/Rakefile +3 -8
- data/doc/Gemfile.html +6 -24
- data/doc/Greenmonster/Spider.html +47 -258
- data/doc/Greenmonster.html +25 -86
- data/doc/Rakefile.html +10 -25
- data/doc/created.rid +12 -18
- data/doc/index.html +6 -24
- data/doc/js/search_index.js +1 -1
- data/doc/table_of_contents.html +12 -129
- data/greenmonster.gemspec +16 -13
- data/lib/greenmonster/day_spider.rb +61 -0
- data/lib/greenmonster/file_downloader.rb +38 -0
- data/lib/greenmonster/game_spider.rb +100 -0
- data/lib/greenmonster/innings_downloader.rb +41 -0
- data/lib/greenmonster/spider.rb +1 -0
- data/lib/greenmonster/version.rb +2 -2
- data/lib/greenmonster.rb +16 -82
- data/spec/cassettes/aaa/year_2015/month_05/day_09.yml +153 -0
- data/spec/cassettes/gid_2007_10_01_sdnmlb_colmlb_1/innings.yml +135 -0
- data/spec/cassettes/gid_2015_04_18_balmlb_bos_mlb_1/players_xml.yml +292 -0
- data/spec/cassettes/gid_2015_04_18_balmlb_bos_mlb_2/players_xml.yml +46 -0
- data/spec/cassettes/mlb/year_2015/month_04/day_18.yml +170 -0
- data/spec/day_spider_spec.rb +80 -0
- data/spec/file_downloader_spec.rb +51 -0
- data/spec/fixtures/aaa_players.xml +70 -0
- data/spec/fixtures/boxscore.xml +1147 -0
- data/spec/fixtures/inning_all.xml +1 -0
- data/spec/fixtures/inning_hit.xml +1 -0
- data/spec/fixtures/linescore.xml +131 -0
- data/spec/fixtures/players.xml +63 -0
- data/spec/game_spider_spec.rb +116 -0
- data/spec/greenmonster_spec.rb +22 -34
- data/spec/innings_downloader_spec.rb +44 -0
- data/spec/spec_helper.rb +13 -21
- data/spec/support/path_helpers.rb +21 -0
- data/spec/support/vcr.rb +11 -0
- metadata +91 -67
- data/doc/Athlete.html +0 -254
- data/doc/Greenmonster/Generators/InstallGenerator.html +0 -253
- data/doc/Greenmonster/Generators.html +0 -147
- data/doc/Greenmonster/Parser.html +0 -263
- data/doc/Greenmonster/Player.html +0 -236
- data/doc/GreenmonsterPlayerTest.html +0 -199
- data/doc/GreenmonsterSpiderTest.html +0 -668
- data/doc/GreenmonsterTest.html +0 -262
- data/doc/GreenmonsterTraversalTest.html +0 -376
- data/doc/InstallGreenmonster.html +0 -260
- data/doc/TestCreatePlayersFromGamedayXMLGame.html +0 -266
- data/doc/TestParsePlayersFromGamedayXMLFiles.html +0 -307
- data/spec/games/tst/year_2012/month_03/day_27/gid_2012_03_27_aaamlb_aabmlb_1/blank.txt +0 -0
- data/spec/games/tst/year_2012/month_03/day_27/gid_2012_03_27_aaamlb_aabmlb_1_bak/blank.txt +0 -0
- data/spec/games/tst/year_2012/month_03/day_27/not_2012_03_27_aaamlb_aabmlb_1/blank.txt +0 -0
- data/spec/greenmonster/spider_spec.rb +0 -85
@@ -0,0 +1,61 @@
|
|
1
|
+
module Greenmonster
|
2
|
+
class DaySpider
|
3
|
+
def initialize(date:, sport_code: "mlb")
|
4
|
+
@date = date
|
5
|
+
@sport_code = sport_code
|
6
|
+
end
|
7
|
+
|
8
|
+
def pull
|
9
|
+
game_ids_for_date.each do |game_id|
|
10
|
+
Greenmonster::GameSpider.
|
11
|
+
new(sport_code: sport_code, game_id: game_id).
|
12
|
+
pull
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
attr_reader :date, :sport_code
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def date_path
|
23
|
+
"#{sport_code}/year_#{year}/month_#{month}/day_#{day}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def fetch_game_list
|
27
|
+
HTTParty.
|
28
|
+
get("#{Greenmonster::REMOTE_DATA_ROOT}/#{date_path}").
|
29
|
+
response.
|
30
|
+
body
|
31
|
+
end
|
32
|
+
|
33
|
+
def html_links
|
34
|
+
Nokogiri::HTML(fetch_game_list).search("a")
|
35
|
+
end
|
36
|
+
|
37
|
+
def game_links_for_date
|
38
|
+
html_links.select do |link|
|
39
|
+
link.text.strip[0..3] == "gid_"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def game_ids_for_date
|
44
|
+
game_links_for_date.map do |link|
|
45
|
+
link.text.strip.gsub("/", "")
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def year
|
50
|
+
date.strftime("%Y")
|
51
|
+
end
|
52
|
+
|
53
|
+
def month
|
54
|
+
date.strftime("%m")
|
55
|
+
end
|
56
|
+
|
57
|
+
def day
|
58
|
+
date.strftime("%d")
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Greenmonster
|
2
|
+
class FileDownloader
|
3
|
+
def initialize(file_name:, game_path:)
|
4
|
+
@file_name = file_name
|
5
|
+
@game_path = game_path
|
6
|
+
end
|
7
|
+
|
8
|
+
def pull
|
9
|
+
return false if fetch.code != "200"
|
10
|
+
|
11
|
+
write_file
|
12
|
+
end
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
attr_reader :file_name, :game_path
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def fetch
|
21
|
+
@fetch ||= HTTParty.get(remote_path).response
|
22
|
+
end
|
23
|
+
|
24
|
+
def local_path
|
25
|
+
"#{Greenmonster.local_data_location}/games/#{game_path}/#{file_name}"
|
26
|
+
end
|
27
|
+
|
28
|
+
def remote_path
|
29
|
+
"#{Greenmonster::REMOTE_DATA_ROOT}/#{game_path}/#{file_name}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def write_file
|
33
|
+
File.open(local_path, "w") do |file|
|
34
|
+
file.write(fetch.body)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module Greenmonster
|
2
|
+
class GameSpider
|
3
|
+
def initialize(game_id:, sport_code: "mlb")
|
4
|
+
@game_id = game_id
|
5
|
+
@sport_code = sport_code
|
6
|
+
end
|
7
|
+
|
8
|
+
def pull
|
9
|
+
make_folder
|
10
|
+
download_xml
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
attr_reader :game_id, :sport_code
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def make_folder
|
20
|
+
FileUtils.
|
21
|
+
mkdir_p("#{Greenmonster.local_data_location}/games/#{game_path}/inning")
|
22
|
+
end
|
23
|
+
|
24
|
+
def download_xml
|
25
|
+
download_innings
|
26
|
+
download_hit_locations
|
27
|
+
download_boxscore
|
28
|
+
download_linescore
|
29
|
+
download_players
|
30
|
+
end
|
31
|
+
|
32
|
+
def game_path
|
33
|
+
"#{sport_code}/year_#{year}/month_#{month}/day_#{day}/#{game_id}"
|
34
|
+
end
|
35
|
+
|
36
|
+
def download_boxscore
|
37
|
+
Greenmonster::FileDownloader.
|
38
|
+
new(game_path: game_path, file_name: "boxscore.xml").
|
39
|
+
pull
|
40
|
+
end
|
41
|
+
|
42
|
+
def download_hit_locations
|
43
|
+
Greenmonster::FileDownloader.
|
44
|
+
new(game_path: game_path, file_name: "inning/inning_hit.xml").
|
45
|
+
pull
|
46
|
+
end
|
47
|
+
|
48
|
+
def download_innings
|
49
|
+
if year.to_i >= 2008
|
50
|
+
download_all_innings_as_one_file
|
51
|
+
else
|
52
|
+
download_each_inning_file
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def download_all_innings_as_one_file
|
57
|
+
Greenmonster::FileDownloader.
|
58
|
+
new(game_path: game_path, file_name: "inning/inning_all.xml").
|
59
|
+
pull
|
60
|
+
end
|
61
|
+
|
62
|
+
def download_each_inning_file
|
63
|
+
Greenmonster::InningsDownloader.new(game_path: game_path).pull
|
64
|
+
end
|
65
|
+
|
66
|
+
def download_linescore
|
67
|
+
Greenmonster::FileDownloader.
|
68
|
+
new(game_path: game_path, file_name: "linescore.xml").
|
69
|
+
pull
|
70
|
+
end
|
71
|
+
|
72
|
+
def download_players
|
73
|
+
Greenmonster::FileDownloader.
|
74
|
+
new(game_path: game_path, file_name: "players.xml").
|
75
|
+
pull
|
76
|
+
end
|
77
|
+
|
78
|
+
protected
|
79
|
+
|
80
|
+
attr_reader :date, :game_number, :sport_code
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def date_segments
|
85
|
+
@date_segments ||= game_id.split("_")
|
86
|
+
end
|
87
|
+
|
88
|
+
def year
|
89
|
+
@year ||= date_segments[1]
|
90
|
+
end
|
91
|
+
|
92
|
+
def month
|
93
|
+
@month ||= date_segments[2]
|
94
|
+
end
|
95
|
+
|
96
|
+
def day
|
97
|
+
@day ||= date_segments[3]
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Greenmonster
|
2
|
+
class InningsDownloader
|
3
|
+
def initialize(game_path:)
|
4
|
+
@game_path = game_path
|
5
|
+
end
|
6
|
+
|
7
|
+
def pull
|
8
|
+
inning_names.each do |inning_name|
|
9
|
+
Greenmonster::FileDownloader.new(
|
10
|
+
game_path: game_path,
|
11
|
+
file_name: "inning/#{inning_name}"
|
12
|
+
).pull
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
attr_reader :game_path
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def inning_names
|
23
|
+
relevant_links.map do |link|
|
24
|
+
link.text.strip.gsub("/", "")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def innings_listing_html
|
29
|
+
HTTParty.
|
30
|
+
get("#{Greenmonster::REMOTE_DATA_ROOT}/#{game_path}/inning").
|
31
|
+
response.
|
32
|
+
body
|
33
|
+
end
|
34
|
+
|
35
|
+
def relevant_links
|
36
|
+
Nokogiri::HTML(innings_listing_html).search("a").select do |link|
|
37
|
+
link.text =~ /inning_\d+\.xml/
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/greenmonster/spider.rb
CHANGED
data/lib/greenmonster/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Greenmonster
|
2
|
-
VERSION = "0.
|
3
|
-
end
|
2
|
+
VERSION = "1.0.0"
|
3
|
+
end
|
data/lib/greenmonster.rb
CHANGED
@@ -1,91 +1,25 @@
|
|
1
|
-
require "
|
2
|
-
require "
|
3
|
-
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
1
|
+
require "date"
|
2
|
+
require "fileutils"
|
3
|
+
require "httparty"
|
4
|
+
require "nokogiri"
|
5
|
+
require "greenmonster/version"
|
6
|
+
require "greenmonster/file_downloader"
|
7
|
+
require "greenmonster/innings_downloader"
|
8
|
+
require "greenmonster/game_spider"
|
9
|
+
require "greenmonster/day_spider"
|
8
10
|
|
9
11
|
module Greenmonster
|
10
|
-
|
11
|
-
|
12
|
-
@@games_folder = nil
|
13
|
-
|
14
|
-
##
|
15
|
-
# Set the default folder to which games
|
16
|
-
# are saved after being downloaded from
|
17
|
-
# the server.
|
18
|
-
#
|
19
|
-
# Example:
|
20
|
-
# => Greenmonster.set_games_folder("/Users/geoff/game_data")
|
21
|
-
#
|
22
|
-
# Arguments:
|
23
|
-
# location: (String)
|
24
|
-
#
|
25
|
-
|
26
|
-
def self.set_games_folder(location)
|
27
|
-
@@games_folder = Pathname.new(location)
|
28
|
-
end
|
29
|
-
|
30
|
-
##
|
31
|
-
# Return the default games folder location
|
32
|
-
#
|
33
|
-
# Example:
|
34
|
-
# >> Greenmonster.set_games_folder("/Users/geoff/game_data")
|
35
|
-
# >> Greenmonster.games_folder
|
36
|
-
# => #<Pathname:/Users/geoff/game_data>
|
37
|
-
|
38
|
-
def self.games_folder
|
39
|
-
@@games_folder
|
40
|
-
end
|
41
|
-
|
42
|
-
##
|
43
|
-
# Walk the dates in a range of dates, and execute whatever
|
44
|
-
# methods on the date and argument set specified. Used when
|
45
|
-
# processing games and players.
|
46
|
-
#
|
47
|
-
#
|
12
|
+
REMOTE_DATA_ROOT = "http://gd2.mlb.com/components/game"
|
48
13
|
|
49
|
-
def self.
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
##
|
54
|
-
# Walk the game folders in a range of dates, and execute whatever
|
55
|
-
# methods on the game folder and argument set specified. Used when
|
56
|
-
# processing games and players.
|
57
|
-
#
|
58
|
-
#
|
14
|
+
def self.local_data_location
|
15
|
+
raise NoLocalDataLocationSet unless @@local_data_location
|
59
16
|
|
60
|
-
|
61
|
-
game_folders_for_date_and_sport_code(date, args[:sport_code]).each do |gdir|
|
62
|
-
yield gdir, args
|
63
|
-
end
|
17
|
+
@@local_data_location
|
64
18
|
end
|
65
19
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
def self.game_folders_for_date_and_sport_code(date, sport_code)
|
70
|
-
folders_for_date_and_sport_code(date, sport_code).select do |folder|
|
71
|
-
folder[0,3] == 'gid' && folder[-4,4] != '_bak'
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def self.folders_for_date_and_sport_code(date, sport_code)
|
76
|
-
begin
|
77
|
-
Dir.entries(
|
78
|
-
Pathname.new(games_folder) + sport_code + format_date_as_folder(date)
|
79
|
-
).sort
|
80
|
-
rescue Errno::ENOENT
|
81
|
-
[]
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def self.format_date_as_folder(date)
|
86
|
-
date.strftime("year_%Y/month_%m/day_%d")
|
20
|
+
def self.set_local_data_location(folder)
|
21
|
+
@@local_data_location = folder
|
87
22
|
end
|
88
23
|
|
24
|
+
class NoLocalDataLocationSet < Exception; end
|
89
25
|
end
|
90
|
-
|
91
|
-
require 'greenmonster/spider'
|
@@ -0,0 +1,153 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://gd2.mlb.com/components/game/aaa/year_2015/month_05/day_09
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 301
|
19
|
+
message: Moved Permanently
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- Apache/2.0.65 (Unix)
|
23
|
+
Location:
|
24
|
+
- http://gd2.mlb.com/components/game/aaa/year_2015/month_05/day_09/
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=15
|
27
|
+
Expires:
|
28
|
+
- Sat, 09 May 2015 15:21:45 GMT
|
29
|
+
Content-Type:
|
30
|
+
- text/html; charset=iso-8859-1
|
31
|
+
Content-Length:
|
32
|
+
- '273'
|
33
|
+
Accept-Ranges:
|
34
|
+
- bytes
|
35
|
+
Date:
|
36
|
+
- Sat, 09 May 2015 15:21:30 GMT
|
37
|
+
X-Varnish:
|
38
|
+
- '1791922661'
|
39
|
+
Via:
|
40
|
+
- 1.1 varnish
|
41
|
+
Connection:
|
42
|
+
- keep-alive
|
43
|
+
X-Varnish-Cache:
|
44
|
+
- MISS
|
45
|
+
X-Served-By:
|
46
|
+
- w1cache12.web1.mlbam.net
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: |
|
50
|
+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
51
|
+
<html><head>
|
52
|
+
<title>301 Moved Permanently</title>
|
53
|
+
</head><body>
|
54
|
+
<h1>Moved Permanently</h1>
|
55
|
+
<p>The document has moved <a href="http://gd2.mlb.com/components/game/aaa/year_2015/month_05/day_09/">here</a>.</p>
|
56
|
+
</body></html>
|
57
|
+
http_version:
|
58
|
+
recorded_at: Sat, 09 May 2015 15:21:30 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://gd2.mlb.com/components/game/aaa/year_2015/month_05/day_09/
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
Accept-Encoding:
|
67
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
68
|
+
Accept:
|
69
|
+
- "*/*"
|
70
|
+
User-Agent:
|
71
|
+
- Ruby
|
72
|
+
response:
|
73
|
+
status:
|
74
|
+
code: 200
|
75
|
+
message: OK
|
76
|
+
headers:
|
77
|
+
Server:
|
78
|
+
- Apache/2.0.65 (Unix)
|
79
|
+
Expires:
|
80
|
+
- Sat, 09 May 2015 15:21:45 GMT
|
81
|
+
Access-Control-Allow-Origin:
|
82
|
+
- "*"
|
83
|
+
Edge-Control:
|
84
|
+
- max-age=15
|
85
|
+
Cache-Control:
|
86
|
+
- max-age=15
|
87
|
+
Content-Type:
|
88
|
+
- text/html;charset=ISO-8859-1
|
89
|
+
Content-Length:
|
90
|
+
- '3063'
|
91
|
+
Accept-Ranges:
|
92
|
+
- bytes
|
93
|
+
Date:
|
94
|
+
- Sat, 09 May 2015 15:21:30 GMT
|
95
|
+
X-Varnish:
|
96
|
+
- '1791922682'
|
97
|
+
Via:
|
98
|
+
- 1.1 varnish
|
99
|
+
Connection:
|
100
|
+
- keep-alive
|
101
|
+
X-Varnish-Cache:
|
102
|
+
- MISS
|
103
|
+
X-Served-By:
|
104
|
+
- w1cache12.web1.mlbam.net
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: |
|
108
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
109
|
+
<html>
|
110
|
+
<head>
|
111
|
+
<title>Index of /components/game/aaa/year_2015/month_05/day_09</title>
|
112
|
+
</head>
|
113
|
+
<body>
|
114
|
+
<h1>Index of /components/game/aaa/year_2015/month_05/day_09</h1>
|
115
|
+
<ul><li><a href="/components/game/aaa/year_2015/month_05/"> Parent Directory</a></li>
|
116
|
+
<li><a href="gid_2015_05_09_albaaa_srcaaa_1/"> gid_2015_05_09_albaaa_srcaaa_1/</a></li>
|
117
|
+
<li><a href="gid_2015_05_09_bufaaa_noraaa_1/"> gid_2015_05_09_bufaaa_noraaa_1/</a></li>
|
118
|
+
<li><a href="gid_2015_05_09_cdcaaa_yucaaa_1/"> gid_2015_05_09_cdcaaa_yucaaa_1/</a></li>
|
119
|
+
<li><a href="gid_2015_05_09_chraaa_tolaaa_1/"> gid_2015_05_09_chraaa_tolaaa_1/</a></li>
|
120
|
+
<li><a href="gid_2015_05_09_cspaaa_iowaaa_1/"> gid_2015_05_09_cspaaa_iowaaa_1/</a></li>
|
121
|
+
<li><a href="gid_2015_05_09_dubaaa_syraaa_1/"> gid_2015_05_09_dubaaa_syraaa_1/</a></li>
|
122
|
+
<li><a href="gid_2015_05_09_gwiaaa_lhvaaa_1/"> gid_2015_05_09_gwiaaa_lhvaaa_1/</a></li>
|
123
|
+
<li><a href="gid_2015_05_09_indaaa_swbaaa_1/"> gid_2015_05_09_indaaa_swbaaa_1/</a></li>
|
124
|
+
<li><a href="gid_2015_05_09_lvgaaa_elpaaa_1/"> gid_2015_05_09_lvgaaa_elpaaa_1/</a></li>
|
125
|
+
<li><a href="gid_2015_05_09_mxoaaa_tijaaa_1/"> gid_2015_05_09_mxoaaa_tijaaa_1/</a></li>
|
126
|
+
<li><a href="gid_2015_05_09_mxoaaa_tijaaa_2/"> gid_2015_05_09_mxoaaa_tijaaa_2/</a></li>
|
127
|
+
<li><a href="gid_2015_05_09_nozaaa_mrbaaa_1/"> gid_2015_05_09_nozaaa_mrbaaa_1/</a></li>
|
128
|
+
<li><a href="gid_2015_05_09_okcaaa_omaaaa_1/"> gid_2015_05_09_okcaaa_omaaaa_1/</a></li>
|
129
|
+
<li><a href="gid_2015_05_09_orhaaa_omaaaa_1/"> gid_2015_05_09_orhaaa_omaaaa_1/</a></li>
|
130
|
+
<li><a href="gid_2015_05_09_pawaaa_colaaa_1/"> gid_2015_05_09_pawaaa_colaaa_1/</a></li>
|
131
|
+
<li><a href="gid_2015_05_09_pueaaa_oaxaaa_1/"> gid_2015_05_09_pueaaa_oaxaaa_1/</a></li>
|
132
|
+
<li><a href="gid_2015_05_09_quiaaa_camaaa_1/"> gid_2015_05_09_quiaaa_camaaa_1/</a></li>
|
133
|
+
<li><a href="gid_2015_05_09_renaaa_slcaaa_1/"> gid_2015_05_09_renaaa_slcaaa_1/</a></li>
|
134
|
+
<li><a href="gid_2015_05_09_reyaaa_mtyaaa_1/"> gid_2015_05_09_reyaaa_mtyaaa_1/</a></li>
|
135
|
+
<li><a href="gid_2015_05_09_rocaaa_louaaa_1/"> gid_2015_05_09_rocaaa_louaaa_1/</a></li>
|
136
|
+
<li><a href="gid_2015_05_09_rreaaa_nasaaa_1/"> gid_2015_05_09_rreaaa_nasaaa_1/</a></li>
|
137
|
+
<li><a href="gid_2015_05_09_sltaaa_aguaaa_1/"> gid_2015_05_09_sltaaa_aguaaa_1/</a></li>
|
138
|
+
<li><a href="gid_2015_05_09_tacaaa_freaaa_1/"> gid_2015_05_09_tacaaa_freaaa_1/</a></li>
|
139
|
+
<li><a href="gid_2015_05_09_vaqaaa_mvaaaa_1/"> gid_2015_05_09_vaqaaa_mvaaaa_1/</a></li>
|
140
|
+
<li><a href="gid_2015_05_09_vraaaa_tabaaa_1/"> gid_2015_05_09_vraaaa_tabaaa_1/</a></li>
|
141
|
+
<li><a href="master_scoreboard.json"> master_scoreboard.json</a></li>
|
142
|
+
<li><a href="master_scoreboard.xml"> master_scoreboard.xml</a></li>
|
143
|
+
<li><a href="miniscoreboard.html"> miniscoreboard.html</a></li>
|
144
|
+
<li><a href="miniscoreboard.xml"> miniscoreboard.xml</a></li>
|
145
|
+
<li><a href="scoreboard_android.xml"> scoreboard_android.xml</a></li>
|
146
|
+
<li><a href="scoreboard_ipad.xml"> scoreboard_ipad.xml</a></li>
|
147
|
+
<li><a href="scoreboard_iphone.xml"> scoreboard_iphone.xml</a></li>
|
148
|
+
<li><a href="uber_scoreboard.xml"> uber_scoreboard.xml</a></li>
|
149
|
+
</ul>
|
150
|
+
</body></html>
|
151
|
+
http_version:
|
152
|
+
recorded_at: Sat, 09 May 2015 15:21:30 GMT
|
153
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,135 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://gd2.mlb.com/components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 301
|
19
|
+
message: Moved Permanently
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- Apache/2.0.65 (Unix)
|
23
|
+
Location:
|
24
|
+
- http://gd2.mlb.com/components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning/
|
25
|
+
Cache-Control:
|
26
|
+
- max-age=15
|
27
|
+
Expires:
|
28
|
+
- Sat, 09 May 2015 15:20:12 GMT
|
29
|
+
Content-Type:
|
30
|
+
- text/html; charset=iso-8859-1
|
31
|
+
Content-Length:
|
32
|
+
- '311'
|
33
|
+
Accept-Ranges:
|
34
|
+
- bytes
|
35
|
+
Date:
|
36
|
+
- Sat, 09 May 2015 15:19:57 GMT
|
37
|
+
X-Varnish:
|
38
|
+
- '2550137287'
|
39
|
+
Via:
|
40
|
+
- 1.1 varnish
|
41
|
+
Connection:
|
42
|
+
- keep-alive
|
43
|
+
X-Varnish-Cache:
|
44
|
+
- MISS
|
45
|
+
X-Served-By:
|
46
|
+
- w1cache10.web1.mlbam.net
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: |
|
50
|
+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
51
|
+
<html><head>
|
52
|
+
<title>301 Moved Permanently</title>
|
53
|
+
</head><body>
|
54
|
+
<h1>Moved Permanently</h1>
|
55
|
+
<p>The document has moved <a href="http://gd2.mlb.com/components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning/">here</a>.</p>
|
56
|
+
</body></html>
|
57
|
+
http_version:
|
58
|
+
recorded_at: Sat, 09 May 2015 15:19:57 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://gd2.mlb.com/components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning/
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
Accept-Encoding:
|
67
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
68
|
+
Accept:
|
69
|
+
- "*/*"
|
70
|
+
User-Agent:
|
71
|
+
- Ruby
|
72
|
+
response:
|
73
|
+
status:
|
74
|
+
code: 200
|
75
|
+
message: OK
|
76
|
+
headers:
|
77
|
+
Server:
|
78
|
+
- Apache/2.0.65 (Unix)
|
79
|
+
Expires:
|
80
|
+
- Sat, 09 May 2015 15:20:12 GMT
|
81
|
+
Access-Control-Allow-Origin:
|
82
|
+
- "*"
|
83
|
+
Edge-Control:
|
84
|
+
- max-age=15
|
85
|
+
Cache-Control:
|
86
|
+
- max-age=15
|
87
|
+
Content-Type:
|
88
|
+
- text/html;charset=ISO-8859-1
|
89
|
+
Content-Length:
|
90
|
+
- '1219'
|
91
|
+
Accept-Ranges:
|
92
|
+
- bytes
|
93
|
+
Date:
|
94
|
+
- Sat, 09 May 2015 15:19:57 GMT
|
95
|
+
X-Varnish:
|
96
|
+
- '2550137308'
|
97
|
+
Via:
|
98
|
+
- 1.1 varnish
|
99
|
+
Connection:
|
100
|
+
- keep-alive
|
101
|
+
X-Varnish-Cache:
|
102
|
+
- MISS
|
103
|
+
X-Served-By:
|
104
|
+
- w1cache10.web1.mlbam.net
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: |
|
108
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
109
|
+
<html>
|
110
|
+
<head>
|
111
|
+
<title>Index of /components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning</title>
|
112
|
+
</head>
|
113
|
+
<body>
|
114
|
+
<h1>Index of /components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/inning</h1>
|
115
|
+
<ul><li><a href="/components/game/mlb/year_2007/month_10/day_01/gid_2007_10_01_sdnmlb_colmlb_1/"> Parent Directory</a></li>
|
116
|
+
<li><a href="inning_1.xml"> inning_1.xml</a></li>
|
117
|
+
<li><a href="inning_10.xml"> inning_10.xml</a></li>
|
118
|
+
<li><a href="inning_11.xml"> inning_11.xml</a></li>
|
119
|
+
<li><a href="inning_12.xml"> inning_12.xml</a></li>
|
120
|
+
<li><a href="inning_13.xml"> inning_13.xml</a></li>
|
121
|
+
<li><a href="inning_2.xml"> inning_2.xml</a></li>
|
122
|
+
<li><a href="inning_3.xml"> inning_3.xml</a></li>
|
123
|
+
<li><a href="inning_4.xml"> inning_4.xml</a></li>
|
124
|
+
<li><a href="inning_5.xml"> inning_5.xml</a></li>
|
125
|
+
<li><a href="inning_6.xml"> inning_6.xml</a></li>
|
126
|
+
<li><a href="inning_7.xml"> inning_7.xml</a></li>
|
127
|
+
<li><a href="inning_8.xml"> inning_8.xml</a></li>
|
128
|
+
<li><a href="inning_9.xml"> inning_9.xml</a></li>
|
129
|
+
<li><a href="inning_Scores.xml"> inning_Scores.xml</a></li>
|
130
|
+
<li><a href="inning_hit.xml"> inning_hit.xml</a></li>
|
131
|
+
</ul>
|
132
|
+
</body></html>
|
133
|
+
http_version:
|
134
|
+
recorded_at: Sat, 09 May 2015 15:19:57 GMT
|
135
|
+
recorded_with: VCR 2.9.3
|