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
data/doc/GreenmonsterTest.html
DELETED
@@ -1,262 +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 GreenmonsterTest - 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_greenmonster.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_set_games_folder_location">#test_set_games_folder_location</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 GreenmonsterTest</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_greenmonster.rb, line 5</span>
|
178
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setup</span>
|
179
|
-
<span class="ruby-keyword">end</span></pre>
|
180
|
-
</div><!-- setup-source -->
|
181
|
-
|
182
|
-
</div>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
</div><!-- setup-method -->
|
188
|
-
|
189
|
-
|
190
|
-
<div id="method-i-teardown" class="method-detail ">
|
191
|
-
|
192
|
-
<div class="method-heading">
|
193
|
-
<span class="method-name">teardown</span><span
|
194
|
-
class="method-args">()</span>
|
195
|
-
<span class="method-click-advice">click to toggle source</span>
|
196
|
-
</div>
|
197
|
-
|
198
|
-
|
199
|
-
<div class="method-description">
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
<div class="method-source-code" id="teardown-source">
|
206
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster.rb, line 13</span>
|
207
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">teardown</span>
|
208
|
-
<span class="ruby-keyword">end</span></pre>
|
209
|
-
</div><!-- teardown-source -->
|
210
|
-
|
211
|
-
</div>
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</div><!-- teardown-method -->
|
217
|
-
|
218
|
-
|
219
|
-
<div id="method-i-test_set_games_folder_location" class="method-detail ">
|
220
|
-
|
221
|
-
<div class="method-heading">
|
222
|
-
<span class="method-name">test_set_games_folder_location</span><span
|
223
|
-
class="method-args">()</span>
|
224
|
-
<span class="method-click-advice">click to toggle source</span>
|
225
|
-
</div>
|
226
|
-
|
227
|
-
|
228
|
-
<div class="method-description">
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
<div class="method-source-code" id="test_set_games_folder_location-source">
|
235
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster.rb, line 8</span>
|
236
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_set_games_folder_location</span>
|
237
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">set_games_folder</span>(<span class="ruby-string">'./test_greenmonster_folder'</span>)
|
238
|
-
<span class="ruby-identifier">assert_equal</span> <span class="ruby-string">'./test_greenmonster_folder'</span>, <span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">games_folder</span>.<span class="ruby-identifier">to_s</span>
|
239
|
-
<span class="ruby-keyword">end</span></pre>
|
240
|
-
</div><!-- test_set_games_folder_location-source -->
|
241
|
-
|
242
|
-
</div>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
</div><!-- test_set_games_folder_location-method -->
|
248
|
-
|
249
|
-
|
250
|
-
</section><!-- public-instance-method-details -->
|
251
|
-
|
252
|
-
</section><!-- 5Buntitled-5D -->
|
253
|
-
|
254
|
-
</div><!-- documentation -->
|
255
|
-
|
256
|
-
|
257
|
-
<footer id="validator-badges">
|
258
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
259
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
260
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
261
|
-
</footer>
|
262
|
-
|
@@ -1,376 +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 GreenmonsterTraversalTest - 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_greenmonster_traversal.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_traverse_dates_across_range">#test_traverse_dates_across_range</a>
|
78
|
-
|
79
|
-
<li><a href="#method-i-test_traverse_dates_with_no_range">#test_traverse_dates_with_no_range</a>
|
80
|
-
|
81
|
-
<li><a href="#method-i-test_traverse_folders_for_date">#test_traverse_folders_for_date</a>
|
82
|
-
|
83
|
-
<li><a href="#method-i-test_traverse_folders_for_non_mlb_sport_code">#test_traverse_folders_for_non_mlb_sport_code</a>
|
84
|
-
|
85
|
-
</ul>
|
86
|
-
</nav>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div id="project-metadata">
|
91
|
-
<nav id="fileindex-section" class="section project-section">
|
92
|
-
<h3 class="section-header">Pages</h3>
|
93
|
-
|
94
|
-
<ul>
|
95
|
-
|
96
|
-
<li class="file"><a href="./Gemfile.html">Gemfile</a>
|
97
|
-
|
98
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
99
|
-
|
100
|
-
</ul>
|
101
|
-
</nav>
|
102
|
-
|
103
|
-
<nav id="classindex-section" class="section project-section">
|
104
|
-
<h3 class="section-header">Class and Module Index</h3>
|
105
|
-
|
106
|
-
<ul class="link-list">
|
107
|
-
|
108
|
-
<li><a href="./Greenmonster.html">Greenmonster</a>
|
109
|
-
|
110
|
-
<li><a href="./Greenmonster/Generators.html">Greenmonster::Generators</a>
|
111
|
-
|
112
|
-
<li><a href="./Greenmonster/Generators/InstallGenerator.html">Greenmonster::Generators::InstallGenerator</a>
|
113
|
-
|
114
|
-
<li><a href="./Greenmonster/Parser.html">Greenmonster::Parser</a>
|
115
|
-
|
116
|
-
<li><a href="./Greenmonster/Player.html">Greenmonster::Player</a>
|
117
|
-
|
118
|
-
<li><a href="./Greenmonster/Spider.html">Greenmonster::Spider</a>
|
119
|
-
|
120
|
-
<li><a href="./Athlete.html">Athlete</a>
|
121
|
-
|
122
|
-
<li><a href="./GreenmonsterPlayerTest.html">GreenmonsterPlayerTest</a>
|
123
|
-
|
124
|
-
<li><a href="./GreenmonsterSpiderTest.html">GreenmonsterSpiderTest</a>
|
125
|
-
|
126
|
-
<li><a href="./GreenmonsterTest.html">GreenmonsterTest</a>
|
127
|
-
|
128
|
-
<li><a href="./GreenmonsterTraversalTest.html">GreenmonsterTraversalTest</a>
|
129
|
-
|
130
|
-
<li><a href="./InstallGreenmonster.html">InstallGreenmonster</a>
|
131
|
-
|
132
|
-
<li><a href="./TestCreatePlayersFromGamedayXMLGame.html">TestCreatePlayersFromGamedayXMLGame</a>
|
133
|
-
|
134
|
-
<li><a href="./TestParsePlayersFromGamedayXMLFiles.html">TestParsePlayersFromGamedayXMLFiles</a>
|
135
|
-
|
136
|
-
</ul>
|
137
|
-
</nav>
|
138
|
-
|
139
|
-
</div>
|
140
|
-
</nav>
|
141
|
-
|
142
|
-
<div id="documentation">
|
143
|
-
<h1 class="class">class GreenmonsterTraversalTest</h1>
|
144
|
-
|
145
|
-
<div id="description" class="description">
|
146
|
-
|
147
|
-
</div><!-- description -->
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<!-- Methods -->
|
162
|
-
|
163
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
164
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
165
|
-
|
166
|
-
|
167
|
-
<div id="method-i-setup" class="method-detail ">
|
168
|
-
|
169
|
-
<div class="method-heading">
|
170
|
-
<span class="method-name">setup</span><span
|
171
|
-
class="method-args">()</span>
|
172
|
-
<span class="method-click-advice">click to toggle source</span>
|
173
|
-
</div>
|
174
|
-
|
175
|
-
|
176
|
-
<div class="method-description">
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<div class="method-source-code" id="setup-source">
|
183
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 5</span>
|
184
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setup</span>
|
185
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">set_games_folder</span> <span class="ruby-string">"./greenmonster_test_games"</span>
|
186
|
-
<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>
|
187
|
-
<span class="ruby-keyword">end</span></pre>
|
188
|
-
</div><!-- setup-source -->
|
189
|
-
|
190
|
-
</div>
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
</div><!-- setup-method -->
|
196
|
-
|
197
|
-
|
198
|
-
<div id="method-i-teardown" class="method-detail ">
|
199
|
-
|
200
|
-
<div class="method-heading">
|
201
|
-
<span class="method-name">teardown</span><span
|
202
|
-
class="method-args">()</span>
|
203
|
-
<span class="method-click-advice">click to toggle source</span>
|
204
|
-
</div>
|
205
|
-
|
206
|
-
|
207
|
-
<div class="method-description">
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
<div class="method-source-code" id="teardown-source">
|
214
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 42</span>
|
215
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">teardown</span>
|
216
|
-
<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>
|
217
|
-
<span class="ruby-keyword">end</span></pre>
|
218
|
-
</div><!-- teardown-source -->
|
219
|
-
|
220
|
-
</div>
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
</div><!-- teardown-method -->
|
226
|
-
|
227
|
-
|
228
|
-
<div id="method-i-test_traverse_dates_across_range" class="method-detail ">
|
229
|
-
|
230
|
-
<div class="method-heading">
|
231
|
-
<span class="method-name">test_traverse_dates_across_range</span><span
|
232
|
-
class="method-args">()</span>
|
233
|
-
<span class="method-click-advice">click to toggle source</span>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
|
237
|
-
<div class="method-description">
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
<div class="method-source-code" id="test_traverse_dates_across_range-source">
|
244
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 10</span>
|
245
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_traverse_dates_across_range</span>
|
246
|
-
<span class="ruby-identifier">assert_equal</span> (<span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">4</span>,<span class="ruby-value">15</span>)<span class="ruby-operator">..</span><span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">4</span>,<span class="ruby-value">30</span>)), <span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">traverse_dates</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">4</span>,<span class="ruby-value">15</span>)<span class="ruby-operator">..</span><span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">4</span>,<span class="ruby-value">30</span>)) {<span class="ruby-operator">|</span><span class="ruby-identifier">g</span>,<span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">g</span>}
|
247
|
-
<span class="ruby-keyword">end</span></pre>
|
248
|
-
</div><!-- test_traverse_dates_across_range-source -->
|
249
|
-
|
250
|
-
</div>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
</div><!-- test_traverse_dates_across_range-method -->
|
256
|
-
|
257
|
-
|
258
|
-
<div id="method-i-test_traverse_dates_with_no_range" class="method-detail ">
|
259
|
-
|
260
|
-
<div class="method-heading">
|
261
|
-
<span class="method-name">test_traverse_dates_with_no_range</span><span
|
262
|
-
class="method-args">()</span>
|
263
|
-
<span class="method-click-advice">click to toggle source</span>
|
264
|
-
</div>
|
265
|
-
|
266
|
-
|
267
|
-
<div class="method-description">
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
<div class="method-source-code" id="test_traverse_dates_with_no_range-source">
|
274
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 14</span>
|
275
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_traverse_dates_with_no_range</span>
|
276
|
-
<span class="ruby-identifier">assert_block</span> <span class="ruby-keyword">do</span>
|
277
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">traverse_dates</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">d</span>,<span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
278
|
-
<span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
|
279
|
-
<span class="ruby-keyword">end</span>
|
280
|
-
<span class="ruby-keyword">end</span>
|
281
|
-
<span class="ruby-keyword">end</span></pre>
|
282
|
-
</div><!-- test_traverse_dates_with_no_range-source -->
|
283
|
-
|
284
|
-
</div>
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
</div><!-- test_traverse_dates_with_no_range-method -->
|
290
|
-
|
291
|
-
|
292
|
-
<div id="method-i-test_traverse_folders_for_date" class="method-detail ">
|
293
|
-
|
294
|
-
<div class="method-heading">
|
295
|
-
<span class="method-name">test_traverse_folders_for_date</span><span
|
296
|
-
class="method-args">()</span>
|
297
|
-
<span class="method-click-advice">click to toggle source</span>
|
298
|
-
</div>
|
299
|
-
|
300
|
-
|
301
|
-
<div class="method-description">
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
<div class="method-source-code" id="test_traverse_folders_for_date-source">
|
308
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 22</span>
|
309
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_traverse_folders_for_date</span>
|
310
|
-
<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> <span class="ruby-operator">+</span> <span class="ruby-string">'mlb'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'year_2012'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'month_03'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'day_27'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'gid_2012_03_27_aaamlb_aabmlb_1'</span>
|
311
|
-
|
312
|
-
<span class="ruby-identifier">assert_block</span> <span class="ruby-keyword">do</span>
|
313
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">traverse_folders_for_date</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">3</span>,<span class="ruby-value">27</span>), {<span class="ruby-value">:true_test</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span>, <span class="ruby-value">:false_test</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">g</span>,<span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
314
|
-
<span class="ruby-identifier">g</span> <span class="ruby-operator">==</span> <span class="ruby-string">'gid_2012_03_27_aaamlb_aabmlb_1'</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">==</span> {<span class="ruby-value">:true_test</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span>, <span class="ruby-value">:false_test</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>}
|
315
|
-
<span class="ruby-keyword">end</span>
|
316
|
-
<span class="ruby-keyword">end</span>
|
317
|
-
<span class="ruby-keyword">end</span></pre>
|
318
|
-
</div><!-- test_traverse_folders_for_date-source -->
|
319
|
-
|
320
|
-
</div>
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
</div><!-- test_traverse_folders_for_date-method -->
|
326
|
-
|
327
|
-
|
328
|
-
<div id="method-i-test_traverse_folders_for_non_mlb_sport_code" class="method-detail ">
|
329
|
-
|
330
|
-
<div class="method-heading">
|
331
|
-
<span class="method-name">test_traverse_folders_for_non_mlb_sport_code</span><span
|
332
|
-
class="method-args">()</span>
|
333
|
-
<span class="method-click-advice">click to toggle source</span>
|
334
|
-
</div>
|
335
|
-
|
336
|
-
|
337
|
-
<div class="method-description">
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
<div class="method-source-code" id="test_traverse_folders_for_non_mlb_sport_code-source">
|
344
|
-
<pre><span class="ruby-comment"># File test/test_greenmonster_traversal.rb, line 32</span>
|
345
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_traverse_folders_for_non_mlb_sport_code</span>
|
346
|
-
<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> <span class="ruby-operator">+</span> <span class="ruby-string">'tst'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'year_2012'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'month_03'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'day_27'</span> <span class="ruby-operator">+</span> <span class="ruby-string">'gid_2012_03_27_aaatst_aabtst_1'</span>
|
347
|
-
|
348
|
-
<span class="ruby-identifier">assert_block</span> <span class="ruby-keyword">do</span>
|
349
|
-
<span class="ruby-constant">Greenmonster</span>.<span class="ruby-identifier">traverse_folders_for_date</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2012</span>,<span class="ruby-value">3</span>,<span class="ruby-value">27</span>), {<span class="ruby-value">:sport_code</span> =<span class="ruby-operator">></span> <span class="ruby-string">'tst'</span>}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">g</span>,<span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
350
|
-
<span class="ruby-identifier">g</span> <span class="ruby-operator">==</span> <span class="ruby-string">'gid_2012_03_27_aaatst_aabtst_1'</span>
|
351
|
-
<span class="ruby-keyword">end</span>
|
352
|
-
<span class="ruby-keyword">end</span>
|
353
|
-
<span class="ruby-keyword">end</span></pre>
|
354
|
-
</div><!-- test_traverse_folders_for_non_mlb_sport_code-source -->
|
355
|
-
|
356
|
-
</div>
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
</div><!-- test_traverse_folders_for_non_mlb_sport_code-method -->
|
362
|
-
|
363
|
-
|
364
|
-
</section><!-- public-instance-method-details -->
|
365
|
-
|
366
|
-
</section><!-- 5Buntitled-5D -->
|
367
|
-
|
368
|
-
</div><!-- documentation -->
|
369
|
-
|
370
|
-
|
371
|
-
<footer id="validator-badges">
|
372
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
373
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
374
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
375
|
-
</footer>
|
376
|
-
|