nanowrimo 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 0.7.8 / 2009-11-12
2
+
3
+ * 1 minor enhancement
4
+
5
+ * Cleaned up usage of Fakeweb for new features in testing. No real changes to the codebase.
6
+
7
+ * Other notes
8
+
9
+ * Checked gem against the redesign of the http://www.nanowrimo.org site. Everything is working as before.
10
+
1
11
  === 0.7.7 / 2009-06-11
2
12
 
3
13
  * 2 minor enhancements
data/README.txt CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  * http://nanowrimo.rubyforge.org
4
4
  * http://github.com/illuminerdi/nanowrimo
5
+
6
+ With special thanks to the folks at:
7
+
5
8
  * http://www.nanowrimo.org
6
9
 
7
10
  == DESCRIPTION:
@@ -22,9 +25,9 @@ Features:
22
25
  * Errors from the WCAPI are handled gracefully.
23
26
 
24
27
  Problems:
25
- * The Genres API on Nanowrimo.org is a little broken right now, so there's not much data to be loaded.
28
+ * The Genres API on Nanowrimo.org is a little broken right now, so there's not much data to be loaded. UPDATE: This is still the case, and may or may not have anything to do with load on nanowrimo.org. I'll keep checking up on it.
26
29
  * Page scraping is dumb and costly. And the data I get is minimal. Submitted request for new API features with Nanowrimo.org crew.
27
- * Caching is still fairly immature in this package, but getting bettar.
30
+ * Caching is still fairly immature in this package, but getting bettar. UPDATE: really, it's not so bad.
28
31
 
29
32
  == SYNOPSIS:
30
33
 
@@ -53,7 +56,7 @@ Problems:
53
56
  == REQUIREMENTS:
54
57
 
55
58
  * ruby 1.8.6
56
- * mechanize 0.9.2
59
+ * mechanize 0.9.3
57
60
 
58
61
  == INSTALL:
59
62
 
data/Rakefile CHANGED
@@ -5,9 +5,15 @@ require 'rubygems'
5
5
  require 'hoe'
6
6
  require './lib/nanowrimo.rb'
7
7
 
8
- Hoe.new('nanowrimo', Nanowrimo::VERSION) do |p|
8
+ Hoe.spec 'nanowrimo' do
9
9
  # p.rubyforge_name = 'nanowrimox' # if different than lowercase project name
10
- p.developer('Joshua Clingenpeel', 'joshua.clingenpeel@gmail.com')
10
+
11
+ developer 'Joshua Clingenpeel', 'joshua.clingenpeel@gmail.com'
12
+
13
+ extra_deps << ['mechanize','= 0.9.3']
14
+ extra_dev_deps << ['fakeweb','= 1.2.7']
15
+
16
+ version = Nanowrimo::VERSION
11
17
  end
12
18
 
13
19
  # vim: syntax=Ruby
data/lib/nanowrimo.rb CHANGED
@@ -23,7 +23,7 @@ require 'nanowrimo/cache'
23
23
 
24
24
  module Nanowrimo
25
25
  # Current API version
26
- VERSION = '0.7.7'
26
+ VERSION = '0.7.8'
27
27
  # Current static root WCAPI uri
28
28
  API_URI = 'http://www.nanowrimo.org/wordcount_api'
29
29
  # Current individual user word count goal. For fun!
@@ -1,40 +1,55 @@
1
- HTTP/1.0 200 OK
2
- Date: Tue, 26 May 2009 02:22:46 GMT
3
- Server: Apache/2.0.52 (CentOS)
4
- Accept-Ranges: bytes
5
- Content-Length: 19307
6
- Cache-Control: max-age=1
7
- Expires: Tue, 26 May 2009 02:22:47 GMT
8
- Content-Type: text/html; charset=utf-8
9
- X-Pad: avoid browser bug
10
- X-Cache: MISS from celebes.lettersandlight.org
11
- X-Cache-Lookup: MISS from celebes.lettersandlight.org:80
12
- Via: 1.0 celebes.lettersandlight.org:80 (squid/2.6.STABLE6)
13
- Connection: close
14
-
1
+ HTTP/1.0 200 OK
2
+ Date: Wed, 11 Nov 2009 23:02:22 GMT
3
+ Server: Apache/2.2.9 (Debian) mod_jk/1.2.26 PHP/5.2.11
4
+ X-Powered-By: PHP/5.2.11
5
+ Set-Cookie: SESS168a4567cf5c8b98cb0798ff78a4ae15=33c93b4e3318f1a5f9070a8fa586a7a7; path=/; domain=.nanowrimo.org
6
+ Expires: Sun, 19 Nov 1978 05:00:00 GMT
7
+ Last-Modified: Wed, 11 Nov 2009 23:02:22 GMT
8
+ Cache-Control: no-store, no-cache, must-revalidate
9
+ Cache-Control: post-check=0, pre-check=0
10
+ Vary: Accept-Encoding
11
+ Content-Type: text/html; charset=utf-8
12
+ X-Cache: MISS from ec2-174-129-4-71.compute-1.amazonaws.com
13
+ X-Cache-Lookup: MISS from ec2-174-129-4-71.compute-1.amazonaws.com:80
14
+ Via: 1.1 ec2-174-129-4-71.compute-1.amazonaws.com:80 (squid/2.7.STABLE3)
15
+ Connection: close
16
+
15
17
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
16
18
  <html xmlns="http://www.w3.org/1999/xhtml" lang="eng" xml:lang="eng">
17
19
 
18
20
  <head>
19
21
  <title>hollowedout | National Novel Writing Month</title>
20
22
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21
-
22
- <script type="text/javascript"><!--
23
- var BASE_URL = "/";
24
- --></script>
25
-
26
23
  <link rel="shortcut icon" href="/sites/all/themes/nanowrimo/favicon.ico" type="image/x-icon" />
27
- <style type="text/css" media="all">@import "/files/main/css/06ef6324eaec464dc953ace631390252.css";</style>
24
+ <style type="text/css" media="all">@import "/sites/all/themes/default/style.css";</style>
25
+ <style type="text/css" media="all">@import "/sites/all/modules/nanowrimo_subscriptions/nanowrimo_subscriptions.css";</style>
26
+ <style type="text/css" media="all">@import "/modules/book/book.css";</style>
27
+ <style type="text/css" media="all">@import "/modules/node/node.css";</style>
28
+ <style type="text/css" media="all">@import "/modules/system/defaults.css";</style>
29
+ <style type="text/css" media="all">@import "/modules/system/system.css";</style>
30
+ <style type="text/css" media="all">@import "/modules/user/user.css";</style>
31
+ <style type="text/css" media="all">@import "/sites/all/modules/cck/content.css";</style>
32
+ <style type="text/css" media="all">@import "/sites/all/modules/img_assist/img_assist.css";</style>
33
+ <style type="text/css" media="all">@import "/sites/all/modules/og/og.css";</style>
34
+ <style type="text/css" media="all">@import "/./sites/all/modules/privatemsg/privatemsg.css";</style>
35
+ <style type="text/css" media="all">@import "/sites/all/modules/quote/quote.css";</style>
36
+ <style type="text/css" media="all">@import "/sites/all/modules/cck/fieldgroup.css";</style>
37
+ <style type="text/css" media="all">@import "/sites/all/themes/nanowrimo/style.css";</style>
28
38
  <script type="text/javascript" src="/misc/jquery.js"></script>
29
39
  <script type="text/javascript" src="/misc/drupal.js"></script>
40
+ <script type="text/javascript" src="/sites/all/themes/default/default.js"></script>
41
+ <script type="text/javascript" src="/sites/all/modules/oll_author_search/oll_author_search.js"></script>
42
+ <script type="text/javascript" src="/sites/all/modules/nanowrimo_subscriptions/nanowrimo_subscriptions.js"></script>
30
43
  <script type="text/javascript" src="/sites/all/themes/nanowrimo/nanowrimo.js"></script>
31
44
  <script type="text/javascript" src="/sites/all/modules/img_assist/img_assist.js"></script>
45
+ <script type="text/javascript">Drupal.extend({ settings: { "menu_items_to_remove": [ "/eng/user/0/subscriptions/privatemsg" ], "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip", "LegacyVersion": 0 } } });</script>
46
+ <script type="text/javascript">var BASE_URL = "/";</script>
32
47
  <!--
33
48
  /***********************************************
34
49
  * Tab Content script- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
35
50
  * This notice MUST stay intact for legal use
36
51
  * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
37
- ***********************************************/
52
+ ***********************************************/
38
53
  -->
39
54
  <script type="text/javascript"> </script>
40
55
  </head>
@@ -47,7 +62,7 @@ Connection: close
47
62
  <div id="headerContainer">
48
63
  <!-- *** Banner Image *** -->
49
64
  <div id="bannerLogo">
50
- <a href="/"><img src="/sites/all/themes/nanowrimo/images/header.gif" border="0" width="718" height="117" /></a>
65
+ <a href="/"><img src="/sites/all/themes/nanowrimo/images/header.gif" border="0" /></a>
51
66
  </div>
52
67
  <div align="center" id="bannerButton">
53
68
  <a href="/user/register"><img src="/sites/all/themes/nanowrimo/images/button_signup.png" border="0" width="82" height="23" /></a> </div>
@@ -57,7 +72,7 @@ Connection: close
57
72
  <div class="bannerSignInBox">
58
73
  <div class="bannerSignInTop">
59
74
  <div class="SignInMore">
60
-
75
+
61
76
  <ul>
62
77
  <li><a href="/user/register">Sign Up!</a></li>
63
78
  <li><a href="/user">User Login</a></li>
@@ -68,15 +83,14 @@ Connection: close
68
83
  </div>
69
84
  </div>
70
85
  </div>
71
-
86
+
72
87
  <!-- *** Primary Navigation *** -->
73
- <div id="nav">
88
+ <div id="nav">
74
89
  <li class="expanded"><a href="/">Home</a>
75
90
  <ul class="menu">
76
91
  <li class="leaf"><a href="/eng/breakingnews" title="Breaking News">Breaking News</a></li>
77
92
  <li class="leaf"><a href="/eng/dailynanoqa">Daily NaNo Q&amp;A</a></li>
78
- <li class="leaf"><a href="/eng/wrimoradio">WrimoRadio</a></li>
79
- <li class="leaf"><a href="/eng/nowwhat">I Wrote a Novel, Now What?</a></li>
93
+ <li class="leaf"><a href="/eng/1000words">Procrastination Station</a></li>
80
94
 
81
95
  </ul>
82
96
  </li>
@@ -84,25 +98,20 @@ Connection: close
84
98
  <ul class="menu">
85
99
  <li class="leaf"><a href="/eng/whatisnano" title="What is NaNoWriMo?">What is NaNoWriMo?</a></li>
86
100
  <li class="leaf"><a href="/eng/hownanoworks" title="How NaNoWriMo Works">How NaNoWriMo Works</a></li>
87
- <li class="leaf"><a href="/eng/node/1003232">Becoming a Municipal Liaison</a></li>
88
- <li class="leaf"><a href="/eng/helpwanted">Help Wanted</a></li>
89
101
  <li class="leaf"><a href="/eng/halos">NaNoWriMo Is Brought To You By...</a></li>
90
102
  <li class="leaf"><a href="/eng/mediakit">Media Kit + Press Clips</a></li>
91
103
  <li class="leaf"><a href="/eng/wheredonationsgo" title="Where Your Donations Go">Where Your Donations Go</a></li>
104
+ <li class="leaf"><a href="/eng/node/1003232">Becoming a Municipal Liaison</a></li>
92
105
  <li class="leaf"><a href="/eng/donatingwhenbroke">Donating When Broke</a></li>
93
106
  <li class="leaf"><a href="/eng/sponsorship">Get Sponsored!</a></li>
94
107
  <li class="leaf"><a href="/eng/history" title="History">History</a></li>
108
+ <li class="leaf"><a href="/eng/helpwanted">Help Wanted</a></li>
95
109
  <li class="leaf"><a href="/eng/staff">Staff</a></li>
96
110
  <li class="leaf"><a href="/eng/contact">Contact</a></li>
97
111
 
98
112
  </ul>
99
113
  </li>
100
- <li class="expanded"><a href="/eng/authors">Authors</a>
101
- <ul class="menu">
102
- <li class="leaf"><a href="/eng/winners">Winners</a></li>
103
-
104
- </ul>
105
- </li>
114
+ <li class="leaf"><a href="/eng/search/google">Search</a></li>
106
115
  <li class="leaf"><a href="/eng/mynanowrimo" title="My NaNoWriMo">My NaNoWriMo</a></li>
107
116
  <li class="expanded"><a href="/eng/faq">FAQs</a>
108
117
  <ul class="menu">
@@ -113,34 +122,36 @@ Connection: close
113
122
  </li>
114
123
  <li class="expanded"><a href="/eng/webbadges">Fun Stuff</a>
115
124
  <ul class="menu">
125
+ <li class="leaf"><a href="http://blog.nanowrimo.org">NaNoWriMo Blog</a></li>
116
126
  <li class="leaf"><a href="/eng/webbadges">Web Badges</a></li>
117
- <li class="leaf"><a href="/eng/peptalks2008">Pep Talks</a></li>
127
+ <li class="leaf"><a href="/eng/peptalks2009">Pep Talks</a></li>
118
128
  <li class="leaf"><a href="/eng/wordcount_stats">Word Count Scoreboard</a></li>
119
- <li class="leaf"><a href="http://blog.nanowrimo.org">NaNoWriMo Blog</a></li>
120
129
  <li class="leaf"><a href="/eng/offers">Special Offers</a></li>
121
- <li class="leaf"><a href="/eng/nanovideo">NaNoVideo</a></li>
130
+ <li class="leaf"><a href="/eng/contest/donation_derby">Donation Derby</a></li>
122
131
  <li class="leaf"><a href="/eng/node/1005807">Flyers for Downloading</a></li>
123
132
  <li class="leaf"><a href="/eng/wordcount_api">Word Count API</a></li>
124
133
  <li class="leaf"><a href="/eng/widgets">Word Count Widgets</a></li>
125
134
  <li class="leaf"><a href="http://www.flickr.com/groups/nanowrimo">Flickr</a></li>
126
- <li class="leaf"><a href="/eng/chatting">NaNoWriMo&#039;s Chat Room</a></li>
127
- <li class="leaf"><a href="/eng/archives">Archives</a></li>
135
+ <li class="leaf"><a href="/eng/pep">Pep Talk Archive</a></li>
136
+ <li class="leaf"><a href="/eng/archives">Site Archive</a></li>
128
137
 
129
138
  </ul>
130
139
  </li>
131
140
  <li class="expanded"><a href="http://store.lettersandlight.org">Donation/Store</a>
132
141
  <ul class="menu">
133
- <li class="leaf"><a href="http://store.lettersandlight.org/home.php?cat=2&amp;sort=price&amp;sort_direction=0">Donations</a></li>
134
- <li class="leaf"><a href="http://store.lettersandlight.org/home.php?cat=6">Store</a></li>
142
+ <li class="leaf"><a href="http://store.lettersandlight.org/">Donations</a></li>
143
+ <li class="leaf"><a href="http://store.lettersandlight.org/merchandise">Store</a></li>
135
144
 
136
145
  </ul>
137
146
  </li>
138
147
  <li class="leaf"><a href="/eng/forum">Forums</a></li>
139
- <li class="expanded"><a href="/eng/ywp" title="Our Programs">Our Programs</a>
148
+ <li class="expanded"><a href="/eng/ywp" title="More from OLL">More from OLL</a>
140
149
  <ul class="menu">
150
+ <li class="leaf"><a href="/eng/library">Come Write In: Libraries</a></li>
151
+ <li class="leaf"><a href="/eng/bookstores">Come Write In: Independent Bookstores</a></li>
141
152
  <li class="leaf"><a href="/eng/ywp">Young Writers Program</a></li>
142
- <li class="leaf"><a href="/eng/alphasmartloaners">AlphaSmart Loaners</a></li>
143
- <li class="leaf"><a href="/eng/writeathon">November 15 Write-a-thon</a></li>
153
+ <li class="leaf"><a href="/eng/writeathon">November 22 Write-a-thon</a></li>
154
+ <li class="leaf"><a href="/eng/scriptfrenzy">April&#039;s Script Frenzy</a></li>
144
155
 
145
156
  </ul>
146
157
  </li>
@@ -154,31 +165,31 @@ Connection: close
154
165
  <div id="autoContainer">
155
166
 
156
167
 
157
- <div align="center" id="author"><!-- *** Sidebar Navigation *** -->
158
-
159
- <div id='SidebarNav' class='NaNoBox'>
160
- <div class="NaNoBoxTop"><div></div></div>
161
-
162
- <a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a>
163
- <div class="authorphoto">
164
- <div class="picture"><a href="/eng/user/240659" title="View user profile." class="active"><img src="/files/main/pictures/picture-240659.jpg" alt="hollowedout&#039;s picture" title="hollowedout&#039;s picture" /></a></div></div>
165
-
166
- <br />
167
-
168
+ <div align="center" id="author"><!-- *** Sidebar Navigation *** -->
169
+
170
+ <div id='SidebarNav' class='NaNoBox'>
171
+ <div class="NaNoBoxTop"><div></div></div>
172
+
173
+ <a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a>
174
+ <div class="authorphoto">
175
+ <div class="picture"><a href="/eng/user/240659" title="View user profile." class="active"><img src="/files/main/pictures/picture-240659.jpg" alt="hollowedout&#039;s picture" title="hollowedout&#039;s picture" /></a></div></div>
176
+
177
+ <br />
178
+
168
179
  <div class="links">
169
180
  <img src="/sites/all/themes/nanowrimo/profile/figure.gif" border="0" /> add as buddy<br />
170
181
  <img src="/sites/all/themes/nanowrimo/profile/envelope.gif" border="0" /> send NaNoMail<br />
171
- <a href="http://www.hollowedout.com"><img src="/sites/all/themes/nanowrimo/profile/external.gif" border="0" /> visit website</a><br />
182
+ <a href="http://illuminerdi.com"><img src="/sites/all/themes/nanowrimo/profile/external.gif" border="0" /> visit website</a><br />
183
+ </div>
184
+
185
+ <p><img src="/sites/all/themes/nanowrimo/images/spacer.gif" width="160" height="20" border="0" /></p>
186
+
187
+ <div class="forum">
188
+ </div>
189
+ <div class="NaNoBoxBot"><div></div></div>
172
190
  </div>
173
-
174
- <p><img src="/sites/all/themes/nanowrimo/images/spacer.gif" width="160" height="20" border="0" /></p>
175
-
176
- <div class="forum">
177
- </div>
178
- <div class="NaNoBoxBot"><div></div></div>
179
- </div>
180
- <!-- END Sidebar Navigation -->
181
-
191
+ <!-- END Sidebar Navigation -->
192
+
182
193
 
183
194
  <!-- start CONTENT CONTAINER -->
184
195
  <div id="content">
@@ -193,12 +204,12 @@ Connection: close
193
204
  hollowedout </div>
194
205
 
195
206
  <div class="titlegenre">
196
- <span class="label">Novel: </span><span class="noveltitle">Interpolis</span><br />
197
- <span class="label">Genre: </span> Science Fiction
207
+ <span class="label">Novel: </span><span class="noveltitle">Come to Call</span><br />
208
+ <span class="label">Genre: </span> Mainstream Fiction
198
209
  </div>
199
210
  <div class="wordsofar">
200
- <span class="wordssofarNum">55,415</span> words so far &nbsp; <img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /> </div>
201
- </div>
211
+ <span class="wordssofarNum">28,292</span> words so far &nbsp; <img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="28292 Written" width="56" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="21708 Remaining" width="44" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /> </div>
212
+ </div>
202
213
  <p></p>
203
214
 
204
215
  <!-- START TAB AREA -->
@@ -211,7 +222,7 @@ Connection: close
211
222
  </ul>
212
223
 
213
224
  <div class="tabcontentstyle">
214
-
225
+
215
226
  <!--START TAB 1 -->
216
227
  <div style="display: block;" id="tcontent1" class="tabcontent">
217
228
  <div class="info">
@@ -219,7 +230,7 @@ Connection: close
219
230
  <tr>
220
231
  <td valign="top"><div class="infoleft">
221
232
  <h3>About hollowedout</h3>
222
- <p><span class="label">Location: </span>Federal Way, WA</p><p><span class="label">Home Region:</span><br /><a href="/eng/node/84">United States :: Washington :: Seattle</a></p><p><span class="label">Age:</span>28</p><p><span class="label">Website: </span><a href="http://www.hollowedout.com">http://www.hollowedout.com</a></p><p><span class="label">Favorite writers: </span>For this year: Marlowe, Bester, Greene, Camus</p><p><span class="label">Favorite music: </span>For this year: Thrash/Grindcore Metal, we&#039;ll see what else</p><p><span class="label">Non-noveling interests: </span>movies, music, software development, scotch, video games, miniature wargaming</p> </div>
233
+ <p><span class="label">Location: </span>Shoreline, WA</p><p><span class="label">Home Region:</span><br /><a href="/eng/node/84">USA :: Washington :: Seattle</a></p><p><span class="label">Age:</span>29</p><p><span class="label">Website: </span><a href="http://illuminerdi.com">http://illuminerdi.com</a></p><p><span class="label">Favorite writers: </span>For this year: Helen at write-ins, Bester, Hemingway, Dumas</p><p><span class="label">Favorite music: </span>For this year: Thrash/Grindcore Metal, we&#039;ll see what else</p><p><span class="label">Non-noveling interests: </span>movies, music, software development, scotch, video games, miniature wargaming</p> </div>
223
234
  </td>
224
235
  <!-- begin postit -->
225
236
  <td valign="top">
@@ -228,8 +239,9 @@ Connection: close
228
239
  <p><span class="label">This Year:</span> Official Participant</p>
229
240
  <p><span class="label">NaNoWriMo History:</span><br class="years" />
230
241
  <img src="/sites/all/themes/nanowrimo/images/yearwon_07.gif" border="0" alt="'07" title="Won in '07">
231
- <p><span class="label">NaNoWriMo posts:</span> 8 </p>
232
- <p><span class="label">NaNoWriMo buddies:</span> 11</p>
242
+ <img src="/sites/all/themes/nanowrimo/images/yearwon_08.gif" border="0" alt="'08" title="Won in '08">
243
+ <p><span class="label">NaNoWriMo posts:</span> 2 </p>
244
+ <p><span class="label">NaNoWriMo buddies:</span> 12</p>
233
245
  <p>&nbsp;</p>
234
246
  </div></td>
235
247
  </tr>
@@ -243,80 +255,81 @@ Connection: close
243
255
  </table>
244
256
  </div>
245
257
  </div>
246
- <!--END TAB 1-->
247
-
248
- <!--START TAB 2 -->
249
-
250
- <div id="tcontent2" class="tabcontent">
251
- <div class="excerpt">
252
- <div class="coffee">
253
- <h5>Novel Info is not available for this Author.</h5>
254
- </div>
255
- </div>
256
- </div>
257
- <!--END TAB 2 -->
258
- <!--START TAB 3 -->
259
- <div id="tcontent3" class="tabcontent">
260
- <div class="buddies">
261
- <h3>hollowedout's Writing Buddies</h3>
262
- <table border="0" width="500px" cellspacing="0" cellpadding="0" >
263
- <tr valign="top">
264
- <td width="250px">
265
- <table width="250px" class="buddyside">
258
+ <!--END TAB 1-->
259
+
260
+ <!--START TAB 2 -->
261
+
262
+ <div id="tcontent2" class="tabcontent">
263
+ <div class="excerpt">
264
+ <div class="coffee">
265
+ <div class="synopsis">
266
+ <h6 class="novel">Synopsis: Come to Call</h6>
267
+ <p>Go read Dumas' Count of Monte Cristo. Then listen to Nine Inch Nails' The Becoming about 1,000 times. Then think about how much of our national debt is owned by China. Then punch yourself in the junk. A lot. With brass knuckles. And ... THERE! That's about it. Can't wait to read it, right?</p>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ <!--END TAB 2 -->
273
+ <!--START TAB 3 -->
274
+ <div id="tcontent3" class="tabcontent">
275
+ <div class="buddies">
276
+ <h3>hollowedout's Writing Buddies</h3>
277
+ <table border="0" width="500px" cellspacing="0" cellpadding="0" >
278
+ <tr valign="top">
279
+ <td width="250px">
280
+ <table width="250px" class="buddyside">
266
281
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
267
282
  <a href="/eng/user/94450">lheannon</a></td>
268
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />53,343 / 50,000</td>
269
- </tr>
270
- <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/208549">knoppy44</a></td>
271
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,040 / 50,000</td>
283
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="10333 Written" width="20" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="39667 Remaining" width="80" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />10,333 / 50,000</td>
272
284
  </tr>
273
285
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
274
- <a href="/eng/user/236224">gnomishninja</a></td>
275
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />56,298 / 50,000</td>
276
- </tr>
277
- <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
278
- <a href="/eng/user/244939">LesaDragon</a></td>
279
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,008 / 50,000</td>
280
- </tr>
281
- <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
282
- <a href="/eng/user/301080">InfiniteLoop</a></td>
283
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,315 / 50,000</td>
284
- </tr>
285
- <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
286
- <a href="/eng/user/405136">Gemini4t</a></td>
287
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,082 / 50,000</td>
288
- </tr>
289
- </table>
290
- </td>
291
- <td width="3px" class="divide"></td>
292
- <td width="250px" >
293
- <table width="250px" class="buddyside">
294
- <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/139709">nightblade</a></td>
295
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,354 / 50,000</td>
286
+ <a href="/eng/user/139709">nightblade</a></td>
287
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="8123 Written" width="16" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="41877 Remaining" width="84" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />8,123 / 50,000</td>
296
288
  </tr>
297
289
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/229531">Pennstance</a></td>
298
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,441 / 50,000</td>
290
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="12556 Written" width="25" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="37444 Remaining" width="75" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />12,556 / 50,000</td>
299
291
  </tr>
300
292
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/240149">jkeene</a></td>
301
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />50,428 / 50,000</td>
293
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title=" Written" width="0" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="50000 Remaining" width="100" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />0 / 50,000</td>
302
294
  </tr>
303
295
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
304
296
  <a href="/eng/user/245095">hinge1492</a></td>
305
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />62,714 / 50,000</td>
297
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="17170 Written" width="34" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="32830 Remaining" width="66" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />17,170 / 50,000</td>
306
298
  </tr>
307
299
  <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/309620">LegendWrite</a></td>
308
- <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_winner.gif" title="Winner!" alt="Winner!" height="14" /><br />51,036 / 50,000</td>
300
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="10103 Written" width="20" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="39897 Remaining" width="80" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />10,103 / 50,000</td>
309
301
  </tr>
310
- </table>
311
- </td>
312
- </tr>
313
- </table>
314
- </div>
315
- </div>
316
- <!--END TAB 3 -->
317
- <!--START TAB 4 -->
318
- <div id="tcontent4" class="tabcontent">
319
- <div class="stats">
302
+ </table>
303
+ </td>
304
+ <td width="3px" class="divide"></td>
305
+ <td width="250px" >
306
+ <table width="250px" class="buddyside">
307
+ <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="http://store.lettersandlight.org/" class="halo"><img src="/sites/all/themes/nanowrimo/profile/haloIcon-buddy.gif" align="middle" border="0" alt="Glowing Halo" title="NaNoWriMo Donor" /></a><br />
308
+ <a href="/eng/user/126776">seattlekos</a></td>
309
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="17635 Written" width="35" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="32365 Remaining" width="65" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />17,635 / 50,000</td>
310
+ </tr>
311
+ <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/208549">knoppy44</a></td>
312
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="25169 Written" width="50" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="24831 Remaining" width="50" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />25,169 / 50,000</td>
313
+ </tr>
314
+ <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/236224">gnomishninja</a></td>
315
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="10135 Written" width="20" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="39865 Remaining" width="80" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />10,135 / 50,000</td>
316
+ </tr>
317
+ <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/244939">LesaDragon</a></td>
318
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title=" Written" width="0" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="50000 Remaining" width="100" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />0 / 50,000</td>
319
+ </tr>
320
+ <tr valign="bottom"><td align="right" valign="middle" class="buddy"><a href="/eng/user/301080">InfiniteLoop</a></td>
321
+ <td align="left" class="wordcount"><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_l.gif" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_completed.gif" title="10200 Written" width="20" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_remaining.gif" title="39800 Remaining" width="80" height="14" /><img src="/sites/all/themes/nanowrimo/wordcount/progress_end_r.gif" height="14" /><br />10,200 / 50,000</td>
322
+ </tr>
323
+ </table>
324
+ </td>
325
+ </tr>
326
+ </table>
327
+ </div>
328
+ </div>
329
+ <!--END TAB 3 -->
330
+ <!--START TAB 4 -->
331
+ <div id="tcontent4" class="tabcontent">
332
+ <div class="stats">
320
333
  <center>
321
334
  <div class="swf_chart">
322
335
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
@@ -325,10 +338,10 @@ Connection: close
325
338
  height="300"
326
339
  id="charts"
327
340
  >
328
- <param name=movie value="http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org/files/main/swfcharts/f79e715a3692bd8d363c5501036a4d6a.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK">
341
+ <param name=movie value="http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org/files/main/swfcharts/e6be2fcf705f7632bff7877baf6d8cdd.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK">
329
342
  <param name=quality value=400>
330
343
  <param name=bgcolor value=#FFFFFF>
331
- <embed src="http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org/files/main/swfcharts/f79e715a3692bd8d363c5501036a4d6a.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK"
344
+ <embed src="http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org/sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org/files/main/swfcharts/e6be2fcf705f7632bff7877baf6d8cdd.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK"
332
345
  quality=high
333
346
  bgcolor=#FFFFFF
334
347
  width="400"
@@ -350,10 +363,10 @@ Connection: close
350
363
  height="300"
351
364
  id="charts"
352
365
  >
353
- <param name=movie value="http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org//files/main/swfcharts/f55e805e2ad6f900bcf2d8b71a1b6a41.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK">
366
+ <param name=movie value="http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org//files/main/swfcharts/22ae59157102fea48e79ebd4b35ebe51.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK">
354
367
  <param name=quality value=400>
355
368
  <param name=bgcolor value=#FFFFFF>
356
- <embed src="http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org//files/main/swfcharts/f55e805e2ad6f900bcf2d8b71a1b6a41.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK"
369
+ <embed src="http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts.swf?library_path=http://www.nanowrimo.org//sites/all/modules/swfcharts/charts/charts_library&xml_source=http://www.nanowrimo.org//files/main/swfcharts/22ae59157102fea48e79ebd4b35ebe51.xml&license=G1XZ773RX9-L6-O5T4Q79KLYCK07EK"
357
370
  quality=high
358
371
  bgcolor=#FFFFFF
359
372
  width="400"
@@ -367,10 +380,10 @@ Connection: close
367
380
  </object>
368
381
  </div><!-- end swf_chart--></center>
369
382
  <br />
370
- </div>
371
- </div>
372
- <!--END TAB 4 -->
373
-
383
+ </div>
384
+ </div>
385
+ <!--END TAB 4 -->
386
+
374
387
  </div>
375
388
 
376
389
  <script type="text/javascript">
@@ -385,15 +398,18 @@ Connection: close
385
398
  <!-- *** Footer *** -->
386
399
  <div id="footerContainer">
387
400
  <p class="detailText">
388
- <a href="/">Home</a> :: <a href="/eng/whatisnano">About</a> :: <a href="/eng/authors">Authors</a> :: <a href="/eng/mynanowrimo">My NaNoWriMo</a> :: <a href="/eng/faq">FAQs</a> :: <a href="/eng/webbadges">Fun Stuff</a> :: <a href="http://store.lettersandlight.org">Donation/Store</a> :: <a href="/eng/forum">Forums</a> :: <a href="/eng/ywp">Our Programs</a><br /><a href="/eng/privacypolicy">Privacy Policy</a> :: <a href="/eng/termsandconditions">Terms and Conditions</a> :: <a href="/eng/codesofconduct">Codes of Conduct</a> :: <a href="/eng/returnspolicy">Returns Policy</a><br /><br />Copyright © 2008 The Office of Letters and Light :: All posted novel excerpts remain copyright their authors.<br />
389
- Powered by <a href="http://www.drupal.org">Drupal</a>
401
+ <a href="/">Home</a> :: <a href="/eng/whatisnano">About</a> :: <a href="/eng/search/google">Search</a> :: <a href="/eng/mynanowrimo">My NaNoWriMo</a> :: <a href="/eng/faq">FAQs</a> :: <a href="/eng/webbadges">Fun Stuff</a> :: <a href="http://store.lettersandlight.org">Donation/Store</a> :: <a href="/eng/forum">Forums</a> :: <a href="/eng/ywp">More from OLL</a><br /><a href="/eng/privacypolicy">Privacy Policy</a> :: <a href="/eng/termsandconditions">Terms and Conditions</a> :: <a href="/eng/codesofconduct">Codes of Conduct</a> :: <a href="/eng/returnspolicy">Returns Policy</a><br /><br />Copyright © 2009 The Office of Letters and Light :: All posted novel excerpts remain copyright their authors.<br />
402
+ Powered by <a href="http://www.drupal.org">Drupal</a><br /><br />
403
+ <a href="http://aws.amazon.com/ec2" target="_blank"><img src="/files/main/images/PBAWS_LOGO_127px.JPG" alt="" title="" class="image image-_original" width="127" height="52" /></a>
390
404
  </p>
391
405
  </div>
392
406
  <!-- END Footer -->
393
- <script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script><script type="text/javascript">_uacct = "UA-635901-1";urchinTracker();</script>
394
- </div>
407
+ <script type="text/javascript" src="/sites/all/modules/google_analytics/googleanalytics.js"></script>
408
+ <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
409
+ <script type="text/javascript">var pageTracker = _gat._getTracker("UA-635901-1");pageTracker._trackPageview();</script>
410
+
411
+ </div>
395
412
  <!-- Close Auto Container -->
396
413
  </body>
397
414
  </html>
398
415
  </div>
399
- <!-- Page eng/user/240659 cached by Boost at 2009-05-25 17:51:51, expires at 2009-05-25 18:51:51 -->
data/test/test_genre.rb CHANGED
@@ -21,7 +21,7 @@ class TestGenre < Test::Unit::TestCase
21
21
 
22
22
  def test_genre_loads_current_data
23
23
  file = 'test/fixtures/genre_wc.xml'
24
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcgenre/13", :file => file)
24
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcgenre/13", :body => file)
25
25
  @genre.load
26
26
  Nanowrimo::Genre::FIELDS.each do |f|
27
27
  assert @genre.send(:"#{f}")
@@ -30,7 +30,7 @@ class TestGenre < Test::Unit::TestCase
30
30
 
31
31
  def test_genre_loads_historical_data
32
32
  file = 'test/fixtures/genre_wc_history.xml'
33
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcgenrehist/13", :file => file)
33
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcgenrehist/13", :body => file)
34
34
  @genre.load_history
35
35
  assert @genre.history
36
36
  # So...
@@ -43,7 +43,7 @@ class TestGenre < Test::Unit::TestCase
43
43
  def test_unknown_genre_produces_error_data
44
44
  bad_genre = Nanowrimo::Genre.new("999999")
45
45
  file = "test/fixtures/genre_wc_error.xml"
46
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcgenre/999999", :file => file)
46
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcgenre/999999", :body => file)
47
47
  bad_genre.load
48
48
  assert bad_genre.has_error?
49
49
  assert_equal "genre not found", bad_genre.error
@@ -52,7 +52,7 @@ class TestGenre < Test::Unit::TestCase
52
52
  def test_unknown_genre_produces_historical_error_data
53
53
  bad_genre = Nanowrimo::Genre.new("999999")
54
54
  file = "test/fixtures/genre_wc_history_error.xml"
55
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcgenrehist/999999", :file => file)
55
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcgenrehist/999999", :body => file)
56
56
  bad_genre.load_history
57
57
  assert bad_genre.has_error?
58
58
  assert_equal "genre not found", bad_genre.error
@@ -28,7 +28,7 @@ class TestNanowrimo < Test::Unit::TestCase
28
28
  path = "wc"
29
29
  key = 240659
30
30
  file = "test/fixtures/user_wc.xml"
31
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
31
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
32
32
  actual = Nanowrimo.data_from_internets(path, key, attribs).first
33
33
  expected = {
34
34
  :uid => "240659",
@@ -43,7 +43,7 @@ class TestNanowrimo < Test::Unit::TestCase
43
43
  path = "wc"
44
44
  key = 240659
45
45
  file = "test/fixtures/user_wc.xml"
46
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
46
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
47
47
  actual = Nanowrimo.parse(path, key, attribs).first
48
48
  expected = {
49
49
  :uid => "240659",
@@ -59,7 +59,7 @@ class TestNanowrimo < Test::Unit::TestCase
59
59
  key = 240659
60
60
  file = "test/fixtures/user_wc.xml"
61
61
  File.delete(Nanowrimo::Cache::CACHE_FILE) if File.exist?(Nanowrimo::Cache::CACHE_FILE)
62
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
62
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
63
63
  Nanowrimo.data_from_internets(path, key, attribs)
64
64
  FakeWeb.clean_registry
65
65
  actual = Nanowrimo.data_from_cache(path, key).first
@@ -77,7 +77,7 @@ class TestNanowrimo < Test::Unit::TestCase
77
77
  key = 240659
78
78
  file = "test/fixtures/user_wc.xml"
79
79
  File.delete(Nanowrimo::Cache::CACHE_FILE) if File.exist?(Nanowrimo::Cache::CACHE_FILE)
80
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
80
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
81
81
  Nanowrimo.parse(path, key, attribs)
82
82
  FakeWeb.clean_registry
83
83
  actual = {}
@@ -97,7 +97,7 @@ class TestNanowrimo < Test::Unit::TestCase
97
97
  path = "wchistory/wordcounts/wcentry"
98
98
  key = 240659
99
99
  file = "test/fixtures/user_wc_history.xml"
100
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wchistory/#{key}", :file => file)
100
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wchistory/#{key}", :body => file)
101
101
  data = Nanowrimo.parse(path, key, attribs)
102
102
  assert_equal 30, data.size
103
103
  data.each do |d|
@@ -112,7 +112,7 @@ class TestNanowrimo < Test::Unit::TestCase
112
112
  path = "wc"
113
113
  key = 999999
114
114
  file = "test/fixtures/user_wc_error.xml"
115
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
115
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
116
116
  actual = Nanowrimo.data_from_internets(path, key, attribs).first
117
117
  expected = {
118
118
  :error => "user not found or is inactive"
@@ -125,7 +125,7 @@ class TestNanowrimo < Test::Unit::TestCase
125
125
  path = "wc"
126
126
  key = 999999
127
127
  file = "test/fixtures/user_wc_error.xml"
128
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/#{key}", :file => file)
128
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/#{key}", :body => file)
129
129
  data = Nanowrimo.parse(path, key, attribs)
130
130
  FakeWeb.clean_registry
131
131
  assert_raise FakeWeb::NetConnectNotAllowedError do
data/test/test_region.rb CHANGED
@@ -21,7 +21,7 @@ class TestRegion < Test::Unit::TestCase
21
21
 
22
22
  def test_region_loads_current_data
23
23
  file = 'test/fixtures/region_wc.xml'
24
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcregion/84", :file => file)
24
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcregion/84", :body => file)
25
25
  @region.load
26
26
  Nanowrimo::Region::FIELDS.each do |f|
27
27
  assert @region.send(:"#{f}")
@@ -30,7 +30,7 @@ class TestRegion < Test::Unit::TestCase
30
30
 
31
31
  def test_region_loads_historical_data
32
32
  file = 'test/fixtures/region_wc_history.xml'
33
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcregionhist/84", :file => file)
33
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcregionhist/84", :body => file)
34
34
  @region.load_history
35
35
  assert @region.history
36
36
  assert_equal 9, @region.history.first.size
@@ -40,7 +40,7 @@ class TestRegion < Test::Unit::TestCase
40
40
  def test_unknown_region_produces_error_data
41
41
  bad_region = Nanowrimo::Region.new("999999")
42
42
  file = "test/fixtures/region_wc_error.xml"
43
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcregion/999999", :file => file)
43
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcregion/999999", :body => file)
44
44
  bad_region.load
45
45
  assert bad_region.has_error?
46
46
  assert_equal "region not found", bad_region.error
@@ -49,7 +49,7 @@ class TestRegion < Test::Unit::TestCase
49
49
  def test_unknown_region_produces_historical_error_data
50
50
  bad_region = Nanowrimo::Region.new("999999")
51
51
  file = "test/fixtures/region_wc_history_error.xml"
52
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcregionhist/999999", :file => file)
52
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcregionhist/999999", :body => file)
53
53
  bad_region.load_history
54
54
  assert bad_region.has_error?
55
55
  assert_equal "region not found", bad_region.error
data/test/test_site.rb CHANGED
@@ -21,7 +21,7 @@ class TestSite < Test::Unit::TestCase
21
21
 
22
22
  def test_site_loads_data
23
23
  file = 'test/fixtures/site_wc.xml'
24
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcstatssummary", :file => file)
24
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcstatssummary", :body => file)
25
25
  @site.load
26
26
  Nanowrimo::Site::FIELDS.each do |f|
27
27
  assert @site.send(:"#{f}"), "Failed on #{f}"
@@ -30,7 +30,7 @@ class TestSite < Test::Unit::TestCase
30
30
 
31
31
  def test_site_loads_historical_data
32
32
  file = 'test/fixtures/site_wc_history.xml'
33
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wcstats", :file => file)
33
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wcstats", :body => file)
34
34
  @site.load_history
35
35
  assert @site.history
36
36
  assert_equal 30, @site.history.size
data/test/test_user.rb CHANGED
@@ -26,7 +26,7 @@ class TestUser < Test::Unit::TestCase
26
26
 
27
27
  def test_user_gets_data
28
28
  file = "test/fixtures/user_wc.xml"
29
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/240659", :file => file)
29
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/240659", :body => file)
30
30
  @user.load
31
31
  assert @user.uname
32
32
  assert_equal "hollowedout", @user.uname
@@ -36,7 +36,7 @@ class TestUser < Test::Unit::TestCase
36
36
 
37
37
  def test_user_loads_history_data
38
38
  file = "test/fixtures/user_wc_history.xml"
39
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wchistory/240659", :file => file)
39
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wchistory/240659", :body => file)
40
40
  @user.load_history
41
41
  assert @user.history
42
42
  assert_equal 30, @user.history.size
@@ -74,13 +74,13 @@ class TestUser < Test::Unit::TestCase
74
74
  def test_find_users_novel_title
75
75
  profile_uri_setup
76
76
  @user.parse_profile
77
- assert_equal "Interpolis", @user.novel[:title]
77
+ assert_equal "Come to Call", @user.novel[:title]
78
78
  end
79
79
 
80
80
  def test_find_users_genre
81
81
  profile_uri_setup
82
82
  @user.parse_profile
83
- assert_equal "Science Fiction", @user.genre[:name]
83
+ assert_equal "Mainstream Fiction", @user.genre[:name]
84
84
  end
85
85
 
86
86
  def test_find_users_buddies
@@ -88,12 +88,13 @@ class TestUser < Test::Unit::TestCase
88
88
  @user.parse_profile
89
89
  assert @user.buddies.instance_of?(Array)
90
90
  assert_equal 11, @user.buddies.size
91
+ assert @user.buddies.include?("245095")
91
92
  end
92
93
 
93
94
  def test_unknown_user_produces_error_data
94
95
  bad_user = Nanowrimo::User.new("999999")
95
96
  file = "test/fixtures/user_wc_error.xml"
96
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wc/999999", :file => file)
97
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wc/999999", :body => file)
97
98
  bad_user.load
98
99
  assert bad_user.has_error?
99
100
  assert_equal "user not found or is inactive", bad_user.error
@@ -102,7 +103,7 @@ class TestUser < Test::Unit::TestCase
102
103
  def test_unknown_user_produces_historical_error_data
103
104
  bad_user = Nanowrimo::User.new("999999")
104
105
  file = "test/fixtures/user_wc_history_error.xml"
105
- FakeWeb.register_uri("#{Nanowrimo::API_URI}/wchistory/999999", :file => file)
106
+ FakeWeb.register_uri(:any, "#{Nanowrimo::API_URI}/wchistory/999999", :body => file)
106
107
  bad_user.load_history
107
108
  assert bad_user.has_error?
108
109
  assert_equal "user not found or is inactive", bad_user.error
@@ -113,6 +114,6 @@ class TestUser < Test::Unit::TestCase
113
114
  # even then it would register the file from FakeWeb as WWW::Mechanize::File, not WWW::Mechanize::Page
114
115
  # discussion started at http://groups.google.com/group/fakeweb-users/browse_thread/thread/e01b6280e720ae6f
115
116
  file = File.read("test/fixtures/user_page.htm")
116
- FakeWeb.register_uri("http://www.nanowrimo.org/eng/user/240659", :response => file)
117
+ FakeWeb.register_uri(:any, "http://www.nanowrimo.org/eng/user/240659", :response => file)
117
118
  end
118
119
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanowrimo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Clingenpeel
@@ -9,9 +9,29 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-12 00:00:00 -07:00
12
+ date: 2009-11-12 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: mechanize
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - "="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.9.3
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: fakeweb
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.7
34
+ version:
15
35
  - !ruby/object:Gem::Dependency
16
36
  name: hoe
17
37
  type: :development
@@ -20,7 +40,7 @@ dependencies:
20
40
  requirements:
21
41
  - - ">="
22
42
  - !ruby/object:Gem::Version
23
- version: 1.7.0
43
+ version: 2.3.3
24
44
  version:
25
45
  description: |-
26
46
  A simple API wrapper for Nanowrimo.org. Nanowrimo Word Count API documentation here:
@@ -94,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
114
  requirements: []
95
115
 
96
116
  rubyforge_project: nanowrimo
97
- rubygems_version: 1.3.2
117
+ rubygems_version: 1.3.5
98
118
  signing_key:
99
119
  specification_version: 3
100
120
  summary: A simple API wrapper for Nanowrimo.org