Skip to content
Browse files

init commit

  • Loading branch information...
0 parents commit b15785d46729efa3a007b30d888d762c1e1230d4 @forresty forresty committed May 28, 2012
Showing with 162 additions and 0 deletions.
  1. +17 −0 .gitignore
  2. +1 −0 .rspec
  3. +3 −0 Gemfile
  4. +22 −0 LICENSE
  5. +29 −0 README.md
  6. +10 −0 Rakefile
  7. +21 −0 hn.gemspec
  8. +2 −0 lib/hn.rb
  9. +4 −0 lib/hn/models/entry.rb
  10. +7 −0 lib/hn/parsers/entry_parser.rb
  11. +3 −0 lib/hn/version.rb
  12. +24 −0 spec/fixtures/home.html
  13. +8 −0 spec/hn/parsers/entry_parser_spec.rb
  14. +11 −0 spec/spec_helper.rb
17 .gitignore
@@ -0,0 +1,17 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
1 .rspec
@@ -0,0 +1 @@
+--color
3 Gemfile
@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+
+gemspec
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Forrest Ye
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 README.md
@@ -0,0 +1,29 @@
+# Hn
+
+TODO: Write a gem description
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'hn'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install hn
+
+## Usage
+
+TODO: Write usage instructions here
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
10 Rakefile
@@ -0,0 +1,10 @@
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
+
+require "rspec/core/rake_task"
+
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+end
+
+task :default => :spec
21 hn.gemspec
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/hn/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["Forrest Ye"]
+ gem.email = ["afu@forresty.com"]
+ gem.description = %q{TODO: Write a gem description}
+ gem.summary = %q{TODO: Write a gem summary}
+ gem.homepage = ""
+
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ gem.files = `git ls-files`.split("\n")
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ gem.name = "hn"
+ gem.require_paths = ["lib"]
+ gem.version = HackerNews::VERSION
+
+ gem.add_development_dependency 'rspec'
+ gem.add_development_dependency 'rake'
+ gem.add_development_dependency 'simplecov'
+end
2 lib/hn.rb
@@ -0,0 +1,2 @@
+require "hn/version"
+require "hn/parsers/entry_parser"
4 lib/hn/models/entry.rb
@@ -0,0 +1,4 @@
+module HackerNews
+ class Entry
+ end
+end
7 lib/hn/parsers/entry_parser.rb
@@ -0,0 +1,7 @@
+module HackerNews
+ class EntryParser
+ def home
+
+ end
+ end
+end
3 lib/hn/version.rb
@@ -0,0 +1,3 @@
+module HackerNews
+ VERSION = "0.0.1"
+end
24 spec/fixtures/home.html
@@ -0,0 +1,24 @@
+<html><head><link rel="stylesheet" type="text/css" href="http://ycombinator.com/news.css">
+<link rel="shortcut icon" href="http://ycombinator.com/favicon.ico">
+<script>
+function byId(id) {
+ return document.getElementById(id);
+}
+
+function vote(node) {
+ var v = node.id.split(/_/); // {'up', '123'}
+ var item = v[1];
+
+ // hide arrows
+ byId('up_' + item).style.visibility = 'hidden';
+ byId('down_' + item).style.visibility = 'hidden';
+
+ // ping server
+ var ping = new Image();
+ ping.src = node.href;
+
+ return false; // cancel browser nav
+} </script><title>Hacker News</title></head><body><center><table border=0 cellpadding=0 cellspacing=0 width="85%" bgcolor=#f6f6ef><tr><td bgcolor=#ff6600><table border=0 cellpadding=0 cellspacing=0 width="100%" style="padding:2px"><tr><td style="width:18px;padding-right:4px"><a href="http://ycombinator.com"><img src="http://ycombinator.com/images/y18.gif" width=18 height=18 style="border:1px #ffffff solid;"></img></a></td><td style="line-height:12pt; height:10px;"><span class="pagetop"><b><a href="news">Hacker News</a></b><img src="http://ycombinator.com/images/s.gif" height=1 width=10><a href="newest">new</a> | <a href="newcomments">comments</a> | <a href="ask">ask</a> | <a href="jobs">jobs</a> | <a href="submit">submit</a></span></td><td style="text-align:right;padding-right:4px;"><span class="pagetop"><a href="newslogin?whence=%6e%65%77%73">login</a></span></td></tr></table></td></tr><tr style="height:10px"></tr><tr><td><table border=0 cellpadding=0 cellspacing=0><tr><td align=right valign=top class="title">1.</td><td><center><a id=up_4030746 href="vote?for=4030746&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030746></span></center></td><td class="title"><a href="http://www.cl.cam.ac.uk/~sps32/sec_news.html#Assurance">Backdoor found in a China-made US military chip </a><span class="comhead"> (cam.ac.uk) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030746>392 points</span> by <a href="user?id=turnersr">turnersr</a> 10 hours ago | <a href="item?id=4030746">109 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">2.</td><td><center><a id=up_4031595 href="vote?for=4031595&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031595></span></center></td><td class="title"><a href="http://patdryburgh.com/blog/buying-adobe-photoshop-cs6/">Buying Adobe Photoshop CS6</a><span class="comhead"> (patdryburgh.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031595>63 points</span> by <a href="user?id=petercooper">petercooper</a> 4 hours ago | <a href="item?id=4031595">32 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">3.</td><td><center><a id=up_4032030 href="vote?for=4032030&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4032030></span></center></td><td class="title"><a href="http://www.newyorker.com/reporting/2012/06/04/120604fa_fact_gibson?currentPage=all">William Gibson: Seeing the Future in Science Fiction</a><span class="comhead"> (newyorker.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4032030>9 points</span> by <a href="user?id=jseliger">jseliger</a> 51 minutes ago | <a href="item?id=4032030">1 comment</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">4.</td><td><center><a id=up_4031157 href="vote?for=4031157&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031157></span></center></td><td class="title"><a href="http://www.mobileinc.co.uk/2012/05/the-art-of-the-ios-icon/">The Art Of The iOS Icon</a><span class="comhead"> (mobileinc.co.uk) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031157>126 points</span> by <a href="user?id=muratmutlu">muratmutlu</a> 7 hours ago | <a href="item?id=4031157">35 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">5.</td><td><center><a id=up_4031682 href="vote?for=4031682&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031682></span></center></td><td class="title"><a href="http://www.forbes.com/sites/haydnshaughnessy/2012/05/26/why-crisis-in-spain-this-week-should-have-us-more-worried-than-greece/">Why Crisis in Spain This Week Became More Important Than Greece</a><span class="comhead"> (forbes.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031682>53 points</span> by <a href="user?id=Flemlord">Flemlord</a> 3 hours ago | <a href="item?id=4031682">17 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">6.</td><td><center><a id=up_4031812 href="vote?for=4031812&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031812></span></center></td><td class="title"><a href="http://jasonlefkowitz.net/2012/05/windows-live-is-dead/">Windows Live is dead</a><span class="comhead"> (jasonlefkowitz.net) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031812>20 points</span> by <a href="user?id=smacktoward">smacktoward</a> 2 hours ago | <a href="item?id=4031812">6 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">7.</td><td><center><a id=up_4031639 href="vote?for=4031639&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031639></span></center></td><td class="title"><a href="http://www.forbes.com/sites/philjohnson/2012/05/10/the-man-who-took-on-amazon-and-saved-a-bookstore/">The Man Who Took on Amazon and Saved a Bookstore</a><span class="comhead"> (forbes.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031639>30 points</span> by <a href="user?id=wyclif">wyclif</a> 4 hours ago | <a href="item?id=4031639">9 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">8.</td><td><center><a id=up_4031739 href="vote?for=4031739&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031739></span></center></td><td class="title"><a href="http://www.bostonglobe.com/opinion/2012/05/26/boston-bar-buzz-kill/KbPYBLYiTjLsykcpPi0mRJ/story.html">Boston Bar Buzz-Kill</a><span class="comhead"> (bostonglobe.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031739>22 points</span> by <a href="user?id=ryanwjackson">ryanwjackson</a> 3 hours ago | <a href="item?id=4031739">4 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">9.</td><td><center><a id=up_4030149 href="vote?for=4030149&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030149></span></center></td><td class="title"><a href="http://musicthing.blogspot.co.uk/2005/05/tiny-music-makers-pt-3-thx-sound.html">The THX Sound</a><span class="comhead"> (blogspot.co.uk) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030149>251 points</span> by <a href="user?id=harel">harel</a> 15 hours ago | <a href="item?id=4030149">34 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">10.</td><td><center><a id=up_4031241 href="vote?for=4031241&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031241></span></center></td><td class="title"><a href="https://www.eff.org/deeplinks/2012/05/megaupload-user-asks-court-files-back-again">Megaupload User Asks Court for Files Back. Again.</a><span class="comhead"> (eff.org) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031241>57 points</span> by <a href="user?id=bond">bond</a> 7 hours ago | <a href="item?id=4031241">12 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">11.</td><td><center><a id=up_4030884 href="vote?for=4030884&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030884></span></center></td><td class="title"><a href="http://www.etherealbits.com/?p=68">The Software Developer’s Guide to Fitness & Morning Productivity</a><span class="comhead"> (etherealbits.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030884>84 points</span> by <a href="user?id=tysont">tysont</a> 9 hours ago | <a href="item?id=4030884">32 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">12.</td><td><center><a id=up_4031225 href="vote?for=4031225&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031225></span></center></td><td class="title"><a href="http://www.nytimes.com/2012/05/28/technology/for-tech-startups-new-york-has-increasing-allure.html?pagewanted=all">For Tech Start-Ups, New York Has Increasing Allure</a><span class="comhead"> (nytimes.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031225>51 points</span> by <a href="user?id=mindblink">mindblink</a> 7 hours ago | <a href="item?id=4031225">19 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">13.</td><td><center><a id=up_4030812 href="vote?for=4030812&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030812></span></center></td><td class="title"><a href="http://web.stonehill.edu/compsci//History_Math/math-read.htm">How to Read Mathematics</a><span class="comhead"> (stonehill.edu) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030812>96 points</span> by <a href="user?id=espeed">espeed</a> 10 hours ago | <a href="item?id=4030812">17 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">14.</td><td><center><a id=up_4031912 href="vote?for=4031912&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031912></span></center></td><td class="title"><a href="http://www.washingtonpost.com/world/the_americas/center-of-gravity-in-oil-world-shifts-to-americas/2012/05/25/gJQAjeuVqU_story.html">Center of gravity in oil world shifts to Americas </a><span class="comhead"> (washingtonpost.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031912>12 points</span> by <a href="user?id=cwan">cwan</a> 1 hour ago | <a href="item?id=4031912">4 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">15.</td><td><center><a id=up_4030816 href="vote?for=4030816&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030816></span></center></td><td class="title"><a href="http://www.websocket.org/quantum.html">How WebSockets work vs polling/long polling/streaming</a><span class="comhead"> (websocket.org) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030816>75 points</span> by <a href="user?id=SkyMarshal">SkyMarshal</a> 10 hours ago | <a href="item?id=4030816">27 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">16.</td><td><center><a id=up_4031608 href="vote?for=4031608&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031608></span></center></td><td class="title"><a href="http://lists.fedoraproject.org/pipermail/devel-announce/2012-May/000933.html">Fedora 17 Final declared Gold</a><span class="comhead"> (fedoraproject.org) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031608>21 points</span> by <a href="user?id=mindcrime">mindcrime</a> 4 hours ago | <a href="item?id=4031608">4 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">17.</td><td><center><a id=up_4031866 href="vote?for=4031866&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031866></span></center></td><td class="title"><a href="http://chat.techcentroid.com/" rel="nofollow">Open Source Chat Server in Node.js with dynamic rooms</a><span class="comhead"> (techcentroid.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031866>6 points</span> by <a href="user?id=mlakkadshaw">mlakkadshaw</a> 1 hour ago | <a href="item?id=4031866">6 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">18.</td><td><center><a id=up_4031007 href="vote?for=4031007&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031007></span></center></td><td class="title"><a href="http://mewo2.github.com/nerdery/2012/05/27/eurovision-statistics-after-the-final/">Eurovision statistics analysis, and an apology to the people of Malta</a><span class="comhead"> (github.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031007>38 points</span> by <a href="user?id=mewo2">mewo2</a> 8 hours ago | <a href="item?id=4031007">8 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">19.</td><td><center><a id=up_4031004 href="vote?for=4031004&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031004></span></center></td><td class="title"><a href="http://blog.gaborcselle.com/2012/05/eight-emotions-every-user-enjoys.html">Emotions Every User Enjoys</a><span class="comhead"> (gaborcselle.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031004>35 points</span> by <a href="user?id=admp">admp</a> 8 hours ago | <a href="item?id=4031004">2 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">20.</td><td><center><a id=up_4031699 href="vote?for=4031699&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031699></span></center></td><td class="title"><a href="https://github.com/aseemk/json5">Show HN: JSON5 — modern JSON</a><span class="comhead"> (github.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031699>36 points</span> by <a href="user?id=aseemk">aseemk</a> 3 hours ago | <a href="item?id=4031699">55 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">21.</td><td><center><a id=up_4030665 href="vote?for=4030665&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030665></span></center></td><td class="title"><a href="http://techcrunch.com/2012/05/27/hey-kids-get-off-my-lawn-the-once-and-future-visual-programming-environment/">The Once and Future Visual Programming Environment</a><span class="comhead"> (techcrunch.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030665>54 points</span> by <a href="user?id=NelsonMinar">NelsonMinar</a> 11 hours ago | <a href="item?id=4030665">32 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">22.</td><td><center><a id=up_4031129 href="vote?for=4031129&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031129></span></center></td><td class="title"><a href="http://nicholasjacob.com/Javascript/2012/05/27/oauth--websockets-avoiding-the-redirect/">OAuth & One-Page Apps: Avoiding the Redirect</a><span class="comhead"> (nicholasjacob.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031129>27 points</span> by <a href="user?id=chucknibbleston">chucknibbleston</a> 8 hours ago | <a href="item?id=4031129">8 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">23.</td><td><center><a id=up_4031163 href="vote?for=4031163&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4031163></span></center></td><td class="title"><a href="http://www.neowin.net/news/rim-rumored-to-lay-off-2000-more-workers-soon">RIM rumored to lay off 2,000 more workers soon</a><span class="comhead"> (neowin.net) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4031163>24 points</span> by <a href="user?id=xtiy">xtiy</a> 7 hours ago | <a href="item?id=4031163">20 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">24.</td><td><center><a id=up_4030035 href="vote?for=4030035&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030035></span></center></td><td class="title"><a href="http://blog.hashtagify.me/2012/05/27/save-time-on-hacker-neww-mark-all-read/">Save Time On Hacker News: Mark All Read</a><span class="comhead"> (hashtagify.me) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030035>90 points</span> by <a href="user?id=danmaz74">danmaz74</a> 16 hours ago | <a href="item?id=4030035">56 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">25.</td><td><center><a id=up_4030689 href="vote?for=4030689&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030689></span></center></td><td class="title"><a href="http://visualwebsiteoptimizer.com/split-testing-blog/you-should-not-follow-me-on-twitter/">You should not follow me on Twitter</a><span class="comhead"> (visualwebsiteoptimizer.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030689>53 points</span> by <a href="user?id=paulgb">paulgb</a> 11 hours ago | <a href="item?id=4030689">18 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">26.</td><td><center><a id=up_4030033 href="vote?for=4030033&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030033></span></center></td><td class="title"><a href="http://blog.jerodsanto.net/2012/05/back-that-gmail-up/">Back That Gmail Up</a><span class="comhead"> (jerodsanto.net) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030033>81 points</span> by <a href="user?id=sant0sk1">sant0sk1</a> 16 hours ago | <a href="item?id=4030033">53 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">27.</td><td><center><a id=up_4030868 href="vote?for=4030868&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030868></span></center></td><td class="title"><a href="item?id=4030868">Remind HN: If you want feedback, add an email to your profile</a></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030868>85 points</span> by <a href="user?id=ekpyrotic">ekpyrotic</a> 10 hours ago | <a href="item?id=4030868">27 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">28.</td><td><center><a id=up_4030451 href="vote?for=4030451&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030451></span></center></td><td class="title"><a href="http://www.twilio.com/company/nine-values">Twilio's Nine Values</a><span class="comhead"> (twilio.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030451>62 points</span> by <a href="user?id=sunils34">sunils34</a> 13 hours ago | <a href="item?id=4030451">15 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">29.</td><td><center><a id=up_4030061 href="vote?for=4030061&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4030061></span></center></td><td class="title"><a href="http://blogs.adobe.com/digitalmarketing/personalization/conversion-optimization/understand-the-math-behind-it-all-bayesian-statistics/">Understand the Math Behind it All: Bayesian Statistics</a><span class="comhead"> (adobe.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4030061>80 points</span> by <a href="user?id=romil">romil</a> 16 hours ago | <a href="item?id=4030061">40 comments</a></td></tr><tr style="height:5px"></tr><tr><td align=right valign=top class="title">30.</td><td><center><a id=up_4029632 href="vote?for=4029632&dir=up&whence=%6e%65%77%73"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_4029632></span></center></td><td class="title"><a href="http://danshipper.com/stop-taking-yourself-so-seriously">Stop Taking Yourself So Seriously</a><span class="comhead"> (danshipper.com) </span></td></tr><tr><td colspan=2></td><td class="subtext"><span id=score_4029632>148 points</span> by <a href="user?id=Peteris">Peteris</a> 21 hours ago | <a href="item?id=4029632">58 comments</a></td></tr><tr style="height:5px"></tr><tr style="height:10px"></tr><tr><td colspan=2></td><td class="title"><a href="news2">More</a></td></tr></table></td></tr><tr><td><img src="http://ycombinator.com/images/s.gif" height=10 width=0><table width="100%" cellspacing=0 cellpadding=1><tr><td bgcolor=#ff6600></td></tr></table><br>
+<center><span class="yclinks"><a href="lists">Lists</a> | <a href="rss">RSS</a> | <a href="http://ycombinator.com/bookmarklet.html">Bookmarklet</a> | <a href="http://ycombinator.com/newsguidelines.html">Guidelines</a> | <a href="http://ycombinator.com/newsfaq.html">FAQ</a> | <a href="http://ycombinator.com/newsnews.html">News News</a> | <a href="item?id=363">Feature Requests</a> | <a href="http://ycombinator.com">Y Combinator</a> | <a href="http://ycombinator.com/apply.html">Apply</a> | <a href="http://ycombinator.com/lib.html">Library</a></span><br><br>
+<form method=get action="http://www.hnsearch.com/search#request/all">Search: <input type=text name="q" value="" size=17></form><br>
+</center></td></tr></table></center></body></html>
8 spec/hn/parsers/entry_parser_spec.rb
@@ -0,0 +1,8 @@
+require "spec_helper"
+
+module HackerNews
+ describe EntryParser do
+ subject { EntryParser.new }
+ it { should respond_to :home }
+ end
+end
11 spec/spec_helper.rb
@@ -0,0 +1,11 @@
+require "simplecov"
+SimpleCov.start do
+ add_filter 'spec'
+end
+
+require "open-uri"
+require 'hn'
+
+def fixture(filename)
+ open("spec/fixtures/#{filename}") { |file| file.read }
+end

0 comments on commit b15785d

Please sign in to comment.
Something went wrong with that request. Please try again.