sniffles 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -3
  3. data/Gemfile +2 -8
  4. data/Guardfile +1 -1
  5. data/README.md +12 -13
  6. data/lib/sniffles.rb +9 -9
  7. data/lib/sniffles/html.rb +3 -3
  8. data/lib/sniffles/sniffers/advertising/adsense.rb +8 -14
  9. data/lib/sniffles/sniffers/advertising/kontera.rb +6 -6
  10. data/lib/sniffles/sniffers/analytics/chartbeat.rb +7 -7
  11. data/lib/sniffles/sniffers/analytics/facebook_insights.rb +7 -7
  12. data/lib/sniffles/sniffers/analytics/google_analytics.rb +8 -8
  13. data/lib/sniffles/sniffers/analytics/kissmetrics.rb +7 -7
  14. data/lib/sniffles/sniffers/analytics/mixpanel.rb +7 -7
  15. data/lib/sniffles/sniffers/analytics/quantcast.rb +6 -6
  16. data/lib/sniffles/sniffers/cms/cscart.rb +6 -6
  17. data/lib/sniffles/sniffers/{advertising/gumgum.rb → cms/ghost.rb} +8 -8
  18. data/lib/sniffles/sniffers/cms/invision.rb +9 -9
  19. data/lib/sniffles/sniffers/cms/joomla.rb +7 -7
  20. data/lib/sniffles/sniffers/cms/movabletype.rb +8 -8
  21. data/lib/sniffles/sniffers/cms/mybb.rb +6 -6
  22. data/lib/sniffles/sniffers/cms/phpbb.rb +7 -7
  23. data/lib/sniffles/sniffers/cms/shopify.rb +7 -7
  24. data/lib/sniffles/sniffers/cms/tumblr.rb +7 -7
  25. data/lib/sniffles/sniffers/cms/vanilla.rb +8 -8
  26. data/lib/sniffles/sniffers/cms/vbulletin.rb +10 -10
  27. data/lib/sniffles/sniffers/cms/wordpress.rb +12 -12
  28. data/lib/sniffles/sniffers/{advertising/admeld.rb → cms/xcart.rb} +3 -2
  29. data/lib/sniffles/sniffers/cms/zencart.rb +6 -6
  30. data/lib/sniffles/sniffers/javascript/jquery.rb +6 -6
  31. data/lib/sniffles/text.rb +4 -4
  32. data/lib/sniffles/version.rb +1 -1
  33. data/sniffles.gemspec +2 -2
  34. data/spec/cassettes/beenverified_com.yml +644 -784
  35. data/spec/cassettes/blackhatworld_com.yml +2298 -3292
  36. data/spec/cassettes/blog_mixpanel_com.yml +1351 -0
  37. data/spec/cassettes/community_invisionpower_com.yml +836 -2771
  38. data/spec/cassettes/cxxvi_com.yml +311 -0
  39. data/spec/cassettes/demo-store_prestashop_com.yml +897 -813
  40. data/spec/cassettes/demo_cs-cart_com.yml +2996 -1146
  41. data/spec/cassettes/demo_oscommerce_com.yml +136 -408
  42. data/spec/cassettes/digital-photography-school_com.yml +656 -0
  43. data/spec/cassettes/downlopedia_com.yml +1262 -1321
  44. data/spec/cassettes/drupal.yml +1540 -1507
  45. data/spec/cassettes/exprodirect_com.yml +1888 -0
  46. data/spec/cassettes/facebook_insights.yml +544 -474
  47. data/spec/cassettes/flatpress_org_home_blog.yml +287 -317
  48. data/spec/cassettes/foursquare_com.yml +1901 -348
  49. data/spec/cassettes/geomagik_com.yml +475 -0
  50. data/spec/cassettes/ghost_org.yml +207 -0
  51. data/spec/cassettes/google_blogspot_com.yml +574 -1059
  52. data/spec/cassettes/guistyles_com.yml +705 -1292
  53. data/spec/cassettes/installatron_com.yml +286 -0
  54. data/spec/cassettes/invisionmodding_com.yml +1124 -2442
  55. data/spec/cassettes/joomla.yml +280 -0
  56. data/spec/cassettes/kissmetrics_com.yml +165 -0
  57. data/spec/cassettes/lancelhoff_com.yml +637 -0
  58. data/spec/cassettes/magento.yml +459 -459
  59. data/spec/cassettes/metafilter_com.yml +1449 -1230
  60. data/spec/cassettes/movabletype_com_blog.yml +175 -1221
  61. data/spec/cassettes/ocbfashionjewelry_com.yml +588 -0
  62. data/spec/cassettes/pandoramoa_com.yml +290 -608
  63. data/spec/cassettes/pearsonified_com.yml +433 -435
  64. data/spec/cassettes/phpbb_com.yml +438 -416
  65. data/spec/cassettes/sitefinity_com.yml +443 -418
  66. data/spec/cassettes/sixflags_com.yml +560 -1014
  67. data/spec/cassettes/soulemama_typepad_com.yml +2378 -2581
  68. data/spec/cassettes/stackoverflow_com.yml +4762 -0
  69. data/spec/cassettes/staff_tumblr_com.yml +1956 -1658
  70. data/spec/cassettes/topix_com.yml +1748 -1417
  71. data/spec/cassettes/wellmedicated_com.yml +801 -0
  72. data/spec/cassettes/wordpress_com.yml +238 -863
  73. data/spec/cassettes/xenforo_com.yml +1143 -1933
  74. data/spec/sniffles/html_spec.rb +6 -6
  75. data/spec/sniffles/sniffers/advertising/adsense_spec.rb +7 -8
  76. data/spec/sniffles/sniffers/advertising/buysellads_spec.rb +5 -5
  77. data/spec/sniffles/sniffers/advertising/casale_spec.rb +5 -5
  78. data/spec/sniffles/sniffers/advertising/kontera_spec.rb +6 -6
  79. data/spec/sniffles/sniffers/advertising/thedeck_spec.rb +5 -5
  80. data/spec/sniffles/sniffers/advertising/tribalfusion_spec.rb +5 -5
  81. data/spec/sniffles/sniffers/analytics/chartbeat_spec.rb +3 -3
  82. data/spec/sniffles/sniffers/analytics/clicky_spec.rb +3 -3
  83. data/spec/sniffles/sniffers/analytics/facebook_insights_spec.rb +6 -6
  84. data/spec/sniffles/sniffers/analytics/google_analytics_spec.rb +7 -19
  85. data/spec/sniffles/sniffers/analytics/kissmetrics_spec.rb +5 -5
  86. data/spec/sniffles/sniffers/analytics/mixpanel_spec.rb +9 -9
  87. data/spec/sniffles/sniffers/analytics/quantcast_spec.rb +7 -7
  88. data/spec/sniffles/sniffers/cms/cscart_spec.rb +8 -8
  89. data/spec/sniffles/sniffers/cms/ghost_spec.rb +18 -0
  90. data/spec/sniffles/sniffers/cms/invision_spec.rb +9 -9
  91. data/spec/sniffles/sniffers/cms/joomla_spec.rb +9 -9
  92. data/spec/sniffles/sniffers/cms/movabletype_spec.rb +8 -8
  93. data/spec/sniffles/sniffers/cms/mybb_spec.rb +9 -9
  94. data/spec/sniffles/sniffers/cms/phpbb_spec.rb +8 -8
  95. data/spec/sniffles/sniffers/cms/shopify_spec.rb +9 -9
  96. data/spec/sniffles/sniffers/cms/tumblr_spec.rb +7 -7
  97. data/spec/sniffles/sniffers/cms/vanilla_spec.rb +9 -9
  98. data/spec/sniffles/sniffers/cms/vbulletin_spec.rb +11 -17
  99. data/spec/sniffles/sniffers/cms/wordpress_spec.rb +12 -12
  100. data/spec/sniffles/sniffers/cms/xcart_spec.rb +18 -0
  101. data/spec/sniffles/sniffers/cms/zencart_spec.rb +9 -9
  102. data/spec/sniffles/sniffers/javascript/jquery_spec.rb +8 -8
  103. data/spec/sniffles/sniffers_spec.rb +1 -1
  104. data/spec/sniffles_spec.rb +17 -17
  105. data/spec/spec_helper.rb +7 -3
  106. data/spec/support/helpers.rb +2 -2
  107. metadata +39 -39
  108. data/lib/sniffles/sniffers/cms/posterous.rb +0 -28
  109. data/spec/cassettes/blog_posterous_com.yml +0 -5015
  110. data/spec/cassettes/demo_forum-software_org_mybb.yml +0 -385
  111. data/spec/cassettes/forum-software_org_vanilla.yml +0 -223
  112. data/spec/cassettes/humemes_com.yml +0 -496
  113. data/spec/cassettes/joomla_org.yml +0 -733
  114. data/spec/cassettes/orangecrushbeads_com.yml +0 -751
  115. data/spec/cassettes/shop_angrybirds_com.yml +0 -455
  116. data/spec/cassettes/softpedia_com.yml +0 -3196
  117. data/spec/cassettes/squidoo_com.yml +0 -532
  118. data/spec/cassettes/tmz_com.yml +0 -2927
  119. data/spec/cassettes/vbulletin_com.yml +0 -2983
  120. data/spec/cassettes/wundergroud_com.yml +0 -907
  121. data/spec/sniffles/sniffers/advertising/admeld_spec.rb +0 -17
  122. data/spec/sniffles/sniffers/advertising/gumgum_spec.rb +0 -18
  123. data/spec/sniffles/sniffers/cms/posterous_spec.rb +0 -18
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/movabletype')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/movabletype'
3
3
 
4
4
  describe Sniffles::Sniffers::Movabletype do
5
- describe "#output" do
5
+ describe "#output" do
6
6
  context "movabletype", :vcr => { :cassette_name => "movabletype_com_blog" } do
7
- let(:movabletype) { described_class.new(page_body("http://www.movabletype.com/blog/")) }
8
-
7
+ let(:movabletype) { described_class.new(page_body("http://www.movabletype.com/blog.html")) }
8
+
9
9
  it { movabletype.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not movabletype" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/mybb')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/mybb'
3
3
 
4
4
  describe Sniffles::Sniffers::Mybb do
5
- describe "#output" do
6
- context "mybb", :vcr => { :cassette_name => "demo_forum-software_org_mybb" } do
7
- let(:mybb) { described_class.new(page_body("http://demo.forum-software.org/mybb/")) }
8
-
5
+ describe "#output" do
6
+ context "mybb", :vcr => { :cassette_name => "installatron_com" } do
7
+ let(:mybb) { described_class.new(page_body("http://livedemo.installatron.com/1388287564mybb/")) }
8
+
9
9
  it { mybb.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not mybb" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/phpbb')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/phpbb'
3
3
 
4
4
  describe Sniffles::Sniffers::Phpbb do
5
- describe "#output" do
5
+ describe "#output" do
6
6
  context "phpBB forum", :vcr => { :cassette_name => "phpbb_com" } do
7
- let(:phpbb) { described_class.new(page_body("http://www.phpbb.com/styles/demo/3.0/board/?style=0")) }
8
-
7
+ let(:phpbb) { described_class.new(page_body("https://www.phpbb.com/styles/demo/3.0/board/index.php?style=3")) }
8
+
9
9
  it { phpbb.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "Not a phpBB Forum" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/shopify')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/shopify'
3
3
 
4
4
  describe Sniffles::Sniffers::Shopify do
5
- describe "#output" do
6
- context "shopify", :vcr => { :cassette_name => "shop_angrybirds_com" } do
7
- let(:shopify) { described_class.new(page_body("http://shop.angrybirds.com/")) }
8
-
5
+ describe "#output" do
6
+ context "shopify", :vcr => { :cassette_name => "cxxvi_com" } do
7
+ let(:shopify) { described_class.new(page_body("http://cxxvi.com/")) }
8
+
9
9
  it { shopify.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not shopify" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/tumblr')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/tumblr'
3
3
 
4
4
  describe Sniffles::Sniffers::Tumblr do
5
- describe "#output" do
5
+ describe "#output" do
6
6
  context "tumblr", :vcr => { :cassette_name => "staff_tumblr_com" } do
7
7
  let(:tumblr) { described_class.new(page_body("http://staff.tumblr.com")) }
8
-
8
+
9
9
  it { tumblr.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not tumblr" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/vanilla')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/vanilla'
3
3
 
4
4
  describe Sniffles::Sniffers::Vanilla do
5
- describe "#output" do
6
- context "vanilla", :vcr => { :cassette_name => "forum-software_org_vanilla" } do
7
- let(:vanilla) { described_class.new(page_body("http://demo.forum-software.org/vanilla/")) }
8
-
5
+ describe "#output" do
6
+ context "vanilla", :vcr => { :cassette_name => "geomagik_com" } do
7
+ let(:vanilla) { described_class.new(page_body("http://www.geomagik.com/forum/")) }
8
+
9
9
  it { vanilla.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not vanilla" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,27 +1,21 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/vbulletin')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/vbulletin'
3
3
 
4
4
  describe Sniffles::Sniffers::Vbulletin do
5
- describe "#output" do
6
- context "vbulletin w/ meta generator", :vcr => { :cassette_name => "vbulletin_com" } do
7
- let(:vbulletin) { described_class.new(page_body("https://www.vbulletin.com/forum/forum.php")) }
8
-
5
+ describe "#output" do
6
+ context "vbulletin w/ meta generator and JS", :vcr => { :cassette_name => "blackhatworld_com" } do
7
+ let(:vbulletin) { described_class.new(page_body("http://www.blackhatworld.com/")) }
8
+
9
9
  it { vbulletin.output[:found].should eq true }
10
- it { vbulletin.output[:version].should eq "4.1.11" }
11
- it { vbulletin.output[:feed].should eq "https://www.vbulletin.com/forum/external.php?type=RSS2" }
12
- end
13
-
14
- context "vbulletin w/ JS initialization", :vcr => { :cassette_name => "blackhatworld_com" } do
15
- let(:vbulletin) { described_class.new(page_body("http://www.blackhatworld.com/index.php")) }
16
-
10
+ it { vbulletin.output[:version].should eq "4.2.1" }
11
+ it { vbulletin.output[:feed].should eq "http://www.blackhatworld.com/blackhat-seo/external.php?type=RSS2" }
17
12
  it { vbulletin.output[:found].should eq true }
18
13
  end
19
-
14
+
20
15
  context "not vbulletin" do
21
16
  let(:blank) { described_class.new(empty_html_doc) }
22
-
17
+
23
18
  it { blank.output[:found].should eq false }
24
19
  end
25
-
26
20
  end
27
- end
21
+ end
@@ -1,27 +1,27 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/wordpress')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/wordpress'
3
3
 
4
4
  describe Sniffles::Sniffers::Wordpress do
5
5
  describe "#output" do
6
6
  context "feed, theme, pingback", :vcr => { :cassette_name => 'pearsonified_com' } do
7
7
  let(:wp) { described_class.new(page_body("http://www.pearsonified.com/")) }
8
-
8
+
9
9
  it { wp.output[:found].should eq true }
10
10
  it { wp.output[:feed].should eq "http://feeds.feedburner.com/pearsonified" }
11
11
  it { wp.output[:theme].should eq "thesis_17" }
12
12
  it { wp.output[:pingback].should eq "http://www.pearsonified.com/xmlrpc.php" }
13
13
  end
14
-
15
- context "version", :vcr => { :cassette_name => 'humemes_com' } do
16
- let(:wp) { described_class.new(page_body("http://humemes.com/")) }
17
-
18
- it { wp.output[:version].should eq "2.3.1" }
19
- end
20
-
14
+
15
+ context "version", :vcr => { :cassette_name => 'wellmedicated_com' } do
16
+ let(:wp) { described_class.new(page_body("http://wellmedicated.com/")) }
17
+
18
+ it { wp.output[:version].should eq "3.1.4" }
19
+ end
20
+
21
21
  context "not wordpress" do
22
22
  let(:blank) { described_class.new(empty_html_doc) }
23
-
23
+
24
24
  it { blank.output[:found].should eq false }
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/xcart')
3
+
4
+ describe Sniffles::Sniffers::Xcart do
5
+ describe "#output" do
6
+ context "xcart", :vcr => { :cassette_name => 'exprodirect_com' } do
7
+ let(:xcart) { described_class.new(page_body("http://www.exprodirect.com/")) }
8
+
9
+ it { xcart.output[:found].should eq true }
10
+ end
11
+
12
+ context "not xcart" do
13
+ let(:blank) { described_class.new(empty_html_doc) }
14
+
15
+ it { blank.output[:found].should eq false }
16
+ end
17
+ end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/zencart')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/zencart'
3
3
 
4
4
  describe Sniffles::Sniffers::Zencart do
5
- describe "#output" do
6
- context "zencart", :vcr => { :cassette_name => "orangecrushbeads_com" } do
7
- let(:zencart) { described_class.new(page_body("http://orangecrushbeads.com/")) }
8
-
5
+ describe "#output" do
6
+ context "zencart", :vcr => { :cassette_name => "ocbfashionjewelry_com" } do
7
+ let(:zencart) { described_class.new(page_body("http://ocbfashionjewelry.com/")) }
8
+
9
9
  it { zencart.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not zencart" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,18 +1,18 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/javascript/jquery')
1
+ require "spec_helper"
2
+ require 'sniffles/sniffers/javascript/jquery'
3
3
 
4
4
  describe Sniffles::Sniffers::Jquery do
5
- describe "#output" do
6
- context "jquery", :vcr => { :cassette_name => "squidoo_com" } do
7
- let(:jquery) { described_class.new(page_body("http://www.squidoo.com")) }
8
-
5
+ describe "#output" do
6
+ context "jquery", :vcr => { :cassette_name => "blog_mixpanel_com" } do
7
+ let(:jquery) { described_class.new(page_body("http://blog.mixpanel.com/")) }
8
+
9
9
  it { jquery.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no jquery" do
13
13
  let(:blank) { described_class.new(empty_html_doc) }
14
-
14
+
15
15
  it { blank.output[:found].should eq false }
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe Sniffles::Sniffers do
4
4
  describe "#use" do
@@ -1,47 +1,47 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe Sniffles do
4
- describe "#sniff", :vcr => { :cassette_name => "squidoo_com" } do
5
- let(:squidoo) { page_body("http://www.squidoo.com") }
6
-
4
+ describe "#sniff", :vcr => { :cassette_name => "blog_mixpanel_com" } do
5
+ let(:blog) { page_body("http://blog.mixpanel.com/") }
6
+
7
7
  context "one sniffer" do
8
- it { subject.sniff(squidoo, :mixpanel).should eq :mixpanel => { :found => true } }
8
+ it { subject.sniff(blog, :mixpanel).should eq :mixpanel => { :found => true } }
9
9
  end
10
-
10
+
11
11
  context "using multiple sniffers" do
12
- it { subject.sniff(squidoo, :jquery, :mixpanel).should include(:jquery, :mixpanel) }
12
+ it { subject.sniff(blog, :jquery, :mixpanel).should include(:jquery, :mixpanel) }
13
13
  end
14
-
14
+
15
15
  context "using groups" do
16
- it { subject.sniff(squidoo, :analytics).should include(:mixpanel, :google_analytics) }
16
+ it { subject.sniff(blog, :analytics).should include(:mixpanel, :google_analytics) }
17
17
  end
18
-
18
+
19
19
  context "w/o supplying groups or sniffers" do
20
- it { subject.sniff(squidoo).count.should eq SNIFFER_COUNT }
20
+ it { subject.sniff(blog).count.should eq SNIFFER_COUNT }
21
21
  end
22
-
22
+
23
23
  context "using a non-existent sniffer" do
24
24
  it "should raise an error" do
25
- expect { subject.sniff(squidoo, :fake_ass_sniffer) }.to raise_error(Sniffles::UnknownSniffer, "fake_ass_sniffer not found!")
25
+ expect { subject.sniff(blog, :fake_ass_sniffer) }.to raise_error(Sniffles::UnknownSniffer, "fake_ass_sniffer not found!")
26
26
  end
27
27
  end
28
28
  end
29
-
29
+
30
30
  describe "#group?" do
31
31
  context "group exists" do
32
32
  it { subject.group?(:cms).should be true }
33
33
  end
34
-
34
+
35
35
  context "group doesn't exist" do
36
36
  it { subject.group?(:wordpress).should be false }
37
37
  end
38
38
  end
39
-
39
+
40
40
  describe "#sniffer?" do
41
41
  context "sniffer exists" do
42
42
  it { subject.sniffer?(:wordpress).should be true }
43
43
  end
44
-
44
+
45
45
  context "sniffer doesn't exist" do
46
46
  it { subject.sniffer?(:cms).should be false }
47
47
  end
@@ -1,7 +1,12 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../lib/sniffles')
2
- require File.expand_path(File.dirname(__FILE__) + '/../spec/support/helpers')
1
+ require 'bundler/setup'
2
+ Bundler.setup(:default, :test)
3
+
4
+ require 'sniffles'
3
5
  require 'vcr'
4
6
 
7
+ require 'support/helpers'
8
+ require 'rspec/autorun'
9
+
5
10
  VCR.configure do |c|
6
11
  c.cassette_library_dir = 'spec/cassettes'
7
12
  c.hook_into :typhoeus
@@ -12,5 +17,4 @@ RSpec.configure do |config|
12
17
  config.treat_symbols_as_metadata_keys_with_true_values = true
13
18
  config.run_all_when_everything_filtered = true
14
19
  config.filter_run :focus
15
- config.extend VCR::RSpec::Macros
16
20
  end
@@ -4,9 +4,9 @@ SNIFFER_COUNT = Dir.glob(File.dirname(__FILE__) + "/../../lib/sniffles/sniffers/
4
4
  SNIFFER_GROUP_COUNT = Dir.glob(File.dirname(__FILE__) + "/../../lib/sniffles/sniffers/**").count
5
5
 
6
6
  def page_body(url)
7
- Typhoeus::Request.get(url).body
7
+ Typhoeus::Request.get(url, headers: { 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.68 Safari/537.36'}).body
8
8
  end
9
9
 
10
10
  def empty_html_doc
11
11
  "<html><head></head><body></body></html>"
12
- end
12
+ end
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sniffles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Templin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.5.0
19
+ version: 1.6.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.5.0
26
+ version: 1.6.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.9.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.9.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: typhoeus
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.3.3
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.3.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: vcr
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.0
61
+ version: 2.8.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.0.0
68
+ version: 2.8.0
69
69
  description: Sniffles helps you detect which popular CMS, analytics, and advertising
70
70
  platforms a website is running.
71
71
  email:
@@ -74,10 +74,10 @@ executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .gitignore
78
- - .rspec
79
- - .rvmrc
80
- - .travis.yml
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".rvmrc"
80
+ - ".travis.yml"
81
81
  - Gemfile
82
82
  - Guardfile
83
83
  - LICENSE
@@ -87,11 +87,9 @@ files:
87
87
  - lib/sniffles.rb
88
88
  - lib/sniffles/html.rb
89
89
  - lib/sniffles/sniffers.rb
90
- - lib/sniffles/sniffers/advertising/admeld.rb
91
90
  - lib/sniffles/sniffers/advertising/adsense.rb
92
91
  - lib/sniffles/sniffers/advertising/buysellads.rb
93
92
  - lib/sniffles/sniffers/advertising/casale.rb
94
- - lib/sniffles/sniffers/advertising/gumgum.rb
95
93
  - lib/sniffles/sniffers/advertising/kontera.rb
96
94
  - lib/sniffles/sniffers/advertising/thedeck.rb
97
95
  - lib/sniffles/sniffers/advertising/tribalfusion.rb
@@ -108,6 +106,7 @@ files:
108
106
  - lib/sniffles/sniffers/cms/cscart.rb
109
107
  - lib/sniffles/sniffers/cms/drupal.rb
110
108
  - lib/sniffles/sniffers/cms/flatpress.rb
109
+ - lib/sniffles/sniffers/cms/ghost.rb
111
110
  - lib/sniffles/sniffers/cms/invision.rb
112
111
  - lib/sniffles/sniffers/cms/joomla.rb
113
112
  - lib/sniffles/sniffers/cms/magento.rb
@@ -115,7 +114,6 @@ files:
115
114
  - lib/sniffles/sniffers/cms/mybb.rb
116
115
  - lib/sniffles/sniffers/cms/oscommerce.rb
117
116
  - lib/sniffles/sniffers/cms/phpbb.rb
118
- - lib/sniffles/sniffers/cms/posterous.rb
119
117
  - lib/sniffles/sniffers/cms/prestashop.rb
120
118
  - lib/sniffles/sniffers/cms/shopify.rb
121
119
  - lib/sniffles/sniffers/cms/sitefinity.rb
@@ -124,6 +122,7 @@ files:
124
122
  - lib/sniffles/sniffers/cms/vanilla.rb
125
123
  - lib/sniffles/sniffers/cms/vbulletin.rb
126
124
  - lib/sniffles/sniffers/cms/wordpress.rb
125
+ - lib/sniffles/sniffers/cms/xcart.rb
127
126
  - lib/sniffles/sniffers/cms/xenforo.rb
128
127
  - lib/sniffles/sniffers/cms/zencart.rb
129
128
  - lib/sniffles/sniffers/javascript/jquery.rb
@@ -132,49 +131,48 @@ files:
132
131
  - sniffles.gemspec
133
132
  - spec/cassettes/beenverified_com.yml
134
133
  - spec/cassettes/blackhatworld_com.yml
135
- - spec/cassettes/blog_posterous_com.yml
134
+ - spec/cassettes/blog_mixpanel_com.yml
136
135
  - spec/cassettes/community_invisionpower_com.yml
136
+ - spec/cassettes/cxxvi_com.yml
137
137
  - spec/cassettes/demo-store_prestashop_com.yml
138
138
  - spec/cassettes/demo_cs-cart_com.yml
139
- - spec/cassettes/demo_forum-software_org_mybb.yml
140
139
  - spec/cassettes/demo_oscommerce_com.yml
140
+ - spec/cassettes/digital-photography-school_com.yml
141
141
  - spec/cassettes/downlopedia_com.yml
142
142
  - spec/cassettes/drupal.yml
143
+ - spec/cassettes/exprodirect_com.yml
143
144
  - spec/cassettes/facebook_insights.yml
144
145
  - spec/cassettes/flatpress_org_home_blog.yml
145
- - spec/cassettes/forum-software_org_vanilla.yml
146
146
  - spec/cassettes/foursquare_com.yml
147
+ - spec/cassettes/geomagik_com.yml
148
+ - spec/cassettes/ghost_org.yml
147
149
  - spec/cassettes/google_blogspot_com.yml
148
150
  - spec/cassettes/guistyles_com.yml
149
- - spec/cassettes/humemes_com.yml
151
+ - spec/cassettes/installatron_com.yml
150
152
  - spec/cassettes/invisionmodding_com.yml
151
- - spec/cassettes/joomla_org.yml
153
+ - spec/cassettes/joomla.yml
154
+ - spec/cassettes/kissmetrics_com.yml
155
+ - spec/cassettes/lancelhoff_com.yml
152
156
  - spec/cassettes/magento.yml
153
157
  - spec/cassettes/metafilter_com.yml
154
158
  - spec/cassettes/movabletype_com_blog.yml
155
- - spec/cassettes/orangecrushbeads_com.yml
159
+ - spec/cassettes/ocbfashionjewelry_com.yml
156
160
  - spec/cassettes/pandoramoa_com.yml
157
161
  - spec/cassettes/pearsonified_com.yml
158
162
  - spec/cassettes/phpbb_com.yml
159
- - spec/cassettes/shop_angrybirds_com.yml
160
163
  - spec/cassettes/sitefinity_com.yml
161
164
  - spec/cassettes/sixflags_com.yml
162
- - spec/cassettes/softpedia_com.yml
163
165
  - spec/cassettes/soulemama_typepad_com.yml
164
- - spec/cassettes/squidoo_com.yml
166
+ - spec/cassettes/stackoverflow_com.yml
165
167
  - spec/cassettes/staff_tumblr_com.yml
166
- - spec/cassettes/tmz_com.yml
167
168
  - spec/cassettes/topix_com.yml
168
- - spec/cassettes/vbulletin_com.yml
169
+ - spec/cassettes/wellmedicated_com.yml
169
170
  - spec/cassettes/wordpress_com.yml
170
- - spec/cassettes/wundergroud_com.yml
171
171
  - spec/cassettes/xenforo_com.yml
172
172
  - spec/sniffles/html_spec.rb
173
- - spec/sniffles/sniffers/advertising/admeld_spec.rb
174
173
  - spec/sniffles/sniffers/advertising/adsense_spec.rb
175
174
  - spec/sniffles/sniffers/advertising/buysellads_spec.rb
176
175
  - spec/sniffles/sniffers/advertising/casale_spec.rb
177
- - spec/sniffles/sniffers/advertising/gumgum_spec.rb
178
176
  - spec/sniffles/sniffers/advertising/kontera_spec.rb
179
177
  - spec/sniffles/sniffers/advertising/thedeck_spec.rb
180
178
  - spec/sniffles/sniffers/advertising/tribalfusion_spec.rb
@@ -191,6 +189,7 @@ files:
191
189
  - spec/sniffles/sniffers/cms/cscart_spec.rb
192
190
  - spec/sniffles/sniffers/cms/drupal_spec.rb
193
191
  - spec/sniffles/sniffers/cms/flatpress_spec.rb
192
+ - spec/sniffles/sniffers/cms/ghost_spec.rb
194
193
  - spec/sniffles/sniffers/cms/invision_spec.rb
195
194
  - spec/sniffles/sniffers/cms/joomla_spec.rb
196
195
  - spec/sniffles/sniffers/cms/magento_spec.rb
@@ -198,7 +197,6 @@ files:
198
197
  - spec/sniffles/sniffers/cms/mybb_spec.rb
199
198
  - spec/sniffles/sniffers/cms/oscommerce_spec.rb
200
199
  - spec/sniffles/sniffers/cms/phpbb_spec.rb
201
- - spec/sniffles/sniffers/cms/posterous_spec.rb
202
200
  - spec/sniffles/sniffers/cms/prestashop_spec.rb
203
201
  - spec/sniffles/sniffers/cms/shopify_spec.rb
204
202
  - spec/sniffles/sniffers/cms/sitefinity_spec.rb
@@ -207,6 +205,7 @@ files:
207
205
  - spec/sniffles/sniffers/cms/vanilla_spec.rb
208
206
  - spec/sniffles/sniffers/cms/vbulletin_spec.rb
209
207
  - spec/sniffles/sniffers/cms/wordpress_spec.rb
208
+ - spec/sniffles/sniffers/cms/xcart_spec.rb
210
209
  - spec/sniffles/sniffers/cms/xenforo_spec.rb
211
210
  - spec/sniffles/sniffers/cms/zencart_spec.rb
212
211
  - spec/sniffles/sniffers/javascript/jquery_spec.rb
@@ -224,18 +223,19 @@ require_paths:
224
223
  - lib
225
224
  required_ruby_version: !ruby/object:Gem::Requirement
226
225
  requirements:
227
- - - '>='
226
+ - - ">="
228
227
  - !ruby/object:Gem::Version
229
228
  version: '0'
230
229
  required_rubygems_version: !ruby/object:Gem::Requirement
231
230
  requirements:
232
- - - '>='
231
+ - - ">="
233
232
  - !ruby/object:Gem::Version
234
233
  version: '0'
235
234
  requirements: []
236
235
  rubyforge_project:
237
- rubygems_version: 2.0.2
236
+ rubygems_version: 2.2.0
238
237
  signing_key:
239
238
  specification_version: 4
240
239
  summary: Detect the platforms and libraries a website is running.
241
240
  test_files: []
241
+ has_rdoc: