sniffles 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/lib/sniffles/version.rb +1 -1
- data/lib/sniffles.rb +10 -3
- data/sniffles.gemspec +1 -1
- data/spec/cassettes/squidoo.yml +242 -0
- data/spec/sniffles_spec.rb +14 -0
- metadata +13 -10
data/lib/sniffles/version.rb
CHANGED
data/lib/sniffles.rb
CHANGED
@@ -4,16 +4,19 @@ require "sniffles/version"
|
|
4
4
|
|
5
5
|
module Sniffles
|
6
6
|
def self.sniff(html)
|
7
|
+
doc = Nokogiri::HTML::parse(html)
|
8
|
+
|
7
9
|
output = {}
|
8
|
-
output[:wordpress] = true if wordpress?(
|
10
|
+
output[:wordpress] = true if wordpress?(doc)
|
9
11
|
output[:jquery] = true if jquery?(html)
|
10
12
|
output[:quantcast] = true if quantcast?(html)
|
13
|
+
output[:mixpanel] = true if mixpanel?(html)
|
11
14
|
|
12
15
|
output
|
13
16
|
end
|
14
17
|
|
15
|
-
def self.wordpress?(
|
16
|
-
|
18
|
+
def self.wordpress?(doc)
|
19
|
+
!doc.xpath('.//link[contains(@href,"wp-content")]').empty?
|
17
20
|
end
|
18
21
|
|
19
22
|
def self.jquery?(html)
|
@@ -23,4 +26,8 @@ module Sniffles
|
|
23
26
|
def self.quantcast?(html)
|
24
27
|
!!(html =~ /\.quantserve\.com\/quant\.js/)
|
25
28
|
end
|
29
|
+
|
30
|
+
def self.mixpanel?(html)
|
31
|
+
!!(html =~ /api.mixpanel.com\S+mixpanel.js/)
|
32
|
+
end
|
26
33
|
end
|
data/sniffles.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require File.expand_path('../lib/sniffles/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["Ezekiel Templin"]
|
5
|
+
gem.authors = ["Ezekiel Templin", "Jake Austwick"]
|
6
6
|
gem.email = ["zeke@templ.in"]
|
7
7
|
gem.description = %q{Detects popular CMS, Javascript libraries, and other items of interest.}
|
8
8
|
gem.summary = %q{Sniffles helps you determine the platforms and libraries a website is running.}
|
@@ -0,0 +1,242 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.squidoo.com/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- Apache
|
17
|
+
Vary:
|
18
|
+
- Accept-Encoding
|
19
|
+
Content-Encoding:
|
20
|
+
- gzip
|
21
|
+
Content-Type:
|
22
|
+
- text/html; charset=UTF-8
|
23
|
+
Content-Length:
|
24
|
+
- '7010'
|
25
|
+
Accept-Ranges:
|
26
|
+
- bytes
|
27
|
+
Date:
|
28
|
+
- Wed, 29 Feb 2012 20:24:24 GMT
|
29
|
+
X-Varnish:
|
30
|
+
- 369534020 369523927
|
31
|
+
Age:
|
32
|
+
- '50'
|
33
|
+
Via:
|
34
|
+
- 1.1 varnish
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: ! "<!doctype html>\n<!--\n ____ _____ __ __ ______ ____ _____
|
40
|
+
\ _____ \n/\\ _`\\ /\\ __`\\/\\ \\/\\ \\/\\__ _\\ /\\ _`\\ /\\ __`\\/\\
|
41
|
+
\ __`\\ \n\\ \\,\\L\\_\\ \\ \\/\\ \\ \\ \\ \\ \\/_/\\ \\/ \\ \\ \\/\\ \\
|
42
|
+
\\ \\/\\ \\ \\ \\/\\ \\ \n \\/_\\__ \\\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\
|
43
|
+
\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \n /\\ \\L\\ \\ \\ \\\\'\\\\ \\
|
44
|
+
\\_\\ \\ \\_\\ \\__\\ \\ \\_\\ \\ \\ \\_\\ \\ \\ \\_\\ \\ \n \\ `\\____\\
|
45
|
+
\\___\\_\\ \\_____\\/\\_____\\\\ \\____/\\ \\_____\\ \\_____\\\n \\/_____/\\/__//_/\\/_____/\\/_____/
|
46
|
+
\\/___/ \\/_____/\\/_____/\n-->\n<html xmlns=\"http://www.w3.org/1999/xhtml\"
|
47
|
+
xmlns:fb=\"http://www.facebook.com/2008/fbml\" xml:lang=\"en\" lang=\"en\"
|
48
|
+
>\n <head>\n <title>Squidoo : Welcome to Squidoo</title>\n <link rel=\"stylesheet\"
|
49
|
+
href=\"http://the.squidoocdn.com/styles/styles.v7102426.css\" />\n<link rel=\"stylesheet\"
|
50
|
+
href=\"http://the.squidoocdn.com/styles/style_home.v2963620451.css\" />\n
|
51
|
+
\ <!--[if ie 8]>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/styles/ie8.css\"
|
52
|
+
/>\n <![endif]-->\n <!--[if ie 7]>\n <link rel=\"stylesheet\" type=\"text/css\"
|
53
|
+
href=\"/styles/ie7.css\" />\n <![endif]-->\n <!--[if ie 6]>\n <link
|
54
|
+
rel=\"stylesheet\" type=\"text/css\" href=\"/styles/ie6.css\" />\n <![endif]-->
|
55
|
+
\n <meta name=\"description\" content=\"Squidoo. The popular
|
56
|
+
(free) site for creating single webpages on your interests and recommendations.
|
57
|
+
Even earn money for charity or yourself.\">\n <meta name=\"verify-v1\"
|
58
|
+
content=\"Y9PqlcFaGSPBqNgqAeHOHmf4FVz33FWOmpvxqfm1Y+M=\">\n <meta
|
59
|
+
name=\"y_key\" content=\"139a6f82135ebc6f\">\n <meta name=\"msvalidate.01\"
|
60
|
+
content=\"47298C5F95BAB1EE1B12653250E13140\">\n <link rel=\"icon\"
|
61
|
+
type=\"image/vnd.microsoft.icon\" href=\"http://the.squidoocdn.com/images/favicon.ico\"
|
62
|
+
/>\n <link rel=\"SHORTCUT ICON\" href=\"http://the.squidoocdn.com/images/favicon.ico\"/>\n
|
63
|
+
\ <script>\n if (top.location != self.location) {\n var href
|
64
|
+
= self.location.href;\n top.location = href;\n }\n </script>\n
|
65
|
+
\ \n <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js\"></script>\n<script>!window.jQuery
|
66
|
+
&& document.write(unescape('%3Cscript src=\"http://the.squidoocdn.com/scripts/jquery/jquery-1.6.4.min.js\"%3E%3C/script%3E'))</script>\n<script>$J
|
67
|
+
= jQuery.noConflict();</script>\n<script>\nSquidoo={__generated__:'2012-02-29T14:58:11-05:00',host:'http://www.squidoo.com',secure:'https://www.squidoo.com',__captcha__:'_squidcap_e',DEPS:{}};Squidoo.DEPS.JQUERY={src:'//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js',alt:'jquery/jquery-1.6.4.min',isLoaded:function(callback){if('jQuery'in
|
68
|
+
window){if(jQuery.fn.jquery.substr(0,3)>=1.6){callback(true);}else{jQuery=null;callback(false);}}else{callback(false);}},onLoad:function(callback){window.$J=jQuery.noConflict()\ncallback();}};Squidoo.DEPS.TRACKER={src:'squidoo/lib/tracker',isLoaded:function(callback){callback(Squidoo.Tracker&&Squidoo.Tracker.lib);}};Squidoo.DEPS.JQUERY_UI={deps:[Squidoo.DEPS.JQUERY],src:'//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',alt:'jquery/jquery-ui-1.8.16.min',isLoaded:function(callback){callback(jQuery.ui&&jQuery.ui.version=='1.8.16');}};Squidoo.DEPS.TEMPLATES={deps:[Squidoo.DEPS.JQUERY],src:'http://the.squidoocdn.com/scripts/squidoo/lib/templates.v2202656513.js',isLoaded:function(callback){callback(Squidoo.Templates&&Squidoo.Templates.lib);}};Squidoo.DEPS.COUNTDOWN={deps:[],src:'http://the.squidoocdn.com/scripts/countdown/countdown.v1221151160.js',isLoaded:function(callback){callback(window.squidtime);}};Squidoo.DEPS.VALIDATION={deps:[Squidoo.DEPS.JQUERY],src:'http://the.squidoocdn.com/scripts/squidoo/core/validation.v353471365.js',isLoaded:function(callback){callback(Squidoo.Validation&&Squidoo.Validation.lib);}};Squidoo.DEPS.AUTOCOMPLETE={deps:[Squidoo.DEPS.JQUERY_UI],src:'squidoo/core/autocomplete',isLoaded:function(callback){callback(Squidoo.Autocomplete&&Squidoo.Autocomplete.lib);}};Squidoo.DEPS.MEDIA={deps:[Squidoo.DEPS.JQUERY],src:'squidoo/core/media',isLoaded:function(callback){callback(Squidoo.Media&&Squidoo.Media.Uploadable);}};Squidoo.DEPS.TOOLTIP={deps:[Squidoo.DEPS.JQUERY,Squidoo.DEPS.JQUERY_UI],src:'squidoo/lib/tooltip',isLoaded:function(callback){callback(jQuery.fn.pointer)}};Squidoo.DEPS.NOTIFYBAR={deps:[Squidoo.DEPS.JQUERY],src:'squidoo/lib/notifybar',isLoaded:function(callback){callback(window.NotifyBar)}};Squidoo.DEPS.FACEBOOK={deps:[Squidoo.DEPS.JQUERY],src:'http://the.squidoocdn.com/scripts/squidoo/lib/facebook.v2585570497.js',isLoaded:function(callback){callback(Squidoo.Facebook&&Squidoo.Facebook.lib);},onLoad:function(callback){Squidoo.waitForSelection('body',function(){$J('body').prepend('<div
|
69
|
+
id=\"fb-root\"></div>');window.fbAsyncInit=function(){FB.init({channelUrl:'/channel.html',appId:'37459380049',status:true,cookie:true,xfbml:true,oauth:true});Squidoo.Facebook.init();Squidoo.Facebook.sdkLoaded=true;callback();};(function(){var
|
70
|
+
e=document.createElement('script');e.async=true;e.src=document.location.protocol+'//connect.facebook.net/en_US/all.js';document.getElementById('fb-root').appendChild(e);}());});}};Squidoo.DEPS.AUTH={deps:[Squidoo.DEPS.JQUERY,Squidoo.DEPS.FACEBOOK],src:'http://the.squidoocdn.com/scripts/squidoo/core/auth.v3046163710.js',isLoaded:function(callback){callback(Squidoo.Auth&&Squidoo.Auth.lib);}};Squidoo.Facebook={appId:'37459380049',sdkLoaded:false,defaultPicture:'http://i3.squidoocdn.com/resize_square/squidoo_images/50/lm_placeholder.jpg',reload:function(btn,callback){if($.isFunction(btn)){callback=btn;btn=null;}\nFB.init({channelUrl:'/channel.html',appId:'37459380049',status:true,cookie:true,xfbml:true,oauth:true});self.sdkLoaded=true;if($.isFunction(callback)){callback(true);}\nif(btn){$J(btn).removeClass('btn_working');}},withFB:function(callback){if(Squidoo.Facebook.sdkLoaded){callback();}else{var
|
71
|
+
i=setInterval(function(){if(Squidoo.Facebook.sdkLoaded){clearInterval(i);callback();}},100);}}};$J.extend(Squidoo||{},{isMobile:'',isIPad:'',isIOS:''});theLensName='';theLensId='';theRequestServerName='www.squidoo.com';theServerName='www.squidoo.com';isLoggedIn=false;hasGaming=false;theWindowPref=false;theLensOwner=false;theMember=false;isMAP=false;</script><script
|
72
|
+
src=\"http://the.squidoocdn.com/scripts/squidoo/core/squidoo.v1407989711.js\"></script>\n
|
73
|
+
\ <!-- adsense setup -->\n <script type=\"text/javascript\" src=\"http://partner.googleadservices.com/gampad/google_service.js\">\n
|
74
|
+
\ </script>\n <script type=\"text/javascript\">\n GS_googleAddAdSenseService(\"ca-pub-9879162776784828\");\n
|
75
|
+
\ GS_googleEnableAllServices();\n </script>\n <script>\n \n GA_googleAddSlot(\"ca-pub-9879162776784828\",
|
76
|
+
\"squidoo_generic_728x90_top\");\n GA_googleAddSlot(\"ca-pub-9879162776784828\",
|
77
|
+
\"squidoo_generic_300x250_sidebartop\");\n GA_googleAddSlot(\"ca-pub-9879162776784828\",
|
78
|
+
\"squidoo_generic_160x600_sidebarbottom\");\n GA_googleAddSlot(\"ca-pub-9879162776784828\",
|
79
|
+
\"Chitika:Sidebar300x400\");\n GA_googleAddSlot(\"ca-pub-9879162776784828\",
|
80
|
+
\"say_media_twig\");\n\n GA_googleFetchAds();\n </script><!-- /adsense
|
81
|
+
setup -->\n <script>\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount',
|
82
|
+
'UA-185209-2'],['_setDomainName', 'www.squidoo.com'],['_setCustomVar', 1,
|
83
|
+
'Role', 'visitor', 1],['_trackPageview'],['sqev._setAccount', 'UA-185209-16'],['sqev._setDomainName',
|
84
|
+
'www.squidoo.com'],['sqev._trackPageview']); // end gaq.push\n\n // \n //
|
85
|
+
Google Analytics lazy-load\n //\n (function() {\n var use_debug = false;
|
86
|
+
false;\n var ga = document.createElement('script'); ga.type = 'text/javascript';
|
87
|
+
ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl'
|
88
|
+
: 'http://www') + '.google-analytics.com/' + (use_debug ? 'u/ga_debug.js'
|
89
|
+
: 'ga.js');\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga,
|
90
|
+
s);\n })();\n\n var evTrack = function(category, action, opt_label, opt_value)
|
91
|
+
{\n try {\n _gaq.push(['_trackEvent', category, action, opt_label,
|
92
|
+
opt_value]);\n } catch (ex) {}\n };\n\n var evSocial = function(network,
|
93
|
+
socialAction, opt_target, opt_pagePath) {\n try {\n _gaq.push(['_trackSocial',
|
94
|
+
network, socialAction, opt_target, opt_pagePath]);\n } catch (ex)
|
95
|
+
{}\n };\n\n // lens stats\n \n //\n // quantcast beacon\n //\n
|
96
|
+
\ _qoptions = {\n qacct:\"p-5aMDYnNLAd_xM\"\n };\n\n jQuery.getScript('http://edge.quantserve.com/quant.js');\n\n
|
97
|
+
\ //\n // mix panel\n //\n // var mpq=[];mpq.push([\"init\",\"688c8f775abde7c1135d8fe8aeeb8201\"]);(function(){var
|
98
|
+
b,a,e,d,c;b=document.createElement(\"script\");b.type=\"text/javascript\";b.async=true;b.src=(document.location.protocol===\"https:\"?\"https:\":\"http:\")+\"//api.mixpanel.com/site_media/js/api/mixpanel.js\";a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(b,a);e=function(f){return
|
99
|
+
function(){mpq.push([f].concat(Array.prototype.slice.call(arguments,0)))}};d=[\"init\",\"track\",\"track_links\",\"track_forms\",\"register\",\"register_once\",\"identify\",\"name_tag\",\"set_config\"];for(c=0;c<d.length;c++){mpq[d[c]]=e(d[c])}})();\n
|
100
|
+
\ </script>\n\n<script type=\"text/javascript\">var NREUMQ=NREUMQ||[];NREUMQ.push([\"mark\",\"firstbyte\",new
|
101
|
+
Date().getTime()]);</script>\n \n \n</head> <body class=\"home_page\">\n
|
102
|
+
\ <!--INFOLINKS_OFF-->\n <div id=\"squidnav_wrap\" class=\"container\">\n
|
103
|
+
\ <div id=\"squidnav\" class=\"row\">\n \n <div id=\"squidnav_left\"
|
104
|
+
class=\"float_left six columns\">\n <ul class=\"fb_session_aware\">\n
|
105
|
+
\ \n <li><a href=\"https://www.squidoo.com/member/login\">Log
|
106
|
+
In</a></li>\n \n <li><a href=\"http://www.squidoo.com/topics\">Explore
|
107
|
+
Topics</a></li>\n \n <li><a onclick=\"_gaq.push(['_trackEvent',
|
108
|
+
'Sign Up', 'Join Us']);\" href=\"http://www.squidoo.com/member/registration\"
|
109
|
+
class=\"onion_15 bold caps\">Join Us</a></li>\n </ul>\n </div>\n
|
110
|
+
\ <div id=\"squidnav_right\" class=\"float_right six columns\">\n <form
|
111
|
+
id=\"header_search\" method=\"get\" action=\"http://www.squidoo.com/search/results\"
|
112
|
+
name=\"searchForm\">\n <input id=\"query\" class=\"searchField\"
|
113
|
+
type=\"text\" onfocus=\"this.value = '';\" value=\"Search Squidoo\" name=\"q\"/>\n
|
114
|
+
\ <button id=\"btn_search_go\" type=\"submit\" value=\"Go\">Go</button>\n
|
115
|
+
\ </form>\n </div>\n </div>\n</div>\n\n<script type=\"text/javascript\">\n
|
116
|
+
\ (function($) {\n $(function() {\n if (screen.width <= 800) {\n $('#squidnav_wrap').css('position',
|
117
|
+
'static');\n $('body').css('padding-top', '0');\n } \n });
|
118
|
+
\ \n \n $('#squidnav div').live('mouseenter', function() {\n $(this).parents('li').addClass('active_li');\n
|
119
|
+
\ }).live('mouseleave', function() {\n $(this).parents('li').removeClass('active_li');\n
|
120
|
+
\ });\n })(jQuery);\n</script><div id=\"header_wrap\">\n <div id=\"header\">\n
|
121
|
+
\ <h1><a href=\"http://www.squidoo.com/\">Squidoo</a></h1>\n </div>\n</div>\n\n<div
|
122
|
+
id=\"sg_container\"></div>\n\n <div id=\"content_wrap\">\n <div id=\"content\">\n
|
123
|
+
\ <div id=\"home_top_wrap\">\n <div id=\"home_top\">\n <h2>What's
|
124
|
+
your story?</h2>\n <p class=\"font24\">Create a collection of the things
|
125
|
+
you know and love. \n <a href=\"/lensbrainstorm\">\n Learn
|
126
|
+
how.\n </a>\n </p>\n <div id=\"home_btn\">\n <a
|
127
|
+
class=\"home_signup\" href=\"#\" onclick=\"Squidoo.register(function() { document.location='/build/start';
|
128
|
+
}); return false;\">Join for free!</a>\n <span class=\"font11\">and
|
129
|
+
build a page in minutes</span>\n \n </div>\n </div>\n</div>\n\n<div
|
130
|
+
id=\"errors\" style=\"display:none\">\n </div>\n<div id=\"info\" class=\"alert_box\"
|
131
|
+
style=\"display:none\">\n <p class=\"font13\"><a style=\"display: block;
|
132
|
+
float: right; margin: 0 0 10px 10px;\" href=\"#\" onclick=\"jQuery('#info').fadeOut('slow');\">Close</a>
|
133
|
+
</p>\n</div>\n<h3>Popular Pages</h3>\n\n<div id=\"home_left\" class=\"clear\">\n
|
134
|
+
\ <div class=\"home_lenses spinner\"></div>\n</div><!-- #home_left -->\n\n<div
|
135
|
+
id=\"home_right\">\n \n <div id=\"explore_box\" class=\"home_sb_item\">\n
|
136
|
+
\ <h3 class=\"\">\n Explore Topics</h3>\n <ul class=\"no_style\">\n
|
137
|
+
\ \n <li><a href=\"http://www.squidoo.com/topics/food-and-cooking\">Food
|
138
|
+
& Cooking</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/hobbies-games-toys\">Hobbies,
|
139
|
+
Games & Toys</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/parenting-and-kids\">Parenting
|
140
|
+
& Kids</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/pets-and-animals\">Pets
|
141
|
+
& Animals</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/books-poetry-writing\">Books,
|
142
|
+
Poetry & Writing</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/videogames\">Video
|
143
|
+
Games</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/home-and-garden\">Home
|
144
|
+
& Garden</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/holidays-and-celebrations\">Holidays
|
145
|
+
& Celebrations</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/travel-and-places\">Travel
|
146
|
+
& Places</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/fashion-and-beauty\">Fashion
|
147
|
+
& Beauty</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/weddings\">Weddings</a></li>
|
148
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/computers-and-electronics\">Computers
|
149
|
+
& Electronics</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/education\">Education</a></li>
|
150
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/arts-and-design\">Arts
|
151
|
+
& Design</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/entertainment\">Entertainment
|
152
|
+
& Media</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/culture-and-society\">Culture
|
153
|
+
& Society</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/music\">Music</a></li>
|
154
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/business-and-work\">Business
|
155
|
+
& Work</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/sports-and-recreation\">Sports
|
156
|
+
& Recreation</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/cars\">Cars</a></li>
|
157
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/nonprofits\">Nonprofits</a></li>
|
158
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/healthy-living\">Healthy
|
159
|
+
Living</a></li> \n \n <li><a href=\"http://www.squidoo.com/topics/internet\">Internet</a></li>
|
160
|
+
\n \n <li><a href=\"http://www.squidoo.com/topics/relationships-and-family\">Relationships
|
161
|
+
& Family</a></li> \n </ul> \n </div>\n \n \n <div class=\"home_sb_item\">\n
|
162
|
+
\ <h3>Testimonials</h3>\n <ul class=\"quotes\">\n <li>\"I
|
163
|
+
just used some of my Squidoo earnings to buy Tim McGraw concert tickets for
|
164
|
+
my wife's birthday.\"\n <span><a href=\"/lensmasters/mac33\">Mac33</a></span>\n
|
165
|
+
\ <li>\"Squidoo is very addictive. Perhaps we need a warning label!
|
166
|
+
I love the opportunity to write on diverse topics and quickly create a lens
|
167
|
+
on the fly. The independence is wonderful, as well as the ability to create
|
168
|
+
lenses that automatically donate to charity.\"\n <span><a href=\"/lensmasters/genglo\">Genglo</a></span>\n
|
169
|
+
\ <li>\"Word of mouth at your fingertips.\"\n <span><a
|
170
|
+
href=\"/lensmasters/skysuccess\">Skysuccess</a></span>\n <li>\"I
|
171
|
+
love reading, learning, writing, organizing and connecting on Squidoo. I can
|
172
|
+
combine all my interests here. Squidoo lets me be me!\"\n <span><a
|
173
|
+
href=\"/lensmasters/MysticTurtle\">MysticTurtle</a></span>\n <li>\"Thanks
|
174
|
+
to contributed royalties from thousands of lensmasters, Room to Read has built
|
175
|
+
a computer room for kids in Kheri Kalan, an industrial town in India. Thank
|
176
|
+
you for helping us to create a brighter future through education.\"\n <span><a
|
177
|
+
href=\"http://www.roomtoread.org/\">John Wood, Room to Read</a></span>\n </ul>\n
|
178
|
+
\ </div>\n</div><!-- #home_right -->\n\n<script>\n$J.ajax({\n type: 'POST',\n
|
179
|
+
\ dataType: 'json',\n url: '/home/json_home',\n success: function(content)
|
180
|
+
{\n $J('#home_left').html(content.lenses.html);\n }\n});\n$J('#home_left
|
181
|
+
.spinner').spin(SPINNER_HOME);\n</script>\n\n </div><!--
|
182
|
+
/content -->\n </div><!-- /content_wrap --> \n <!-- INFOLINKS_OFF -->\n<div
|
183
|
+
id=\"footer_wrap\" class=\"container\">\n <div id=\"footer\" class=\"row\">\n
|
184
|
+
\ \n <div class=\"footer_left eight columns\">\n <ul class=\"footer_nav\">\n
|
185
|
+
\ <li class=\"first\"><a href=\"http://www.squidoo.com/squidoo/65355501-Terms-of-Service\">TOS</a></li>\n
|
186
|
+
\ <li><a href=\"http://www.squidoo.com/originalitypact\">Originality
|
187
|
+
Pact</a></li>\n <li><a href=\"http://www.squidoo.com/pages/squidteam\">About
|
188
|
+
Us</a></li>\n <li><a href=\"http://www.squidoohq.com/\">SquidooHQ</a></li>\n
|
189
|
+
\ <li><a href=\"http://www.squidoo.com/charity-sign-up\">Charity</a></li>\n
|
190
|
+
\ <li><a href=\"http://www.squidoo.com/squidoo/65431441-Help-Feedback#module83018671\"
|
191
|
+
onclick=\"$Sq.bug(); return false;\">Feedback & Bugs</a></li>\n </ul>\n
|
192
|
+
\ <!-- remove \"#footer_copy\" from stylesheet -->\n <div class=\"font12
|
193
|
+
footer_copy\">Copyright © 2012,\n Squidoo, LLC and respective
|
194
|
+
copyright owners</div>\n <div class=\"font11 footer_copy\">This page
|
195
|
+
and all the pages on Squidoo generate income for lensmasters and charities
|
196
|
+
based on affiliate relationships with our partners, including Amazon, Google,
|
197
|
+
eBay and others. Have fun.</div>\n </div>\n \n <div class=\"four columns\">\n
|
198
|
+
\ <div class=\"footer_right\" id=\"news_sub\" >\n <h4
|
199
|
+
class=\"font13 nl_h4\">Want our Newsletter?</h4>\n <form action=\"#\"
|
200
|
+
onsubmit=\"Newsletter.subscribe(this); return false;\">\n <input
|
201
|
+
type=\"text\" class=\"italic nl_input\" \n onfocus=\"this.value='';
|
202
|
+
jQuery(this.removeClass('italic'));\" id=\"footer_nl_input\"
|
203
|
+
name=\"email_address\" value=\"enter e-mail address\" />\n <button
|
204
|
+
class=\"b b24 float_left\" type=\"submit\" id=\"\">Sign up!</button>\n </form>\n
|
205
|
+
\ </div>\n </div>\n \n </div>\n</div>\n<script>\n(function($)
|
206
|
+
{\n var self = window.Newsletter = {\n subscribe: function(form) {\n var
|
207
|
+
form = $(form);\n $.post('/member/ajax_subscribe/squidu', form.serialize(),
|
208
|
+
function(error) {\n if (error) {\n alert(error);\n }
|
209
|
+
else {\n alert('Thank you for subscribing!');\n $('#news_sub').fadeOut();\n
|
210
|
+
\ }\n });\n }\n };\n})(jQuery);\n</script>\n\n <script>\n
|
211
|
+
\ if (jQuery('.twitter-share-button').size()) {\n jQuery.getScript('http://platform.twitter.com/widgets.js',
|
212
|
+
function() {\n twttr.events.bind('tweet', function(event) {\n function
|
213
|
+
extractParamFromUri(uri, paramName) {\n if (!uri) {\n return;\n
|
214
|
+
\ }\n var uri = uri.split('#')[0]; // Remove
|
215
|
+
anchor.\n var parts = uri.split('?'); // Check for query params.\n
|
216
|
+
\ if (parts.length == 1) {\n return;\n }\n
|
217
|
+
\ var query = decodeURI(parts[1]);\n\n // Find
|
218
|
+
url param.\n paramName += '=';\n var params
|
219
|
+
= query.split('&');\n for (var i = 0, param; param = params[i];
|
220
|
+
++i) {\n if (param.indexOf(paramName) === 0) {\n return
|
221
|
+
unescape(param.split('=')[1]);\n }\n }\n }
|
222
|
+
\ \n\n if (event) {\n var targetUrl;\n if
|
223
|
+
(event.target && event.target.nodeName == 'IFRAME') {\n targetUrl
|
224
|
+
= extractParamFromUri(event.target.src, 'url');\n }\n evSocial('twitter',
|
225
|
+
'tweet', targetUrl);\n }\n });\n });\n }\n
|
226
|
+
\ </script>\n \n<script type=\"text/javascript\" language=\"JavaScript\">\nvar
|
227
|
+
_comscore = _comscore || [];\n_comscore.push({ c1: \"2\", c2: \"6035233\"
|
228
|
+
});\n(function() {\nvar s = document.createElement(\"script\"), el =document.getElementsByTagName(\"script\")[0];
|
229
|
+
s.async = true;\ns.src = (document.location.protocol == \"https:\" ? \"https://sb\":
|
230
|
+
\"http://b\") + \".scorecardresearch.com/beacon.js\";\nel.parentNode.insertBefore(s,
|
231
|
+
el);\n})();\n</script>\n<noscript>\n <img src=\"http://b.scorecardresearch.com/p?c1=2&c2=6035233&cv=2.0&cj=1\"
|
232
|
+
/>\n <img src=\"http://pixel.quantserve.com/pixel/p-5aMDYnNLAd_xM.gif\" style=\"display:
|
233
|
+
none;\" border=\"0\" height=\"1\" width=\"1\" alt=\"Quantcast\"/>\n</noscript>\n\n<script
|
234
|
+
type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new
|
235
|
+
Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.async=true;e.src=\"https://d1ros97qkrwjf5.cloudfront.net/30/eum/rum.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrf2\",\"beacon-1.newrelic.com\",\"3cd3786cd7\",657144,\"MQdQbBEHCEJYARdcCQhNcU0QEglcFkg=\",0,42,new
|
236
|
+
Date().getTime()]);</script>\n\n\n\n\n<div id=\"default_onion\" class=\"default_onion\"
|
237
|
+
style=\"display: none;\"></div>\n<div id=\"alert-overlay\" style=\"display:none;\"></div>\n<div
|
238
|
+
id=\"lens_overlay\" class=\"overlay_wrap\" style=\"display:none;\"></div>\n\n\n
|
239
|
+
\ </body>\n</html>"
|
240
|
+
http_version: '1.1'
|
241
|
+
recorded_at: Wed, 29 Feb 2012 20:24:24 GMT
|
242
|
+
recorded_with: VCR 2.0.0.rc2
|
data/spec/sniffles_spec.rb
CHANGED
@@ -24,5 +24,19 @@ describe Sniffles do
|
|
24
24
|
it "should identify Quantcast" do
|
25
25
|
@wp.should include(:quantcast => true)
|
26
26
|
end
|
27
|
+
|
28
|
+
describe "#mixpanel" do
|
29
|
+
before(:all) do
|
30
|
+
VCR.use_cassette("squidoo") do
|
31
|
+
@body = Typhoeus::Request.get("http://www.squidoo.com/", :follow_location => true).body
|
32
|
+
end
|
33
|
+
@squid = Sniffles.sniff(@body)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should identify MixPanel" do
|
37
|
+
@squid.should include(:mixpanel => true)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
27
41
|
end
|
28
42
|
end
|
metadata
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sniffles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ezekiel Templin
|
9
|
+
- Jake Austwick
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-29 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: nokogiri
|
16
|
-
requirement: &
|
17
|
+
requirement: &2152169360 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ~>
|
@@ -21,10 +22,10 @@ dependencies:
|
|
21
22
|
version: 1.5.0
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
+
version_requirements: *2152169360
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: rspec
|
27
|
-
requirement: &
|
28
|
+
requirement: &2152168480 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
@@ -32,10 +33,10 @@ dependencies:
|
|
32
33
|
version: 2.8.0
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
+
version_requirements: *2152168480
|
36
37
|
- !ruby/object:Gem::Dependency
|
37
38
|
name: typhoeus
|
38
|
-
requirement: &
|
39
|
+
requirement: &2152187880 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
41
|
requirements:
|
41
42
|
- - ~>
|
@@ -43,10 +44,10 @@ dependencies:
|
|
43
44
|
version: 0.3.3
|
44
45
|
type: :development
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
+
version_requirements: *2152187880
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: vcr
|
49
|
-
requirement: &
|
50
|
+
requirement: &2152186820 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
52
|
requirements:
|
52
53
|
- - =
|
@@ -54,7 +55,7 @@ dependencies:
|
|
54
55
|
version: 2.0.0.rc2
|
55
56
|
type: :development
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
+
version_requirements: *2152186820
|
58
59
|
description: Detects popular CMS, Javascript libraries, and other items of interest.
|
59
60
|
email:
|
60
61
|
- zeke@templ.in
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- lib/sniffles.rb
|
75
76
|
- lib/sniffles/version.rb
|
76
77
|
- sniffles.gemspec
|
78
|
+
- spec/cassettes/squidoo.yml
|
77
79
|
- spec/cassettes/wordpress.yml
|
78
80
|
- spec/sniffles_spec.rb
|
79
81
|
- spec/spec_helper.rb
|
@@ -102,6 +104,7 @@ signing_key:
|
|
102
104
|
specification_version: 3
|
103
105
|
summary: Sniffles helps you determine the platforms and libraries a website is running.
|
104
106
|
test_files:
|
107
|
+
- spec/cassettes/squidoo.yml
|
105
108
|
- spec/cassettes/wordpress.yml
|
106
109
|
- spec/sniffles_spec.rb
|
107
110
|
- spec/spec_helper.rb
|