greenmonster 0.5.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,260 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class InstallGreenmonster - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "./";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="./index.html">Home</a>
|
28
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>lib/generators/templates/migration.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
<nav id="parent-class-section" class="section">
|
60
|
-
<h3 class="section-header">Parent</h3>
|
61
|
-
|
62
|
-
<p class="link">ActiveRecord::Migration
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<nav id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list">
|
72
|
-
|
73
|
-
<li><a href="#method-c-down">::down</a>
|
74
|
-
|
75
|
-
<li><a href="#method-c-up">::up</a>
|
76
|
-
|
77
|
-
</ul>
|
78
|
-
</nav>
|
79
|
-
|
80
|
-
</div>
|
81
|
-
|
82
|
-
<div id="project-metadata">
|
83
|
-
<nav id="fileindex-section" class="section project-section">
|
84
|
-
<h3 class="section-header">Pages</h3>
|
85
|
-
|
86
|
-
<ul>
|
87
|
-
|
88
|
-
<li class="file"><a href="./Gemfile.html">Gemfile</a>
|
89
|
-
|
90
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
91
|
-
|
92
|
-
</ul>
|
93
|
-
</nav>
|
94
|
-
|
95
|
-
<nav id="classindex-section" class="section project-section">
|
96
|
-
<h3 class="section-header">Class and Module Index</h3>
|
97
|
-
|
98
|
-
<ul class="link-list">
|
99
|
-
|
100
|
-
<li><a href="./Greenmonster.html">Greenmonster</a>
|
101
|
-
|
102
|
-
<li><a href="./Greenmonster/Generators.html">Greenmonster::Generators</a>
|
103
|
-
|
104
|
-
<li><a href="./Greenmonster/Generators/InstallGenerator.html">Greenmonster::Generators::InstallGenerator</a>
|
105
|
-
|
106
|
-
<li><a href="./Greenmonster/Parser.html">Greenmonster::Parser</a>
|
107
|
-
|
108
|
-
<li><a href="./Greenmonster/Player.html">Greenmonster::Player</a>
|
109
|
-
|
110
|
-
<li><a href="./Greenmonster/Spider.html">Greenmonster::Spider</a>
|
111
|
-
|
112
|
-
<li><a href="./Athlete.html">Athlete</a>
|
113
|
-
|
114
|
-
<li><a href="./GreenmonsterPlayerTest.html">GreenmonsterPlayerTest</a>
|
115
|
-
|
116
|
-
<li><a href="./GreenmonsterSpiderTest.html">GreenmonsterSpiderTest</a>
|
117
|
-
|
118
|
-
<li><a href="./GreenmonsterTest.html">GreenmonsterTest</a>
|
119
|
-
|
120
|
-
<li><a href="./GreenmonsterTraversalTest.html">GreenmonsterTraversalTest</a>
|
121
|
-
|
122
|
-
<li><a href="./InstallGreenmonster.html">InstallGreenmonster</a>
|
123
|
-
|
124
|
-
<li><a href="./TestCreatePlayersFromGamedayXMLGame.html">TestCreatePlayersFromGamedayXMLGame</a>
|
125
|
-
|
126
|
-
<li><a href="./TestParsePlayersFromGamedayXMLFiles.html">TestParsePlayersFromGamedayXMLFiles</a>
|
127
|
-
|
128
|
-
</ul>
|
129
|
-
</nav>
|
130
|
-
|
131
|
-
</div>
|
132
|
-
</nav>
|
133
|
-
|
134
|
-
<div id="documentation">
|
135
|
-
<h1 class="class">class InstallGreenmonster</h1>
|
136
|
-
|
137
|
-
<div id="description" class="description">
|
138
|
-
|
139
|
-
</div><!-- description -->
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<!-- Methods -->
|
154
|
-
|
155
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
156
|
-
<h3 class="section-header">Public Class Methods</h3>
|
157
|
-
|
158
|
-
|
159
|
-
<div id="method-c-down" class="method-detail ">
|
160
|
-
|
161
|
-
<div class="method-heading">
|
162
|
-
<span class="method-name">down</span><span
|
163
|
-
class="method-args">()</span>
|
164
|
-
<span class="method-click-advice">click to toggle source</span>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
|
168
|
-
<div class="method-description">
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<div class="method-source-code" id="down-source">
|
175
|
-
<pre><span class="ruby-comment"># File lib/generators/templates/migration.rb, line 35</span>
|
176
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">down</span>
|
177
|
-
<span class="ruby-identifier">drop_table</span> <span class="ruby-value">:players</span>
|
178
|
-
<span class="ruby-keyword">end</span></pre>
|
179
|
-
</div><!-- down-source -->
|
180
|
-
|
181
|
-
</div>
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
</div><!-- down-method -->
|
187
|
-
|
188
|
-
|
189
|
-
<div id="method-c-up" class="method-detail ">
|
190
|
-
|
191
|
-
<div class="method-heading">
|
192
|
-
<span class="method-name">up</span><span
|
193
|
-
class="method-args">()</span>
|
194
|
-
<span class="method-click-advice">click to toggle source</span>
|
195
|
-
</div>
|
196
|
-
|
197
|
-
|
198
|
-
<div class="method-description">
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
<div class="method-source-code" id="up-source">
|
205
|
-
<pre><span class="ruby-comment"># File lib/generators/templates/migration.rb, line 2</span>
|
206
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">up</span>
|
207
|
-
<span class="ruby-identifier">create_table</span> <span class="ruby-string">"players"</span>, <span class="ruby-value">:force</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
208
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"first"</span>
|
209
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"last"</span>
|
210
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-string">"bis_id"</span>
|
211
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"retrosheet_id"</span>
|
212
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-string">"baseball_db_id"</span>
|
213
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"baseball_prospectus_id"</span>
|
214
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"baseball_reference_id"</span>
|
215
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"lahman_id"</span>
|
216
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-string">"westbay_id"</span>
|
217
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-string">"korea_kbo_id"</span>
|
218
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-string">"japan_npb_id"</span>
|
219
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-string">"uuid"</span>, <span class="ruby-value">:limit</span> =<span class="ruby-operator">></span> <span class="ruby-value">150</span>
|
220
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">boolean</span> <span class="ruby-string">"current"</span>
|
221
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">boolean</span> <span class="ruby-string">"duplicate"</span>
|
222
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">datetime</span> <span class="ruby-string">"created_at"</span>
|
223
|
-
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">datetime</span> <span class="ruby-string">"updated_at"</span>
|
224
|
-
<span class="ruby-keyword">end</span>
|
225
|
-
|
226
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"baseball_db_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-baseball_db_id"</span>
|
227
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"baseball_prospectus_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-baseball_prospectus_id"</span>
|
228
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"baseball_reference_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-baseball_reference_id"</span>
|
229
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"bis_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-bis_id"</span>
|
230
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"japan_npb_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-japan_npb_id"</span>
|
231
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"korea_kbo_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-korea_kbo_id"</span>
|
232
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"lahman_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-lahman_id"</span>
|
233
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"retrosheet_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-retrosheet_id"</span>
|
234
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"stats_inc_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-stats_inc_id"</span>
|
235
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"uuid"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-uuid"</span>
|
236
|
-
<span class="ruby-identifier">add_index</span> <span class="ruby-string">"players"</span>, [<span class="ruby-string">"westbay_id"</span>], <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"players-westbay_id"</span>
|
237
|
-
<span class="ruby-keyword">end</span></pre>
|
238
|
-
</div><!-- up-source -->
|
239
|
-
|
240
|
-
</div>
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
</div><!-- up-method -->
|
246
|
-
|
247
|
-
|
248
|
-
</section><!-- public-class-method-details -->
|
249
|
-
|
250
|
-
</section><!-- 5Buntitled-5D -->
|
251
|
-
|
252
|
-
</div><!-- documentation -->
|
253
|
-
|
254
|
-
|
255
|
-
<footer id="validator-badges">
|
256
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
257
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
258
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
259
|
-
</footer>
|
260
|
-
|
@@ -1,266 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class TestCreatePlayersFromGamedayXMLGame - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "./";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="./index.html">Home</a>
|
28
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>test/test_create_players_from_gameday_xml_game.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
<nav id="parent-class-section" class="section">
|
60
|
-
<h3 class="section-header">Parent</h3>
|
61
|
-
|
62
|
-
<p class="link">MiniTest::Unit::TestCase
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<nav id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list">
|
72
|
-
|
73
|
-
<li><a href="#method-i-setup">#setup</a>
|
74
|
-
|
75
|
-
<li><a href="#method-i-teardown">#teardown</a>
|
76
|
-
|
77
|
-
<li><a href="#method-i-test_create_players_from_gameday_xml_game">#test_create_players_from_gameday_xml_game</a>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
</nav>
|
81
|
-
|
82
|
-
</div>
|
83
|
-
|
84
|
-
<div id="project-metadata">
|
85
|
-
<nav id="fileindex-section" class="section project-section">
|
86
|
-
<h3 class="section-header">Pages</h3>
|
87
|
-
|
88
|
-
<ul>
|
89
|
-
|
90
|
-
<li class="file"><a href="./Gemfile.html">Gemfile</a>
|
91
|
-
|
92
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
93
|
-
|
94
|
-
</ul>
|
95
|
-
</nav>
|
96
|
-
|
97
|
-
<nav id="classindex-section" class="section project-section">
|
98
|
-
<h3 class="section-header">Class and Module Index</h3>
|
99
|
-
|
100
|
-
<ul class="link-list">
|
101
|
-
|
102
|
-
<li><a href="./Greenmonster.html">Greenmonster</a>
|
103
|
-
|
104
|
-
<li><a href="./Greenmonster/Generators.html">Greenmonster::Generators</a>
|
105
|
-
|
106
|
-
<li><a href="./Greenmonster/Generators/InstallGenerator.html">Greenmonster::Generators::InstallGenerator</a>
|
107
|
-
|
108
|
-
<li><a href="./Greenmonster/Parser.html">Greenmonster::Parser</a>
|
109
|
-
|
110
|
-
<li><a href="./Greenmonster/Player.html">Greenmonster::Player</a>
|
111
|
-
|
112
|
-
<li><a href="./Greenmonster/Spider.html">Greenmonster::Spider</a>
|
113
|
-
|
114
|
-
<li><a href="./Athlete.html">Athlete</a>
|
115
|
-
|
116
|
-
<li><a href="./GreenmonsterPlayerTest.html">GreenmonsterPlayerTest</a>
|
117
|
-
|
118
|
-
<li><a href="./GreenmonsterSpiderTest.html">GreenmonsterSpiderTest</a>
|
119
|
-
|
120
|
-
<li><a href="./GreenmonsterTest.html">GreenmonsterTest</a>
|
121
|
-
|
122
|
-
<li><a href="./GreenmonsterTraversalTest.html">GreenmonsterTraversalTest</a>
|
123
|
-
|
124
|
-
<li><a href="./InstallGreenmonster.html">InstallGreenmonster</a>
|
125
|
-
|
126
|
-
<li><a href="./TestCreatePlayersFromGamedayXMLGame.html">TestCreatePlayersFromGamedayXMLGame</a>
|
127
|
-
|
128
|
-
<li><a href="./TestParsePlayersFromGamedayXMLFiles.html">TestParsePlayersFromGamedayXMLFiles</a>
|
129
|
-
|
130
|
-
</ul>
|
131
|
-
</nav>
|
132
|
-
|
133
|
-
</div>
|
134
|
-
</nav>
|
135
|
-
|
136
|
-
<div id="documentation">
|
137
|
-
<h1 class="class">class TestCreatePlayersFromGamedayXMLGame</h1>
|
138
|
-
|
139
|
-
<div id="description" class="description">
|
140
|
-
|
141
|
-
</div><!-- description -->
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<!-- Methods -->
|
156
|
-
|
157
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
158
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
159
|
-
|
160
|
-
|
161
|
-
<div id="method-i-setup" class="method-detail ">
|
162
|
-
|
163
|
-
<div class="method-heading">
|
164
|
-
<span class="method-name">setup</span><span
|
165
|
-
class="method-args">()</span>
|
166
|
-
<span class="method-click-advice">click to toggle source</span>
|
167
|
-
</div>
|
168
|
-
|
169
|
-
|
170
|
-
<div class="method-description">
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
<div class="method-source-code" id="setup-source">
|
177
|
-
<pre><span class="ruby-comment"># File test/test_create_players_from_gameday_xml_game.rb, line 29</span>
|
178
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setup</span>
|
179
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">set_games_folder</span>(<span class="ruby-string">'./greenmonster_test_games'</span>)
|
180
|
-
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">games_folder</span>
|
181
|
-
<span class="ruby-constant">Greenmonster</span><span class="ruby-operator">::</span><span class="ruby-constant">Spider</span>.<span class="ruby-identifier">pull_game</span>(<span class="ruby-string">'gid_2011_07_04_tormlb_bosmlb_1'</span>, {<span class="ruby-value">:print_games</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>})
|
182
|
-
<span class="ruby-keyword">end</span></pre>
|
183
|
-
</div><!-- setup-source -->
|
184
|
-
|
185
|
-
</div>
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
</div><!-- setup-method -->
|
191
|
-
|
192
|
-
|
193
|
-
<div id="method-i-teardown" class="method-detail ">
|
194
|
-
|
195
|
-
<div class="method-heading">
|
196
|
-
<span class="method-name">teardown</span><span
|
197
|
-
class="method-args">()</span>
|
198
|
-
<span class="method-click-advice">click to toggle source</span>
|
199
|
-
</div>
|
200
|
-
|
201
|
-
|
202
|
-
<div class="method-description">
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<div class="method-source-code" id="teardown-source">
|
209
|
-
<pre><span class="ruby-comment"># File test/test_create_players_from_gameday_xml_game.rb, line 35</span>
|
210
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">teardown</span>
|
211
|
-
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">remove_dir</span> <span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">games_folder</span>
|
212
|
-
<span class="ruby-keyword">end</span></pre>
|
213
|
-
</div><!-- teardown-source -->
|
214
|
-
|
215
|
-
</div>
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
</div><!-- teardown-method -->
|
221
|
-
|
222
|
-
|
223
|
-
<div id="method-i-test_create_players_from_gameday_xml_game" class="method-detail ">
|
224
|
-
|
225
|
-
<div class="method-heading">
|
226
|
-
<span class="method-name">test_create_players_from_gameday_xml_game</span><span
|
227
|
-
class="method-args">()</span>
|
228
|
-
<span class="method-click-advice">click to toggle source</span>
|
229
|
-
</div>
|
230
|
-
|
231
|
-
|
232
|
-
<div class="method-description">
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
<div class="method-source-code" id="test_create_players_from_gameday_xml_game-source">
|
239
|
-
<pre><span class="ruby-comment"># File test/test_create_players_from_gameday_xml_game.rb, line 24</span>
|
240
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_create_players_from_gameday_xml_game</span>
|
241
|
-
<span class="ruby-constant">Athlete</span>.<span class="ruby-identifier">create_from_gameday_xml_game</span>(<span class="ruby-string">'gid_2011_07_04_tormlb_bosmlb_1'</span>)
|
242
|
-
<span class="ruby-identifier">assert_equal</span> <span class="ruby-value">50</span>, <span class="ruby-constant">Athlete</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">count</span>
|
243
|
-
<span class="ruby-keyword">end</span></pre>
|
244
|
-
</div><!-- test_create_players_from_gameday_xml_game-source -->
|
245
|
-
|
246
|
-
</div>
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
</div><!-- test_create_players_from_gameday_xml_game-method -->
|
252
|
-
|
253
|
-
|
254
|
-
</section><!-- public-instance-method-details -->
|
255
|
-
|
256
|
-
</section><!-- 5Buntitled-5D -->
|
257
|
-
|
258
|
-
</div><!-- documentation -->
|
259
|
-
|
260
|
-
|
261
|
-
<footer id="validator-badges">
|
262
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
263
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
264
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
265
|
-
</footer>
|
266
|
-
|