dubdubdub 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'rest-client'
4
+ gem 'nokogiri'
4
5
 
5
6
  # Add dependencies to develop your gem here.
6
7
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -13,6 +13,7 @@ GEM
13
13
  json (1.7.5)
14
14
  method_source (0.8.1)
15
15
  mime-types (1.19)
16
+ nokogiri (1.5.5)
16
17
  pry (0.9.10)
17
18
  coderay (~> 1.0.5)
18
19
  method_source (~> 0.8)
@@ -40,6 +41,7 @@ DEPENDENCIES
40
41
  bundler
41
42
  fakeweb (~> 1.3.0)
42
43
  jeweler (~> 1.8.4)
44
+ nokogiri
43
45
  pry
44
46
  rest-client
45
47
  rspec (~> 2.8.0)
data/dubdubdub.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dubdubdub"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hu"]
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  "spec/dubdubdub_spec.rb",
31
31
  "spec/spec_helper.rb",
32
32
  "spec/support/vcr.rb",
33
+ "spec/vcr/crawl/basic.yml",
33
34
  "spec/vcr/follow_url/alias_link.yml",
34
35
  "spec/vcr/follow_url/base.yml",
35
36
  "spec/vcr/follow_url/block_base_url.yml",
@@ -55,6 +56,7 @@ Gem::Specification.new do |s|
55
56
 
56
57
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
57
58
  s.add_runtime_dependency(%q<rest-client>, [">= 0"])
59
+ s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
58
60
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
59
61
  s.add_development_dependency(%q<vcr>, ["~> 2.3.0"])
60
62
  s.add_development_dependency(%q<fakeweb>, ["~> 1.3.0"])
@@ -63,6 +65,7 @@ Gem::Specification.new do |s|
63
65
  s.add_development_dependency(%q<pry>, [">= 0"])
64
66
  else
65
67
  s.add_dependency(%q<rest-client>, [">= 0"])
68
+ s.add_dependency(%q<nokogiri>, [">= 0"])
66
69
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
67
70
  s.add_dependency(%q<vcr>, ["~> 2.3.0"])
68
71
  s.add_dependency(%q<fakeweb>, ["~> 1.3.0"])
@@ -72,6 +75,7 @@ Gem::Specification.new do |s|
72
75
  end
73
76
  else
74
77
  s.add_dependency(%q<rest-client>, [">= 0"])
78
+ s.add_dependency(%q<nokogiri>, [">= 0"])
75
79
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
76
80
  s.add_dependency(%q<vcr>, ["~> 2.3.0"])
77
81
  s.add_dependency(%q<fakeweb>, ["~> 1.3.0"])
data/lib/dubdubdub.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class DubDubDub
2
2
  # Version
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
 
5
5
  attr_accessor :client
6
6
 
@@ -1,5 +1,5 @@
1
- require 'open-uri'
2
1
  require 'net/http'
2
+ require 'nokogiri'
3
3
 
4
4
  class DubDubDub::Client
5
5
  attr_accessor :proxy_host, :proxy_port, :proxy_user, :proxy_password
@@ -68,6 +68,13 @@ class DubDubDub::Client
68
68
  rest_client_resource(url).delete(*args)
69
69
  end
70
70
 
71
+ # Helper method to crawl by using a GET request
72
+ def crawl(url, *args)
73
+ response = get(url, *args)
74
+
75
+ Nokogiri::HTML(response.body)
76
+ end
77
+
71
78
  # Follow a url to the end until it can no longer go any further
72
79
  # Even if it times out, it will return the url that it times out on!
73
80
  def follow_url(url, options = {}, &block)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
4
  require 'rest-client'
5
+ require 'nokogiri'
5
6
 
6
7
  describe DubDubDub do
7
8
  let(:www) { DubDubDub.new }
@@ -58,6 +59,13 @@ describe DubDubDub do
58
59
  end
59
60
  end
60
61
 
62
+ describe '#crawl' do
63
+ it "performs a GET request and returns a Nokogiri HTML document", vcr: { cassette_name: "crawl/basic", record: :once } do
64
+ html = www.crawl "http://www.google.com"
65
+ html.should be_a Nokogiri::HTML::Document
66
+ end
67
+ end
68
+
61
69
  describe '#follow_url' do
62
70
  it "follows url to the end", vcr: { cassette_name: "follow_url/base", record: :once } do
63
71
  www.follow_url("http://say.ly/TCc1CEp").should == "http://www.whosay.com/TomHanks/photos/148406"
@@ -0,0 +1,169 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://www.google.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ accept-encoding:
13
+ - gzip, deflate
14
+ user-agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Mon, 03 Dec 2012 22:19:47 GMT
23
+ expires:
24
+ - '-1'
25
+ cache-control:
26
+ - private, max-age=0
27
+ content-type:
28
+ - text/html; charset=ISO-8859-1
29
+ set-cookie:
30
+ - PREF=ID=e141badc9e873db6:FF=0:TM=1354573187:LM=1354573187:S=LqBdtkOJGXGBU2Mt;
31
+ expires=Wed, 03-Dec-2014 22:19:47 GMT; path=/; domain=.google.com
32
+ - NID=66=rvfWllEd3r-ipw8tVDXDSneXoZaX497GlkHEg5mAQwiJ1G4FRVEHXBCxXxsooIg0yBiYR9GWBsbQml9tZGabIJ7BDk56eQk0k7qXR5xArBB_ECt-LrEEmxo4l6K7ZUeT;
33
+ expires=Tue, 04-Jun-2013 22:19:47 GMT; path=/; domain=.google.com; HttpOnly
34
+ p3p:
35
+ - CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657
36
+ for more info."
37
+ server:
38
+ - gws
39
+ x-xss-protection:
40
+ - 1; mode=block
41
+ x-frame-options:
42
+ - SAMEORIGIN
43
+ transfer-encoding:
44
+ - chunked
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ! '<!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><meta
48
+ content="Search the world''s information, including webpages, images, videos
49
+ and more. Google has many special features to help you find exactly what you''re
50
+ looking for." name="description"><meta content="noodp" name="robots"><meta
51
+ itemprop="image" content="/images/google_favicon_128.png"><title>Google</title><script>(function(){
52
+
53
+ window.google={kEI:"gyW9UJ2LDsHuigKL5ICgDw",getEI:function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return
54
+ b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"17259,24692,24878,24879,27400,35703,35705,36726,39523,39978,40363,4000116,4000473,4000945,4000955,4001372,4001456,4001569,4001855,4001933,4001966,4002000,4002036,4002161,4002240,4002274,4002348,4002359,4002378,4002391,4002436,4002460,4002466,4002510,4002562,4002710,4002733,4002743,4002771,4002788",kCSI:{e:"17259,24692,24878,24879,27400,35703,35705,36726,39523,39978,40363,4000116,4000473,4000945,4000955,4001372,4001456,4001569,4001855,4001933,4001966,4002000,4002036,4002161,4002240,4002274,4002348,4002359,4002378,4002391,4002436,4002460,4002466,4002510,4002562,4002710,4002733,4002743,4002771,4002788",ei:"gyW9UJ2LDsHuigKL5ICgDw"},authuser:0,ml:function(){},kHL:"en",time:function(){return(new
55
+ Date).getTime()},log:function(a,
56
+
57
+ b,c,j){var d=new Image,f=google.lc,e=google.li,g="";d.onerror=d.onload=d.onabort=function(){delete
58
+ f[e]};f[e]=d;!c&&-1==b.search("&ei=")&&(g="&ei="+google.getEI(j));c=c||"/gen_204?atyp=i&ct="+a+"&cad="+b+g+"&zx="+google.time();a=/^http:/i;a.test(c)&&google.https()?(google.ml(Error("GLMM"),!1,{src:c}),delete
59
+ f[e]):(d.src=c,google.li=e+1)},lc:[],li:0,Toolbelt:{},y:{},x:function(a,b){google.y[a.id]=[a,b];return!1}};})();
60
+
61
+ window.google.sn="webhp";window.google.timers={};window.google.startTick=function(a,b){window.google.timers[a]={t:{start:(new
62
+ Date).getTime()},bfr:!(!b)}};window.google.tick=function(a,b,c){if(!window.google.timers[a])google.startTick(a);window.google.timers[a].t[b]=c||(new
63
+ Date).getTime()};google.startTick("load",true);try{}catch(u){}
64
+
65
+ var _gjwl=location;function _gjuc(){var a=_gjwl.href.indexOf("#");if(0<=a&&(a=_gjwl.href.substring(a),0<a.indexOf("&q=")||0<=a.indexOf("#q=")))if(a=a.substring(1),-1==a.indexOf("#")){for(var
66
+ d=0;d<a.length;){var b=d;"&"==a.charAt(b)&&++b;var c=a.indexOf("&",b);-1==c&&(c=a.length);b=a.substring(b,c);if(0==b.indexOf("fp="))a=a.substring(0,d)+a.substring(c,a.length),c=d;else
67
+ if("cad=h"==b)return 0;d=c}_gjwl.href="/search?"+a+"&cad=h";return 1}return
68
+ 0}
69
+
70
+ function _gjp(){(!window._gjwl.hash||!window._gjuc())&&setTimeout(_gjp,500)};
71
+
72
+ window._gjp&&_gjp();</script><style>#gbar,#guser{font-size:13px;padding-top:1px
73
+ !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px
74
+ solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media
75
+ all{.gb1{height:22;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline
76
+ !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf
77
+ .gb4{color:#900 !important}</style><style id="gstyle">body{margin:0;overflow-y:scroll}#gog{padding:3px
78
+ 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts
79
+ td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px
80
+ arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:-moz-inline-box;display:inline-block;margin:3px
81
+ 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c
82
+ !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl
83
+ a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead
84
+ a.gb2:hover{color:#fff!important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px
85
+ 0;margin-left:13px;font-size:11px;}.lsbb{background:#eee;border:solid 1px;border-color:#ccc
86
+ #999 #999 #ccc;height:30px;display:block}.ftl,#fll a{display:inline-block;margin:0
87
+ 12px}.lsb{background:url(/images/srpr/nav_logo80.png) 0 -258px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px
88
+ arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}#addlang
89
+ a{padding:0 3px}.gac_v div{display:none}.gac_v .gac_v2,.gac_bt{display:block!important}table.gssb_c{z-index:986 }.nbcl{background:url(/images/srpr/nav_logo80.png)
90
+ no-repeat ;height:px;width:px}</style><script></script> </head><body dir="ltr"
91
+ bgcolor="#fff"><script>(function(){var src=''/images/srpr/nav_logo80.png'';var
92
+ iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new
93
+ Image().src=src;}
94
+
95
+ if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
96
+
97
+ }
98
+
99
+ })();</script><textarea id="csi" style="display:none"></textarea><div id="mngb"><div
100
+ id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="http://www.google.com/imghp?hl=en&tab=wi">Images</a>
101
+ <a class=gb1 href="http://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a class=gb1
102
+ href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1 href="http://www.youtube.com/?tab=wy">YouTube</a>
103
+ <a class=gb1 href="http://news.google.com/nwshp?hl=en&tab=wn">News</a> <a
104
+ class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1
105
+ href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none"
106
+ href="http://www.google.com/intl/en/options/"><u>More</u> &raquo;</a></nobr></div><div
107
+ id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span
108
+ id=gbe></span><a href="http://www.google.com/history/optout?hl=en" class=gb4>Web
109
+ History</a> | <a href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top
110
+ id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&continue=http://www.google.com/"
111
+ class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh
112
+ style=right:0></div></div><iframe name="wgjf" style="display:none"></iframe><center><br
113
+ clear="all" id="lgpd"><div id="lga"><img alt="Google" height="95" src="/intl/en_ALL/images/srpr/logo1w.png"
114
+ width="275" id="hplogo" onload="window.lol&&lol()" style="padding:28px 0 14px"><br><br></div><form
115
+ action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td
116
+ width="25%">&nbsp;</td><td align="center" nowrap="nowrap"><input name="ie"
117
+ value="ISO-8859-1" type="hidden"><input value="en" name="hl" type="hidden"><input
118
+ name="source" type="hidden" value="hp"><div class="ds" style="height:32px;margin:4px
119
+ 0"><input autocomplete="off" class="lst" value="" title="Google Search" maxlength="2048"
120
+ name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top"></div><br
121
+ style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb"
122
+ value="Google Search" name="btnG" type="submit"></span></span><span class="ds"><span
123
+ class="lsbb"><input class="lsb" value="I''m Feeling Lucky" name="btnI" type="submit"
124
+ onclick="if(this.form.q.value)this.checked=1; else top.location=''/doodles/''"></span></span></td><td
125
+ class="fl sblc" align="left" nowrap="nowrap" width="25%"><a href="/advanced_search?hl=en&amp;authuser=0">Advanced
126
+ search</a><a href="/language_tools?hl=en&amp;authuser=0">Language tools</a></td></tr></table><input
127
+ type="hidden" id="gbv" name="gbv" value="1"></form><div id="gac_scont"></div><div
128
+ style="font-size:83%;min-height:3.5em"><br><div id="prm"><font id="hpplink"
129
+ size="-1" style="behavior:url(#default#userdata)"><span style="color:red"></span>Love
130
+ the free and open Internet? <a href="https://www.google.com/takeaction/?utm_source=google&amp;utm_medium=hpp&amp;utm_campaign=12032012freeandopen_en"
131
+ onclick="google.promos&&google.promos.link&& google.promos.link.cl()">Tell
132
+ the world''s governments</a> to keep it that way.</font><br><br><br><script
133
+ type="text/javascript">(function(){var d={promos:{}};d.promos.localStorage={};d.promos.localStorage.isLocalstorageSupported=function(){try{return"object"==typeof
134
+ window.localStorage}catch(a){return!1}};d.promos.localStorage.getPersistData=function(a){a=window.localStorage.getItem(a);return!a?"":a.toString()};d.promos.localStorage.setPersistData=function(a,b){window.localStorage.setItem(a,b)};d.promos.localStorage.removePersistData=function(a){window.localStorage.removeItem(a)};google.promos||(google.promos={});google.promos.ActionType={ACCEPT:"a",CANCEL:"c",DISMISS:"d",CLICK:"h",IMPRESSION:"i",NO_THANKS:"n",X_BUTTON:"x",MGMHP_ACCEPT:"ma",MGMHP_CANCEL:"mc",MGMHP_IMPRESSION:"mi",MGMHPPD_ACCEPT:"pa",MGMHPPD_CANCEL:"pc",MGMHPPD_IMPRESSION:"pi",MGMHPPD_NO_THANKS:"pn",MGMHPPD_NO_BUTTON:"px",MGMHPPD_DISMISS:"pd",PUSHDOWN_ACCEPT:"gpa",PUSHDOWN_IMPRESSION:"gpi",PUSHDOWN_NO_THANKS:"gpn",PUSHDOWN_NO_BUTTON:"gpx",PUSHDOWN_DISMISS:"gpd"};google.promos.sl=function(a,b,c,e){a=[c,"id="+a,"loc="+google.sn];a.push("oi=promoslinger");e&&a.push(e);google.log(b,a.join("&"))};google.promos.si=function(a,b,c,e){0.01>Math.random()&&google.promos.sl(a,b,e?e:google.promos.ActionType.IMPRESSION,c)};google.promos.spd=function(a,b,c){if(d.promos.localStorage.isLocalstorageSupported())d.promos.localStorage.setPersistData(b,c);else
135
+ if(a)try{a.setAttribute(b,c),a.save(a.id)}catch(e){google.ml(e,!1,{cause:"PERSIST_DATA_FAIL"})}};google.promos.gpd=function(a,b){if(d.promos.localStorage.isLocalstorageSupported())return
136
+ d.promos.localStorage.getPersistData(b);if(a)try{return a.load(a.id),a.getAttribute(b)}catch(c){google.ml(c,!1,{cause:"PERSIST_DATA_FAIL"})}return""};google.promos.rpd=function(a,b){if(d.promos.localStorage.isLocalstorageSupported())d.promos.localStorage.removePersistData(b);else
137
+ if(a)try{a.load(a.id),a.removeAttribute(b),a.save(a.id)}catch(c){google.ml(c,!1,{cause:"PERSIST_DATA_FAIL"})}};google.promos.aeh=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)};})();</script><script
138
+ type="text/javascript">(function(){var c,e,g=0,h;google.promos.link||(google.promos.link={});google.promos.link.getExtraLogData_=function(b){var
139
+ a=document.getElementById(h);if(a){var f=e+"_upccb",d=parseInt(google.promos.gpd(a,f)||0,10);d++;g++;google.promos.spd(a,f,d);a=[["upcc",g].join("="),["upccb",d].join("=")];b&&a.push(b);return
140
+ a.join("&")}};google.promos.link.cl=function(b){try{google.promos.sl(e,c,google.promos.ActionType.CLICK,google.promos.link.getExtraLogData_(b))}catch(a){google.ml(a,!1,{cause:c+"_CL"})}};google.promos.link.init=function(b,a,f){try{e=b,c=a,h=f,google.promos.si(e,c)}catch(d){google.ml(d,!1,{cause:c+"_INIT"})}};})();</script><script>(function(){var
141
+ sourceWebappPromoID=1579001;var payloadType=3;google.promos.link.init(sourceWebappPromoID,payloadType,''hpplink'');})();</script></div></div><span
142
+ id="footer"><div style="font-size:10pt"><div id="fll" style="margin:19px auto;text-align:center"><a
143
+ href="/intl/en/ads/">Advertising&nbsp;Programs</a><a href="/services/">Business
144
+ Solutions</a><a href="https://plus.google.com/116899029375914044550" rel="publisher">+Google</a><a
145
+ href="/intl/en/about.html">About Google</a></div></div><p style="color:#767676;font-size:8pt">&copy;
146
+ 2012 - <a href="/intl/en/policies/">Privacy & Terms</a></p></span></center><div
147
+ id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];(function(){var
148
+ b;function c(a){window.setTimeout(function(){var d=document.createElement("script");d.src=a;document.getElementById("xjsd").appendChild(d)},0)}google.dljp=function(a){b=a;google.xjsi||(google.xjsu=a,c(b))};google.dlj=c;})();
149
+
150
+ if(!google.xjs){google.dstr=[];google.rein=[];window._=window._||{};window._._DumpException=function(e){throw
151
+ e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new
152
+ Date().getTime();}google.dljp(''/xjs/_/js/hp/sb_he,pcc/rt\x3dj/ver\x3dekMxmVjFIzI.en_US./d\x3d1/sv\x3d1/rs\x3dAItRSTM0lksRtI2VxMWJM1mGGSAc7V2OnQ'');google.xjs=1;}google.pmc={sb:{"agen":false,"cgen":true,"client":"heirloom-hp","dh":true,"ds":"","eqch":true,"fl":true,"host":"google.com","jsonp":true,"msgs":{"lcky":"I\u0026#39;m
153
+ Feeling Lucky","lml":"Learn more","oskt":"Input tools","psrc":"This search
154
+ was removed from your \u003Ca href=\"/history\"\u003EWeb History\u003C/a\u003E","psrl":"Remove","sbit":"Search
155
+ by image","srch":"Google Search"},"ovr":{"l":1,"ms":1},"pq":"","qcpw":false,"scd":10,"sce":5,"stok":"T6XUP3D9Euph7X6BWXXXesAOH9Q"},pcc:{}};google.y.first.push(function(){if(google.med){google.med(''init'');google.initHistory();google.med(''history'');}google.History&&google.History.initialize(''/'');google.hs&&google.hs.init&&google.hs.init()});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}</script></div><script>(function(){var
156
+ b,c,d,e;function g(a,f){a.removeEventListener?(a.removeEventListener("load",f,!1),a.removeEventListener("error",f,!1)):(a.detachEvent("onload",f),a.detachEvent("onerror",f))}function
157
+ h(a){e=(new Date).getTime();++c;a=a||window.event;a=a.target||a.srcElement;g(a,h)}var
158
+ j=document.getElementsByTagName("img");b=j.length;
159
+
160
+ for(var k=c=0,l;k<b;++k)l=j[k],l.complete||"string"!=typeof l.src||!l.src?++c:l.addEventListener?(l.addEventListener("load",h,!1),l.addEventListener("error",h,!1)):(l.attachEvent("onload",h),l.attachEvent("onerror",h));d=b-c;
161
+
162
+ function m(){if(google.timers.load.t){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=e;google.kCSI.imc=c;google.kCSI.imn=b;google.kCSI.imp=d;void
163
+ 0!==google.stt&&(google.kCSI.stt=google.stt);google.csiReport&&google.csiReport()}}window.addEventListener?window.addEventListener("load",m,!1):window.attachEvent&&window.attachEvent("onload",m);google.timers.load.t.prt=e=(new
164
+ Date).getTime();})();
165
+
166
+ </script></body></html>'
167
+ http_version: '1.1'
168
+ recorded_at: Mon, 03 Dec 2012 22:19:47 GMT
169
+ recorded_with: VCR 2.3.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dubdubdub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: nokogiri
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -144,6 +160,7 @@ files:
144
160
  - spec/dubdubdub_spec.rb
145
161
  - spec/spec_helper.rb
146
162
  - spec/support/vcr.rb
163
+ - spec/vcr/crawl/basic.yml
147
164
  - spec/vcr/follow_url/alias_link.yml
148
165
  - spec/vcr/follow_url/base.yml
149
166
  - spec/vcr/follow_url/block_base_url.yml
@@ -172,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
189
  version: '0'
173
190
  segments:
174
191
  - 0
175
- hash: -2986985482614127435
192
+ hash: 1241475245500893694
176
193
  required_rubygems_version: !ruby/object:Gem::Requirement
177
194
  none: false
178
195
  requirements: