urban_dictionary 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/Gemfile.lock CHANGED
@@ -1,19 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- urban_dictionary (0.0.1)
4
+ urban_dictionary (0.0.2)
5
5
  nokogiri (~> 1.5.2)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- nokogiri (1.5.2)
10
+ diff-lcs (1.1.3)
11
+ nokogiri (1.5.5)
11
12
  rake (0.9.2.2)
13
+ rspec (2.11.0)
14
+ rspec-core (~> 2.11.0)
15
+ rspec-expectations (~> 2.11.0)
16
+ rspec-mocks (~> 2.11.0)
17
+ rspec-core (2.11.1)
18
+ rspec-expectations (2.11.3)
19
+ diff-lcs (~> 1.1.3)
20
+ rspec-mocks (2.11.3)
12
21
 
13
22
  PLATFORMS
14
23
  ruby
15
24
 
16
25
  DEPENDENCIES
17
- bundler (~> 1.0.22)
18
26
  rake
27
+ rspec
19
28
  urban_dictionary!
data/README.md CHANGED
@@ -8,7 +8,7 @@ Run `gem install urban_dictionary`.
8
8
 
9
9
  ## Usage ##
10
10
 
11
- Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries. Each entry has a definition and an example.
11
+ Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries, or nil if the word is not found. Each entry has a definition and an example.
12
12
 
13
13
  require 'urban_dictionary'
14
14
 
@@ -33,4 +33,11 @@ The urban_dictionary gem includes a command-line interface:
33
33
 
34
34
  You can use the `--random` flag to get the definition of random word:
35
35
 
36
- > urban_dictionary --random
36
+ > urban_dictionary --random
37
+
38
+ ## Tests ##
39
+
40
+ Run examples with:
41
+
42
+ rspec
43
+
@@ -1,3 +1,3 @@
1
1
  module UrbanDictionary
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -10,12 +10,14 @@ module UrbanDictionary
10
10
  html = open(url).read
11
11
  doc = Nokogiri::HTML(html)
12
12
 
13
- word = doc.css('.word').first.content.strip
14
- definitions = doc.css('.definition').map{|d| d.content.strip }
15
- examples = doc.css('.example').map{|e| e.content.strip }
16
- entries = definitions.zip(examples).map{|d,e| Entry.new(d, e)}
13
+ if doc.css('.word').any?
14
+ word = doc.css('.word').first.content.strip
15
+ definitions = doc.css('.definition').map{|d| d.content.strip }
16
+ examples = doc.css('.example').map{|e| e.content.strip }
17
+ entries = definitions.zip(examples).map{|d,e| Entry.new(d, e)}
17
18
 
18
- Word.new(word, entries)
19
+ Word.new(word, entries)
20
+ end
19
21
  end
20
22
 
21
23
  def initialize(word, entries)
@@ -20,6 +20,6 @@ module UrbanDictionary
20
20
  http.request(req)
21
21
  }
22
22
 
23
- Word.from_url(rsp['location'])
23
+ define(rsp['location'])
24
24
  end
25
25
  end
@@ -0,0 +1,356 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>Urban Dictionary: test1234</title>
5
+ <script type='text/javascript'>
6
+ //<![CDATA[
7
+ var MobileDetector={redirect:function(b,a){if(b&&b.match(/(iPhone|iPod|Android)/)){this.go(a)}},go:function(a){window.location=a}};
8
+ MobileDetector.redirect(navigator.userAgent, "http://m.urbandictionary.com/#define?term=test1234");
9
+ //]]>
10
+ </script>
11
+
12
+
13
+ <!--[if (!IE)|(gte IE 8)]><!-->
14
+ <link href="http://static1.urbandictionary.com/rel-b45e9eb/assets/base-datauri.css" media="screen" rel="stylesheet" type="text/css" />
15
+ <!--<![endif]-->
16
+ <!--[if lte IE 7]>
17
+ <link href="http://static0.urbandictionary.com/rel-b45e9eb/assets/base.css" media="screen" rel="stylesheet" type="text/css" />
18
+ <![endif]-->
19
+ <link href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" rel="alternate" title="Urban Word of the Day" type="application/rss+xml" />
20
+ <link href="http://static2.urbandictionary.com/rel-b45e9eb/favicon.ico" rel="shortcut icon" /><link href="http://static2.urbandictionary.com/rel-b45e9eb/favicon.ico" rel="icon" />
21
+
22
+
23
+ <link href='http://static2.urbandictionary.com/rel-b45e9eb/osd.xml' rel='search' title='Urban Dictionary Search' type='application/opensearchdescription+xml' />
24
+ <meta content='One of the most common passwords used by sad, innocent souls.' name='Description' />
25
+ <meta content='One of the most common passwords used by sad, innocent souls.' property='og:description' />
26
+ <meta content='test1234' property='og:title' />
27
+ <meta content="http://static0.urbandictionary.com/rel-b45e9eb/images/og_image.png" property="og:image" />
28
+ <meta content='Urban Dictionary' property='og:site_name' />
29
+ </head>
30
+ <body class='define_controller'>
31
+ <div class='hidden' id='rollup'></div>
32
+ <div id='header_background'>
33
+ <div id='header_width'>
34
+ <div id='header'>
35
+ <a href="/" id="logo_anchor"><img alt="" id="logo" src="http://static0.urbandictionary.com/rel-b45e9eb/images/logo-holiday.png" /></a>
36
+ <div id='like_button'>
37
+ <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Furbandictionary&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
38
+ </div>
39
+ <div id='form'>
40
+ <form action="/define.php" method="get">
41
+ <table>
42
+ <tr>
43
+ <td class='look_up'>look up any word:</td>
44
+ </tr>
45
+ <tr>
46
+ <td><input id="term" name="term" tabindex="1" type="text" value="test1234" /></td>
47
+ <td>
48
+ <input type='submit' value='search' />
49
+ </td>
50
+ </tr>
51
+ </table>
52
+ </form>
53
+ </div>
54
+ <div id='topnav'>
55
+ <a href="/">word of the day</a> <a class="active" href="/popular.php?character=A">dictionary</a> <a href="/thesaurus.php">thesaurus</a> <a href="/names.php">names</a> <a href="/video.list.php">media</a> <a href="/products.php">store</a> <a href="/add.php">add</a> <a href="/editor/staygo.php">edit</a> <a href="http://blog.urbandictionary.com/">blog</a>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <div id='outer'>
62
+ <div class='' id='whole'>
63
+ <div class='innernav' id='subnav'>
64
+ <a accesskey="1" href="/random.php">random</a> <a href="/popular.php?character=A">A</a> <a href="/popular.php?character=B">B</a> <a href="/popular.php?character=C">C</a> <a href="/popular.php?character=D">D</a> <a href="/popular.php?character=E">E</a> <a href="/popular.php?character=F">F</a> <a href="/popular.php?character=G">G</a> <a href="/popular.php?character=H">H</a> <a href="/popular.php?character=I">I</a> <a href="/popular.php?character=J">J</a> <a href="/popular.php?character=K">K</a> <a href="/popular.php?character=L">L</a> <a href="/popular.php?character=M">M</a> <a href="/popular.php?character=N">N</a> <a href="/popular.php?character=O">O</a> <a href="/popular.php?character=P">P</a> <a href="/popular.php?character=Q">Q</a> <a href="/popular.php?character=R">R</a> <a href="/popular.php?character=S">S</a> <a class="active" href="/browse.php?word=test1234">T</a> <a href="/popular.php?character=U">U</a> <a href="/popular.php?character=V">V</a> <a href="/popular.php?character=W">W</a> <a href="/popular.php?character=X">X</a> <a href="/popular.php?character=Y">Y</a> <a href="/popular.php?character=Z">Z</a> <a href="/browse.php?character=%2A">#</a> <a href="/yesterday.php?date=2012-10-20">new</a> <a href="/favorites.php">favorites</a> <a href="http://urbandictionary.tv/" target="_blank">tv</a>
65
+ </div>
66
+ <table cellpadding='0' cellspacing='0' id='tablist'>
67
+ <tr>
68
+ <td id='leftist'>
69
+ <div id='nearby_titles'>
70
+ <p>most popular</p>
71
+ <ul>
72
+ <li><a href="/define.php?term=Suicide%20doors">Suicide doors</a></li>
73
+ <li><a href="/define.php?term=Eazy%20E">Eazy E</a></li>
74
+ <li><a href="/define.php?term=Maricon">Maricon</a></li>
75
+ <li><a href="/define.php?term=WOW">WOW</a></li>
76
+ <li><a href="/define.php?term=how%20i%20met%20your%20mother">how i met your mother</a></li>
77
+ <li><a href="/define.php?term=Clinton">Clinton</a></li>
78
+ <li><a href="/define.php?term=yak">yak</a></li>
79
+ <li><a href="/define.php?term=cosplay">cosplay</a></li>
80
+ </ul>
81
+ <p>alphabetical</p>
82
+ <ul>
83
+ <li><a href="/define.php?term=Tesslla">Tesslla</a></li><li><a href="/define.php?term=Tesslyn">Tesslyn</a></li><li><a href="/define.php?term=Tessmarie">Tessmarie</a></li><li><a href="/define.php?term=tessmer">tessmer</a></li><li><a href="/define.php?term=%23tessmoment">#tessmoment</a></li><li><a href="/define.php?term=tessology">tessology</a></li><li><a href="/define.php?term=tesspanish">tesspanish</a></li><li><a href="/define.php?term=tesstastic">tesstastic</a></li><li><a href="/define.php?term=Tess%20Taylor">Tess Taylor</a></li><li><a href="/define.php?term=TESStd">TESStd</a></li><li><a href="/define.php?term=tesstickles">tesstickles</a></li><li><a href="/define.php?term=Tessting">Tessting</a></li><li><a href="/define.php?term=tesstkal">tesstkal</a></li><li><b><a href="/define.php?term=test">test</a></b></li><li><a href="/define.php?term=Test%21">Test!</a></li><li class="active">test1234</li><li><a href="/define.php?term=test23">test23</a></li><li><a href="/define.php?term=Testa">Testa</a></li><li><a href="/define.php?term=testaboobie">testaboobie</a></li><li><a href="/define.php?term=testaburger">testaburger</a></li><li><a href="/define.php?term=Testache">Testache</a></li><li><a href="/define.php?term=testackle">testackle</a></li><li><a href="/define.php?term=testacle%20delight%27s">testacle delight's</a></li><li><a href="/define.php?term=testaclees">testaclees</a></li><li><a href="/define.php?term=Testacle%20Receptacle">Testacle Receptacle</a></li><li><a href="/define.php?term=testaclit">testaclit</a></li><li><a href="/define.php?term=Testaclops">Testaclops</a></li><li><a href="/define.php?term=testacolies">testacolies</a></li><li><a href="/define.php?term=Testacular">Testacular</a></li><li><a href="/define.php?term=Testacuzzi">Testacuzzi</a></li><li><a href="/define.php?term=Testa%20D">Testa D</a></li><li><a href="/define.php?term=testa%20di%20cazzo">testa di cazzo</a></li><li><a href="/define.php?term=Testages">Testages</a></li><li><a href="/define.php?term=Testalitius">Testalitius</a></li><li><b><a href="/define.php?term=Testament">Testament</a></b></li><li><a href="/define.php?term=Testament%27">Testament'</a></li><li><a href="/define.php?term=test%20and%20tag">test and tag</a></li><li><a href="/define.php?term=test%20and%20tell">test and tell</a></li><li><a href="/define.php?term=Test%20Animal">Test Animal</a></li><li><a href="/define.php?term=testant">testant</a></li><li><a href="/define.php?term=Testarded">Testarded</a></li>
84
+ </ul>
85
+ </div>
86
+
87
+ </td>
88
+ <td>
89
+ <div id='content'><!-- google_ad_section_start --><table id='entries'>
90
+ <tr>
91
+ <td class='index'>
92
+ <a href="http://test1234.urbanup.com/2819077">1.</a>
93
+ </td>
94
+ <td class='word'>
95
+ test1234
96
+ </td>
97
+ <td class='tools' id='tools_2819077'>
98
+ <span class='status'></span>
99
+ <span class='thumbs'></span>
100
+ </td>
101
+ </tr>
102
+ <tr>
103
+ <td></td>
104
+ <td class='text' colspan='2' id='entry_2819077'>
105
+ <div class="definition">One of the most common passwords used by sad, innocent souls.</div><div class="example">I set my password to test1234, because I like being hacked</div>
106
+ <div class="zazzle_links"><a href="/products.php?term=test1234&amp;defid=2819077"><span class="zazzle_link_text">buy test1234 mugs & shirts</span></a></div>
107
+ <div class='greenery'>
108
+ <a href="/define.php?term=foo">foo</a>
109
+ <a href="/define.php?term=bar">bar</a>
110
+ <a href="/define.php?term=password">password</a>
111
+ <a href="/define.php?term=pass">pass</a>
112
+ <a href="/define.php?term=test">test</a>
113
+ <br />
114
+ by <a href="/author.php?author=Joe+User1" class="author">Joe User1</a>
115
+ <span class='date'>
116
+ Jan 27, 2008
117
+ </span>
118
+ <a href="#" id="share_this_2819077" onclick="emailer.toggle($(&quot;#share_this_2819077&quot;), &quot;http://test1234.urbanup.com/2819077&quot;, &quot;Entry&quot;, 2819077, &quot;http://twitter.com/share?text=test1234%20-%20One%20of%20the%20most%20common%20passwords%20used%20by%20sad%2C%20innocent%20souls.\u0026url=http%3A%2F%2Furbanup.com%2F2819077\u0026via=urbandictionary&quot;); return false;">share this</a>
119
+ <a href="/video.php?defid=2819077&amp;word=test1234">add a video</a>
120
+ </div>
121
+ </td>
122
+ </tr>
123
+
124
+ </table>
125
+ <div id='paginator'>
126
+
127
+ </div>
128
+ <!-- google_ad_section_end --><div id='email_pane' style='display: none'>
129
+ <form action='javascript:void(0)' onsubmit='emailer.sendEmail(); return false'>
130
+ <table cellpadding='0' cellspacing='0'>
131
+ <tr>
132
+ <th>
133
+ <label for='permalink'>permalink:</label>
134
+ </th>
135
+ <td>
136
+ <input id='permalink' name='permalink' onclick='this.focus(); this.select()' type='text' />
137
+ <input id='shared_id' name='share[shared_id]' type='hidden' />
138
+ <input id='shared_type' name='share[shared_type]' type='hidden' value='Entry' />
139
+ </td>
140
+ </tr>
141
+ <tr>
142
+ <td></td>
143
+ <td>
144
+ Share on
145
+ <span id='share_links'></span>
146
+ </td>
147
+ </tr>
148
+ <tr id='sendtoafriend'>
149
+ <td></td>
150
+ <td>
151
+ <label for='yours'>Send to a friend</label>
152
+ </td>
153
+ </tr>
154
+ <tr>
155
+ <th>
156
+ <label for='yours'>your email:</label>
157
+ </th>
158
+ <td>
159
+ <input id='yours' name='share[yours]' type='text' />
160
+ </td>
161
+ </tr>
162
+ <tr>
163
+ <th>
164
+ <label for='theirs'>their email:</label>
165
+ </th>
166
+ <td>
167
+ <input id='theirs' name='share[theirs]' type='text' />
168
+ </td>
169
+ </tr>
170
+ <tr>
171
+ <th>
172
+ <label for='comment'>comment:</label>
173
+ </th>
174
+ <td>
175
+ <textarea id="comment" name="share[comment]" rows="3"></textarea>
176
+ </td>
177
+ </tr>
178
+ <tr>
179
+ <td></td>
180
+ <td>
181
+ <input id='subscribe' name='subscribe' type='checkbox' />
182
+ <label for='subscribe'> send me the word of the day (it's free)</label>
183
+ </td>
184
+ </tr>
185
+ <tr id='submit'>
186
+ <td></td>
187
+ <td>
188
+ <table>
189
+ <tr>
190
+ <td>
191
+ <input type='submit' value='Send message' />
192
+ </td>
193
+ <td id='status'></td>
194
+ </tr>
195
+ </table>
196
+ </td>
197
+ </tr>
198
+ </table>
199
+ </form>
200
+ </div>
201
+
202
+ </div>
203
+ </td>
204
+ <td id='rightist'>
205
+ <script type="text/javascript">
206
+ //<![CDATA[
207
+ var googletag = googletag || {};
208
+ googletag.cmd = googletag.cmd || [];
209
+ googletag.cmd.push(function() {
210
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/HP_ATF_300x250', [300, 250], 'dfp_homepage_medium_rectangle').addService(googletag.pubads());
211
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/HP_BTF_300x250', [300, 250], 'dfp_homepage_medium_rectangle_below').addService(googletag.pubads());
212
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_BTF_728x90', [728, 90], 'dfp_every_page_leaderboard').addService(googletag.pubads());
213
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_Right_160x60', [160, 600], 'dfp_skyscraper').addService(googletag.pubads());
214
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/Define_300x250', [300, 250], 'dfp_define_rectangle').addService(googletag.pubads());
215
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_500x250', [475, 250], 'dfp_define_double_rectangle').addService(googletag.pubads());
216
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/Define_300x250_BTF', [300, 250], 'dfp_define_rectangle_btf').addService(googletag.pubads());
217
+
218
+ googletag.pubads().set("alternate_ad_url", "http://www.urbandictionary.com/google_alternate_ad.html");
219
+ googletag.pubads().setTargeting("safe_word", "false");
220
+
221
+ googletag.pubads().enableSingleRequest();
222
+ googletag.enableServices();
223
+ });
224
+
225
+ (function() {
226
+ var gads = document.createElement('script');
227
+ gads.async = true;
228
+ gads.type = 'text/javascript';
229
+ gads.src = "http://www.googletagservices.com/tag/js/gpt.js";
230
+ var node = document.getElementsByTagName('script')[0];
231
+ node.parentNode.insertBefore(gads, node);
232
+ })();
233
+
234
+ //]]>
235
+ </script><div id="dfp_skyscraper" style="width: 160px; height: 600px"><script type="text/javascript">
236
+ //<![CDATA[
237
+ googletag.cmd.push(function() { googletag.display('dfp_skyscraper'); });
238
+ //]]>
239
+ </script></div>
240
+ </td>
241
+ </tr>
242
+ </table>
243
+
244
+ <div id='bottomad'>
245
+ <div id="dfp_every_page_leaderboard" style="width: 728px; height: 90px; margin: 0 auto"><script type="text/javascript">
246
+ //<![CDATA[
247
+ googletag.cmd.push(function() { googletag.display('dfp_every_page_leaderboard'); });
248
+ //]]>
249
+ </script></div>
250
+ </div>
251
+ </div>
252
+ <div id='copyright'>
253
+ <a href="/">Urban Dictionary</a>
254
+ <span id='years'>
255
+ &copy;1999-2012
256
+ </span>
257
+ <a href='/tos.php'>terms of service</a>
258
+ <a href='/privacy.php'>privacy</a>
259
+ <a href='/feedback.php'>feedback</a>
260
+ <a href='/editor/remove.php'>remove</a>
261
+ <a href='/ads.php'>advertise</a>
262
+ <a href='/poweredby.php'>technology</a>
263
+ <a href='http://jobs.urbandictionary.com/'>jobs</a>
264
+ <a href='#' onclick="javascript:window.open('http://urbandictionary.wufoo.com/forms/api-interest-form/', 'wufoo', 'width=640,height=600'); return false">api</a>
265
+ </div>
266
+
267
+ <table class='offsite'>
268
+ <tr>
269
+ <td>
270
+ <table class='facebook'>
271
+ <tr>
272
+ <td>
273
+ <a href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" onclick="urchinTracker(&quot;/outgoing/http_feeds_urbandictionary_com_UrbanWordOfTheDay&quot;)"><div class="rss_image"></div></a>
274
+ </td>
275
+ <td>
276
+ <a href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" onclick="urchinTracker(&quot;/outgoing/http_feeds_urbandictionary_com_UrbanWordOfTheDay&quot;)">add via <b>rss</b></a>
277
+ <br />
278
+ <a href="http://www.google.com/calendar/render?cid=http%3A%2F%2Fwww.urbandictionary.com%2Fdaily.ics" onclick="urchinTracker(&quot;/outgoing/http_www_google_com_calendar_render_cid_http_A_F_Fwww_urbandictionary_com_Fdaily_ics&quot;)">or <b>google calendar</b></a>
279
+ </td>
280
+ </tr>
281
+ </table>
282
+ </td>
283
+ <td>
284
+ <table class='facebook'>
285
+ <tr>
286
+ <td>
287
+ <a href="http://www.facebook.com/profile.php?id=6295613171" onclick="urchinTracker(&quot;/outgoing/http_www_facebook_com_profile_php_id&quot;)"><div class="facebook_image"></div></a>
288
+ </td>
289
+ <td>
290
+ <a href="http://www.facebook.com/profile.php?id=6295613171" onclick="urchinTracker(&quot;/outgoing/http_www_facebook_com_profile_php_id&quot;)">add <b>urban dictionary</b><br/>on <b>facebook</b></a>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ </td>
295
+ <td>
296
+ <table class='facebook'>
297
+ <tr>
298
+ <td>
299
+ <div class='iphone_image'></div>
300
+ </td>
301
+ <td>
302
+ search ud
303
+ <br />
304
+ <a href="http://m.urbandictionary.com/" onclick="urchinTracker(&quot;/outgoing/http_m_urbandictionary_com&quot;)">from your <b>phone</b></a>
305
+ <br />
306
+ <a href="/sms.php" onclick="urchinTracker(&quot;/outgoing/sms_php&quot;)">or via <b>txt</b></a>
307
+ </td>
308
+ </tr>
309
+ </table>
310
+ </td>
311
+ <td>
312
+ <table class='facebook'>
313
+ <tr>
314
+ <td>
315
+ <a href="http://twitter.com/urbandictionary/" onclick="urchinTracker(&quot;/outgoing/http_twitter_com_urbandictionary&quot;)"><div class="twitter_image"></div></a>
316
+ </td>
317
+ <td>
318
+ <a href="http://twitter.com/urbandictionary/" onclick="urchinTracker(&quot;/outgoing/http_twitter_com_urbandictionary&quot;)"><b>follow urbandictionary</b><br/>on twitter</a>
319
+ </td>
320
+ </tr>
321
+ </table>
322
+ </td>
323
+ </tr>
324
+ </table>
325
+
326
+ </div>
327
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
328
+ <script src="http://static3.urbandictionary.com/rel-b45e9eb/assets/base.js" type="text/javascript"></script>
329
+ <script type='text/javascript'>
330
+ //<![CDATA[
331
+ var host_env = new HostEnv(document.location.hostname);
332
+ Uncacheable.instance.load([2819077]);
333
+ //]]>
334
+ </script>
335
+
336
+ <script type="text/javascript">
337
+ var _gaq = _gaq || [];
338
+ _gaq.push(['_setAccount', "UA-31805-1"]);
339
+ _gaq.push(['_trackPageview']);
340
+
341
+ (function() {
342
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
343
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
344
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
345
+ })();
346
+ </script>
347
+
348
+ <!-- Start Quantcast tag -->
349
+ <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
350
+ <script type="text/javascript">
351
+ _qacct="p-77H27_lnOeCCI";quantserve();</script>
352
+ <noscript>
353
+ <img src="http://pixel.quantserve.com/pixel/p-77H27_lnOeCCI.gif" style="display: none" height="1" width="1" alt=""/></noscript>
354
+ <!-- End Quantcast tag -->
355
+ </body>
356
+ </html>
@@ -0,0 +1,251 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>Urban Dictionary: test12345</title>
5
+ <script type='text/javascript'>
6
+ //<![CDATA[
7
+ var MobileDetector={redirect:function(b,a){if(b&&b.match(/(iPhone|iPod|Android)/)){this.go(a)}},go:function(a){window.location=a}};
8
+ MobileDetector.redirect(navigator.userAgent, "http://m.urbandictionary.com/#define?term=test12345");
9
+ //]]>
10
+ </script>
11
+
12
+
13
+ <!--[if (!IE)|(gte IE 8)]><!-->
14
+ <link href="http://static2.urbandictionary.com/rel-b45e9eb/assets/base-datauri.css" media="screen" rel="stylesheet" type="text/css" />
15
+ <!--<![endif]-->
16
+ <!--[if lte IE 7]>
17
+ <link href="http://static1.urbandictionary.com/rel-b45e9eb/assets/base.css" media="screen" rel="stylesheet" type="text/css" />
18
+ <![endif]-->
19
+ <link href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" rel="alternate" title="Urban Word of the Day" type="application/rss+xml" />
20
+ <link href="http://static0.urbandictionary.com/rel-b45e9eb/favicon.ico" rel="shortcut icon" /><link href="http://static0.urbandictionary.com/rel-b45e9eb/favicon.ico" rel="icon" />
21
+
22
+
23
+ <link href='http://static3.urbandictionary.com/rel-b45e9eb/osd.xml' rel='search' title='Urban Dictionary Search' type='application/opensearchdescription+xml' />
24
+ <meta content='test12345' property='og:title' />
25
+ <meta content="http://static1.urbandictionary.com/rel-b45e9eb/images/og_image.png" property="og:image" />
26
+ <meta content='Urban Dictionary' property='og:site_name' />
27
+ </head>
28
+ <body class='define_controller'>
29
+ <div class='hidden' id='rollup'></div>
30
+ <div id='header_background'>
31
+ <div id='header_width'>
32
+ <div id='header'>
33
+ <a href="/" id="logo_anchor"><img alt="" id="logo" src="http://static2.urbandictionary.com/rel-b45e9eb/images/logo-holiday.png" /></a>
34
+ <div id='like_button'>
35
+ <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Furbandictionary&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
36
+ </div>
37
+ <div id='form'>
38
+ <form action="/define.php" method="get">
39
+ <table>
40
+ <tr>
41
+ <td class='look_up'>look up anything, like <a href="/names.php">your first name</a>:</td>
42
+ </tr>
43
+ <tr>
44
+ <td><input id="term" name="term" tabindex="1" type="text" value="test12345" /></td>
45
+ <td>
46
+ <input type='submit' value='search' />
47
+ </td>
48
+ </tr>
49
+ </table>
50
+ </form>
51
+ </div>
52
+ <div id='topnav'>
53
+ <a href="/">word of the day</a> <a class="active" href="/popular.php?character=A">dictionary</a> <a href="/thesaurus.php">thesaurus</a> <a href="/names.php">names</a> <a href="/video.list.php">media</a> <a href="/products.php">store</a> <a href="/add.php">add</a> <a href="/editor/staygo.php">edit</a> <a href="http://blog.urbandictionary.com/">blog</a>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <div id='outer'>
60
+ <div class='' id='whole'>
61
+ <div class='innernav' id='subnav'>
62
+ <a accesskey="1" href="/random.php">random</a> <a href="/popular.php?character=A">A</a> <a href="/popular.php?character=B">B</a> <a href="/popular.php?character=C">C</a> <a href="/popular.php?character=D">D</a> <a href="/popular.php?character=E">E</a> <a href="/popular.php?character=F">F</a> <a href="/popular.php?character=G">G</a> <a href="/popular.php?character=H">H</a> <a href="/popular.php?character=I">I</a> <a href="/popular.php?character=J">J</a> <a href="/popular.php?character=K">K</a> <a href="/popular.php?character=L">L</a> <a href="/popular.php?character=M">M</a> <a href="/popular.php?character=N">N</a> <a href="/popular.php?character=O">O</a> <a href="/popular.php?character=P">P</a> <a href="/popular.php?character=Q">Q</a> <a href="/popular.php?character=R">R</a> <a href="/popular.php?character=S">S</a> <a class="active" href="/browse.php?word=test12345">T</a> <a href="/popular.php?character=U">U</a> <a href="/popular.php?character=V">V</a> <a href="/popular.php?character=W">W</a> <a href="/popular.php?character=X">X</a> <a href="/popular.php?character=Y">Y</a> <a href="/popular.php?character=Z">Z</a> <a href="/browse.php?character=%2A">#</a> <a href="/yesterday.php?date=2012-10-20">new</a> <a href="/favorites.php">favorites</a> <a href="http://urbandictionary.tv/" target="_blank">tv</a>
63
+ </div>
64
+ <table cellpadding='0' cellspacing='0' id='tablist'>
65
+ <tr>
66
+ <td id='leftist'>
67
+ <div id='nearby_titles'>
68
+ <p>most popular</p>
69
+ <ul>
70
+ <li><a href="/define.php?term=Vampire">Vampire</a></li>
71
+ <li><a href="/define.php?term=Deepz0ne">Deepz0ne</a></li>
72
+ <li><a href="/define.php?term=New%20Pacific%20Order">New Pacific Order</a></li>
73
+ <li><a href="/define.php?term=walk%20of%20shame">walk of shame</a></li>
74
+ <li><a href="/define.php?term=Barack%20Hussein%20Obama">Barack Hussein Obama</a></li>
75
+ <li><a href="/define.php?term=OMG">OMG</a></li>
76
+ <li><a href="/define.php?term=Steve%20Irwin">Steve Irwin</a></li>
77
+ <li><a href="/define.php?term=multislacking">multislacking</a></li>
78
+ </ul>
79
+ <p>alphabetical</p>
80
+ <ul>
81
+ <li><a href="/define.php?term=Tesslyn">Tesslyn</a></li><li><a href="/define.php?term=Tessmarie">Tessmarie</a></li><li><a href="/define.php?term=tessmer">tessmer</a></li><li><a href="/define.php?term=%23tessmoment">#tessmoment</a></li><li><a href="/define.php?term=tessology">tessology</a></li><li><a href="/define.php?term=tesspanish">tesspanish</a></li><li><a href="/define.php?term=tesstastic">tesstastic</a></li><li><a href="/define.php?term=Tess%20Taylor">Tess Taylor</a></li><li><a href="/define.php?term=TESStd">TESStd</a></li><li><a href="/define.php?term=tesstickles">tesstickles</a></li><li><a href="/define.php?term=Tessting">Tessting</a></li><li><a href="/define.php?term=tesstkal">tesstkal</a></li><li><b><a href="/define.php?term=test">test</a></b></li><li><a href="/define.php?term=Test%21">Test!</a></li><li><a href="/define.php?term=test1234">test1234</a></li><li class="active"><b>test12345</b></li><li><a href="/define.php?term=test23">test23</a></li><li><a href="/define.php?term=Testa">Testa</a></li><li><a href="/define.php?term=testaboobie">testaboobie</a></li><li><a href="/define.php?term=testaburger">testaburger</a></li><li><a href="/define.php?term=Testache">Testache</a></li><li><a href="/define.php?term=testackle">testackle</a></li><li><a href="/define.php?term=testacle%20delight%27s">testacle delight's</a></li><li><a href="/define.php?term=testaclees">testaclees</a></li><li><a href="/define.php?term=Testacle%20Receptacle">Testacle Receptacle</a></li><li><a href="/define.php?term=testaclit">testaclit</a></li><li><a href="/define.php?term=Testaclops">Testaclops</a></li><li><a href="/define.php?term=testacolies">testacolies</a></li><li><a href="/define.php?term=Testacular">Testacular</a></li><li><a href="/define.php?term=Testacuzzi">Testacuzzi</a></li><li><a href="/define.php?term=Testa%20D">Testa D</a></li><li><a href="/define.php?term=testa%20di%20cazzo">testa di cazzo</a></li><li><a href="/define.php?term=Testages">Testages</a></li><li><a href="/define.php?term=Testalitius">Testalitius</a></li><li><b><a href="/define.php?term=Testament">Testament</a></b></li><li><a href="/define.php?term=Testament%27">Testament'</a></li><li><a href="/define.php?term=test%20and%20tag">test and tag</a></li><li><a href="/define.php?term=test%20and%20tell">test and tell</a></li><li><a href="/define.php?term=Test%20Animal">Test Animal</a></li><li><a href="/define.php?term=testant">testant</a></li><li><a href="/define.php?term=Testarded">Testarded</a></li>
82
+ </ul>
83
+ </div>
84
+
85
+ </td>
86
+ <td>
87
+ <div id='content'><div id='not_defined_yet'>
88
+ <i>test12345</i> isn't defined <a href="/add.php?word=test12345">yet</a>.
89
+ </div>
90
+ <div style='margin: 50px auto 0 auto; width: 300px; height: 250px'>
91
+ <script type="text/javascript">
92
+ //<![CDATA[
93
+ var googletag = googletag || {};
94
+ googletag.cmd = googletag.cmd || [];
95
+ googletag.cmd.push(function() {
96
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/HP_ATF_300x250', [300, 250], 'dfp_homepage_medium_rectangle').addService(googletag.pubads());
97
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/HP_BTF_300x250', [300, 250], 'dfp_homepage_medium_rectangle_below').addService(googletag.pubads());
98
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_BTF_728x90', [728, 90], 'dfp_every_page_leaderboard').addService(googletag.pubads());
99
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_Right_160x60', [160, 600], 'dfp_skyscraper').addService(googletag.pubads());
100
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/Define_300x250', [300, 250], 'dfp_define_rectangle').addService(googletag.pubads());
101
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/ROS_500x250', [475, 250], 'dfp_define_double_rectangle').addService(googletag.pubads());
102
+ googletag.defineUnit('/1031683/ca-pub-4733233155277872/Define_300x250_BTF', [300, 250], 'dfp_define_rectangle_btf').addService(googletag.pubads());
103
+
104
+ googletag.pubads().set("alternate_ad_url", "http://www.urbandictionary.com/google_alternate_ad.html");
105
+ googletag.pubads().setTargeting("safe_word", "false");
106
+
107
+ googletag.pubads().enableSingleRequest();
108
+ googletag.enableServices();
109
+ });
110
+
111
+ (function() {
112
+ var gads = document.createElement('script');
113
+ gads.async = true;
114
+ gads.type = 'text/javascript';
115
+ gads.src = "http://www.googletagservices.com/tag/js/gpt.js";
116
+ var node = document.getElementsByTagName('script')[0];
117
+ node.parentNode.insertBefore(gads, node);
118
+ })();
119
+
120
+ //]]>
121
+ </script><div id="dfp_define_rectangle" style="width: 300px; height: 250px"><script type="text/javascript">
122
+ //<![CDATA[
123
+ googletag.cmd.push(function() { googletag.display('dfp_define_rectangle'); });
124
+ //]]>
125
+ </script></div>
126
+ </div>
127
+ </div>
128
+ </td>
129
+ <td id='rightist'>
130
+ <div id="dfp_skyscraper" style="width: 160px; height: 600px"><script type="text/javascript">
131
+ //<![CDATA[
132
+ googletag.cmd.push(function() { googletag.display('dfp_skyscraper'); });
133
+ //]]>
134
+ </script></div>
135
+ </td>
136
+ </tr>
137
+ </table>
138
+
139
+ <div id='bottomad'>
140
+ <div id="dfp_every_page_leaderboard" style="width: 728px; height: 90px; margin: 0 auto"><script type="text/javascript">
141
+ //<![CDATA[
142
+ googletag.cmd.push(function() { googletag.display('dfp_every_page_leaderboard'); });
143
+ //]]>
144
+ </script></div>
145
+ </div>
146
+ </div>
147
+ <div id='copyright'>
148
+ <a href="/">Urban Dictionary</a>
149
+ <span id='years'>
150
+ &copy;1999-2012
151
+ </span>
152
+ <a href='/tos.php'>terms of service</a>
153
+ <a href='/privacy.php'>privacy</a>
154
+ <a href='/feedback.php'>feedback</a>
155
+ <a href='/editor/remove.php'>remove</a>
156
+ <a href='/ads.php'>advertise</a>
157
+ <a href='/poweredby.php'>technology</a>
158
+ <a href='http://jobs.urbandictionary.com/'>jobs</a>
159
+ <a href='#' onclick="javascript:window.open('http://urbandictionary.wufoo.com/forms/api-interest-form/', 'wufoo', 'width=640,height=600'); return false">api</a>
160
+ </div>
161
+
162
+ <table class='offsite'>
163
+ <tr>
164
+ <td>
165
+ <table class='facebook'>
166
+ <tr>
167
+ <td>
168
+ <a href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" onclick="urchinTracker(&quot;/outgoing/http_feeds_urbandictionary_com_UrbanWordOfTheDay&quot;)"><div class="rss_image"></div></a>
169
+ </td>
170
+ <td>
171
+ <a href="http://feeds.urbandictionary.com/UrbanWordOfTheDay" onclick="urchinTracker(&quot;/outgoing/http_feeds_urbandictionary_com_UrbanWordOfTheDay&quot;)">add via <b>rss</b></a>
172
+ <br />
173
+ <a href="http://www.google.com/calendar/render?cid=http%3A%2F%2Fwww.urbandictionary.com%2Fdaily.ics" onclick="urchinTracker(&quot;/outgoing/http_www_google_com_calendar_render_cid_http_A_F_Fwww_urbandictionary_com_Fdaily_ics&quot;)">or <b>google calendar</b></a>
174
+ </td>
175
+ </tr>
176
+ </table>
177
+ </td>
178
+ <td>
179
+ <table class='facebook'>
180
+ <tr>
181
+ <td>
182
+ <a href="http://www.facebook.com/profile.php?id=6295613171" onclick="urchinTracker(&quot;/outgoing/http_www_facebook_com_profile_php_id&quot;)"><div class="facebook_image"></div></a>
183
+ </td>
184
+ <td>
185
+ <a href="http://www.facebook.com/profile.php?id=6295613171" onclick="urchinTracker(&quot;/outgoing/http_www_facebook_com_profile_php_id&quot;)">add <b>urban dictionary</b><br/>on <b>facebook</b></a>
186
+ </td>
187
+ </tr>
188
+ </table>
189
+ </td>
190
+ <td>
191
+ <table class='facebook'>
192
+ <tr>
193
+ <td>
194
+ <div class='iphone_image'></div>
195
+ </td>
196
+ <td>
197
+ search ud
198
+ <br />
199
+ <a href="http://m.urbandictionary.com/" onclick="urchinTracker(&quot;/outgoing/http_m_urbandictionary_com&quot;)">from your <b>phone</b></a>
200
+ <br />
201
+ <a href="/sms.php" onclick="urchinTracker(&quot;/outgoing/sms_php&quot;)">or via <b>txt</b></a>
202
+ </td>
203
+ </tr>
204
+ </table>
205
+ </td>
206
+ <td>
207
+ <table class='facebook'>
208
+ <tr>
209
+ <td>
210
+ <a href="http://twitter.com/urbandictionary/" onclick="urchinTracker(&quot;/outgoing/http_twitter_com_urbandictionary&quot;)"><div class="twitter_image"></div></a>
211
+ </td>
212
+ <td>
213
+ <a href="http://twitter.com/urbandictionary/" onclick="urchinTracker(&quot;/outgoing/http_twitter_com_urbandictionary&quot;)"><b>follow urbandictionary</b><br/>on twitter</a>
214
+ </td>
215
+ </tr>
216
+ </table>
217
+ </td>
218
+ </tr>
219
+ </table>
220
+
221
+ </div>
222
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
223
+ <script src="http://static0.urbandictionary.com/rel-b45e9eb/assets/base.js" type="text/javascript"></script>
224
+ <script type='text/javascript'>
225
+ //<![CDATA[
226
+ var host_env = new HostEnv(document.location.hostname);
227
+ Uncacheable.instance.load([]);
228
+ //]]>
229
+ </script>
230
+
231
+ <script type="text/javascript">
232
+ var _gaq = _gaq || [];
233
+ _gaq.push(['_setAccount', "UA-31805-1"]);
234
+ _gaq.push(['_trackPageview']);
235
+
236
+ (function() {
237
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
238
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
239
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
240
+ })();
241
+ </script>
242
+
243
+ <!-- Start Quantcast tag -->
244
+ <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
245
+ <script type="text/javascript">
246
+ _qacct="p-77H27_lnOeCCI";quantserve();</script>
247
+ <noscript>
248
+ <img src="http://pixel.quantserve.com/pixel/p-77H27_lnOeCCI.gif" style="display: none" height="1" width="1" alt=""/></noscript>
249
+ <!-- End Quantcast tag -->
250
+ </body>
251
+ </html>
@@ -0,0 +1,9 @@
1
+ require File.expand_path('../../lib/urban_dictionary', __FILE__)
2
+
3
+ RSpec.configure do |config|
4
+ config.treat_symbols_as_metadata_keys_with_true_values = true
5
+ config.run_all_when_everything_filtered = true
6
+ config.filter_run :focus
7
+
8
+ config.order = 'random'
9
+ end
@@ -0,0 +1,9 @@
1
+ require "spec_helper"
2
+
3
+ describe UrbanDictionary::Entry do
4
+ describe "#to_s" do
5
+ it "should print out the formatted example and definition" do
6
+ UrbanDictionary::Entry.new("pie", "delicious").to_s.should eq("pie\ndelicious")
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe UrbanDictionary::Word do
4
+
5
+ describe "instance method" do
6
+ subject{ UrbanDictionary::Word.new("pie", [mock, mock]) }
7
+
8
+ its(:to_s){ should eq("pie") }
9
+ its(:size){ should eq(3) }
10
+ its(:length){ should eq(3) }
11
+ end
12
+
13
+ describe "class method" do
14
+ describe "#from_url" do
15
+ let(:url){ "the_url" }
16
+ let(:html_with_results){ File.open(File.expand_path("../../html/test_with_results.html", __FILE__)) }
17
+ let(:html_without_results){ File.open(File.expand_path("../../html/test_without_results.html", __FILE__)) }
18
+
19
+ it "should parse a valid word" do
20
+ UrbanDictionary::Word.should_receive(:open).with(url).and_return(html_with_results)
21
+
22
+ word = UrbanDictionary::Word.from_url(url)
23
+ word.should be_a(UrbanDictionary::Word)
24
+ word.word.should eq("test1234")
25
+ word.entries.length.should eq(1)
26
+ word.entries.first.should be_an_instance_of(UrbanDictionary::Entry)
27
+ end
28
+
29
+ it "should gracefully handle an unknown word by returning nil" do
30
+ UrbanDictionary::Word.should_receive(:open).with(url).and_return(html_without_results)
31
+ UrbanDictionary::Word.from_url(url).should be_nil
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,32 @@
1
+ require "spec_helper"
2
+
3
+ describe UrbanDictionary do
4
+ let(:result){ mock :result }
5
+
6
+ describe "class method" do
7
+ describe "#define" do
8
+ it "should delegate to Word#from_url" do
9
+ UrbanDictionary::Word.should_receive(:from_url).with("#{UrbanDictionary::DEFINE_URL}?term=pie").and_return(result)
10
+ UrbanDictionary.define("pie").should eq(result)
11
+ end
12
+
13
+ it "should url encode the request" do
14
+ UrbanDictionary::Word.should_receive(:from_url).with("#{UrbanDictionary::DEFINE_URL}?term=asdf%25asdf").and_return(result)
15
+ UrbanDictionary.define("asdf%asdf").should eq(result)
16
+ end
17
+ end
18
+
19
+ describe "#random_word" do
20
+ let(:request){ mock :request }
21
+ let(:response){ {'location' => 'location'} }
22
+ let(:http){ mock :http }
23
+
24
+ it "should do an HTTP GET to determine the random word" do
25
+ Net::HTTP.should_receive(:start).with("www.urbandictionary.com", 80).and_yield(http).and_return(response)
26
+ http.should_receive(:request).with(an_instance_of(Net::HTTP::Get))
27
+ UrbanDictionary.should_receive(:define).with('location').and_return(result)
28
+ UrbanDictionary.random_word.should eq(result)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -20,6 +20,6 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_runtime_dependency "nokogiri", "~> 1.5.2"
22
22
 
23
- s.add_development_dependency "bundler", "~> 1.0.22"
24
23
  s.add_development_dependency "rake"
24
+ s.add_development_dependency "rspec"
25
25
  end
metadata CHANGED
@@ -1,80 +1,74 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: urban_dictionary
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ryan Greenberg
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-08-05 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
18
+ requirements:
25
19
  - - ~>
26
- - !ruby/object:Gem::Version
27
- hash: 7
28
- segments:
29
- - 1
30
- - 5
31
- - 2
20
+ - !ruby/object:Gem::Version
32
21
  version: 1.5.2
33
- requirement: *id001
34
- prerelease: false
35
- name: nokogiri
36
22
  type: :runtime
37
- - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
39
25
  none: false
40
- requirements:
26
+ requirements:
41
27
  - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 59
44
- segments:
45
- - 1
46
- - 0
47
- - 22
48
- version: 1.0.22
49
- requirement: *id002
50
- prerelease: false
51
- name: bundler
52
- type: :development
53
- - !ruby/object:Gem::Dependency
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.2
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
55
33
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
63
- requirement: *id003
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
64
39
  prerelease: false
65
- name: rake
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
66
54
  type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
67
62
  description: Interface to urbandictionary.com
68
- email:
63
+ email:
69
64
  - ryangreenberg@gmail.com
70
- executables:
65
+ executables:
71
66
  - urban_dictionary
72
67
  extensions: []
73
-
74
68
  extra_rdoc_files: []
75
-
76
- files:
69
+ files:
77
70
  - .gitignore
71
+ - .rspec
78
72
  - Gemfile
79
73
  - Gemfile.lock
80
74
  - README.md
@@ -84,40 +78,47 @@ files:
84
78
  - lib/urban_dictionary/entry.rb
85
79
  - lib/urban_dictionary/version.rb
86
80
  - lib/urban_dictionary/word.rb
81
+ - spec/html/test_with_results.html
82
+ - spec/html/test_without_results.html
83
+ - spec/spec_helper.rb
84
+ - spec/urban_dictionary/entry_spec.rb
85
+ - spec/urban_dictionary/word_spec.rb
86
+ - spec/urban_dictionary_spec.rb
87
87
  - urban_dictionary.gemspec
88
- has_rdoc: true
89
- homepage: ""
88
+ homepage: ''
90
89
  licenses: []
91
-
92
90
  post_install_message:
93
91
  rdoc_options: []
94
-
95
- require_paths:
92
+ require_paths:
96
93
  - lib
97
- required_ruby_version: !ruby/object:Gem::Requirement
94
+ required_ruby_version: !ruby/object:Gem::Requirement
98
95
  none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ segments:
104
101
  - 0
105
- version: "0"
106
- required_rubygems_version: !ruby/object:Gem::Requirement
102
+ hash: -774214380254322335
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
104
  none: false
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- hash: 3
112
- segments:
105
+ requirements:
106
+ - - ! '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ segments:
113
110
  - 0
114
- version: "0"
111
+ hash: -774214380254322335
115
112
  requirements: []
116
-
117
113
  rubyforge_project: urban_dictionary
118
- rubygems_version: 1.6.2
114
+ rubygems_version: 1.8.24
119
115
  signing_key:
120
116
  specification_version: 3
121
117
  summary: Interface to urbandictionary.com
122
- test_files: []
123
-
118
+ test_files:
119
+ - spec/html/test_with_results.html
120
+ - spec/html/test_without_results.html
121
+ - spec/spec_helper.rb
122
+ - spec/urban_dictionary/entry_spec.rb
123
+ - spec/urban_dictionary/word_spec.rb
124
+ - spec/urban_dictionary_spec.rb