sniffles 0.1.5 → 0.2.0

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.
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,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe "Sniffles::HTML" do
4
4
  before(:all) do
@@ -6,28 +6,28 @@ describe "Sniffles::HTML" do
6
6
  include Sniffles::HTML
7
7
  attr_accessor :doc
8
8
  end
9
-
9
+
10
10
  @klass = Klass.new
11
11
  @klass.parse "<html><head><title>Title!</title></head><body><h1>Body!</h1></body></html>"
12
12
  end
13
-
13
+
14
14
  describe "#parse" do
15
15
  it "should take HTML and return a parsed Nokogiri document" do
16
16
  @klass.doc.should be_kind_of(Nokogiri::HTML::Document)
17
17
  end
18
18
  end
19
-
19
+
20
20
  describe "#text_match?" do
21
21
  context "does match" do
22
22
  it "should be true" do
23
23
  @klass.text_match?("//title", "Title!").should be true
24
24
  end
25
25
  end
26
-
26
+
27
27
  context "does not match" do
28
28
  it "should be false" do
29
29
  @klass.text_match?("//title", "Body!").should be false
30
30
  end
31
31
  end
32
32
  end
33
- end
33
+ end
@@ -1,18 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/adsense')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/adsense'
3
3
 
4
4
  describe Sniffles::Sniffers::Adsense do
5
- describe "#output" do
6
- context "found", :vcr => { :cassette_name => "squidoo_com" } do
7
- let(:adsense) { described_class.new(page_body("http://www.squidoo.com")) }
8
-
5
+ describe "#output" do
6
+ context "found", :vcr => { :cassette_name => "digital-photography-school_com" } do
7
+ let(:adsense) { described_class.new(page_body("http://digital-photography-school.com/digital-photography-tips-for-beginners")) }
8
+
9
9
  it { adsense.output[:found].should eq true }
10
- it { adsense.output[:publisher_id].should eq "ca-pub-9879162776784828" }
11
10
  end
12
11
 
13
12
  context "not found" do
14
13
  let(:blank) { described_class.new(empty_html_doc) }
15
-
14
+
16
15
  it { blank.output[:found].should eq false }
17
16
  end
18
17
  end
@@ -1,17 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/buysellads')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/buysellads'
3
3
 
4
4
  describe Sniffles::Sniffers::Buysellads do
5
- describe "#output", :vcr => { :cassette_name => "guistyles_com" } do
5
+ describe "#output", :vcr => { :cassette_name => "guistyles_com" } do
6
6
  context "buysellads" do
7
7
  let(:buysellads) { described_class.new(page_body("http://guistyles.com/")) }
8
-
8
+
9
9
  it { buysellads.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no buysellads" 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
@@ -1,17 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/casale')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/casale'
3
3
 
4
4
  describe Sniffles::Sniffers::Casale do
5
- describe "#output", :vcr => { :cassette_name => "topix_com" } do
5
+ describe "#output", :vcr => { :cassette_name => "topix_com" } do
6
6
  context "casale" do
7
7
  let(:casale) { described_class.new(page_body("http://www.topix.com/")) }
8
-
8
+
9
9
  it { casale.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no casale" 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
@@ -1,17 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/kontera')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/kontera'
3
3
 
4
4
  describe Sniffles::Sniffers::Kontera do
5
- describe "#output", :vcr => { :cassette_name => "softpedia_com" } do
5
+ describe "#output", :vcr => { :cassette_name => "lancelhoff_com" } do
6
6
  context "kontera" do
7
- let(:kontera) { described_class.new(page_body("http://www.softpedia.com/")) }
8
-
7
+ let(:kontera) { described_class.new(page_body("http://www.lancelhoff.com/")) }
8
+
9
9
  it { kontera.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no kontera" 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
@@ -1,17 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/thedeck')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/thedeck'
3
3
 
4
4
  describe Sniffles::Sniffers::Thedeck do
5
- describe "#output", :vcr => { :cassette_name => "metafilter_com" } do
5
+ describe "#output", :vcr => { :cassette_name => "metafilter_com" } do
6
6
  context "thedeck" do
7
7
  let(:thedeck) { described_class.new(page_body("http://www.metafilter.com/")) }
8
-
8
+
9
9
  it { thedeck.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no thedeck" 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
@@ -1,17 +1,17 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/advertising/tribalfusion')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/advertising/tribalfusion'
3
3
 
4
4
  describe Sniffles::Sniffers::Tribalfusion do
5
- describe "#output", :vcr => { :cassette_name => "sixflags_com" } do
5
+ describe "#output", :vcr => { :cassette_name => "sixflags_com" } do
6
6
  context "tribalfusion" do
7
7
  let(:tribalfusion) { described_class.new(page_body("http://www.sixflags.com/national/index.aspx")) }
8
-
8
+
9
9
  it { tribalfusion.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no tribalfusion" 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
@@ -1,11 +1,11 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/chartbeat')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/chartbeat'
3
3
 
4
4
  describe Sniffles::Sniffers::Chartbeat do
5
5
  describe "#output", :vcr => { :cassette_name => "foursquare_com" } do
6
6
  let(:chartbeat) { described_class.new(page_body("https://foursquare.com")) }
7
7
  let(:blank) { described_class.new(empty_html_doc) }
8
-
8
+
9
9
  context "chartbeat" do
10
10
  it { chartbeat.output[:found].should eq true }
11
11
  end
@@ -1,11 +1,11 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/clicky')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/clicky'
3
3
 
4
4
  describe Sniffles::Sniffers::Clicky do
5
5
  describe "#output", :vcr => { :cassette_name => "beenverified_com" } do
6
6
  let(:clicky) { described_class.new(page_body("http://www.beenverified.com/")) }
7
7
  let(:blank) { described_class.new(empty_html_doc) }
8
-
8
+
9
9
  context "clicky" do
10
10
  it { clicky.output[:found].should eq true }
11
11
  end
@@ -1,21 +1,21 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/facebook_insights')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/facebook_insights'
3
3
 
4
4
  describe Sniffles::Sniffers::FacebookInsights do
5
5
  describe "#output" do
6
6
  context "facebook_insights", :vcr => { :cassette_name => 'facebook_insights' } do
7
7
  let(:facebook_insights) { described_class.new(page_body("http://simplymeasured.com")) }
8
-
8
+
9
9
  it { facebook_insights.output[:found].should eq true }
10
- it { facebook_insights.output[:admin_ids].should eq '661401101, 100000956903317, 827925001, 7001517' }
10
+ it { facebook_insights.output[:admin_ids].should eq '661401101' }
11
11
  it { facebook_insights.output[:app_id].should eq '208102605913336' }
12
12
  it { facebook_insights.output[:page_id].should eq '155315114482294' }
13
13
  end
14
14
 
15
15
  context "no quantcast" do
16
16
  let(:blank) { described_class.new(empty_html_doc) }
17
-
17
+
18
18
  it { blank.output[:found].should eq false }
19
19
  end
20
20
  end
21
- end
21
+ end
@@ -1,32 +1,20 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/google_analytics')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/google_analytics'
3
3
 
4
4
  describe Sniffles::Sniffers::GoogleAnalytics do
5
5
  describe "#output" do
6
- context "inline js", :vcr => { :cassette_name => "pearsonified_com" } do
6
+ opts = { cassette_name: "pearsonified_com" }
7
+
8
+ describe "inline js", vcr: opts do
7
9
  let(:ga) { described_class.new(page_body("http://www.pearsonified.com/")) }
8
-
10
+
9
11
  it { ga.output[:found].should eq true }
10
12
  it { ga.output[:ua].should eq "UA-2916092-1" }
11
13
  end
12
-
13
- context "inline w/ urchin", :vcr => { :cassette_name => "humemes_com" } do
14
- let(:ga) { described_class.new(page_body("http://humemes.com/")) }
15
-
16
- it { ga.output[:found].should eq true }
17
- it { ga.output[:ua].should eq "UA-386965-7" }
18
- end
19
-
20
- context "inline w/ gaJsHost syntax", :vcr => { :cassette_name => "blackhatworld_com" } do
21
- let(:ga) { described_class.new(page_body("http://www.blackhatworld.com/index.php")) }
22
-
23
- it { ga.output[:found].should eq true }
24
- it { ga.output[:ua].should eq "UA-24324223-1" }
25
- end
26
14
 
27
15
  context "no google analytics" do
28
16
  let(:blank) { described_class.new(empty_html_doc) }
29
17
  it { blank.output[:found].should eq false }
30
18
  end
31
19
  end
32
- end
20
+ end
@@ -1,11 +1,11 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/kissmetrics')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/kissmetrics'
3
3
 
4
4
  describe Sniffles::Sniffers::Kissmetrics do
5
- describe "#output", :vcr => { :cassette_name => "foursquare_com" } do
6
- let(:kissmetrics) { described_class.new(page_body("https://foursquare.com")) }
5
+ describe "#output", :vcr => { :cassette_name => "kissmetrics_com" } do
6
+ let(:kissmetrics) { described_class.new(page_body("https://www.kissmetrics.com/")) }
7
7
  let(:blank) { described_class.new(empty_html_doc) }
8
-
8
+
9
9
  context "kissmetrics" do
10
10
  it { kissmetrics.output[:found].should eq true }
11
11
  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/analytics/mixpanel')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/mixpanel'
3
3
 
4
4
  describe Sniffles::Sniffers::Mixpanel do
5
- describe "#output" do
6
- context "using mixpanel", :vcr => { :cassette_name => "squidoo_com" } do
7
- let(:mixpanel) { described_class.new(page_body("http://www.squidoo.com")) }
8
-
5
+ describe "#output" do
6
+ context "using mixpanel", :vcr => { :cassette_name => "blog_mixpanel_com" } do
7
+ let(:mixpanel) { described_class.new(page_body("http://blog.mixpanel.com/")) }
8
+
9
9
  it { mixpanel.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not using mixpanel" 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/analytics/quantcast')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/analytics/quantcast'
3
3
 
4
4
  describe Sniffles::Sniffers::Quantcast do
5
5
  describe "#output" do
6
- context "quantcast", :vcr => { :cassette_name => 'squidoo_com' } do
7
- let(:quantcast) { described_class.new(page_body("http://www.squidoo.com")) }
8
-
6
+ context "quantcast", :vcr => { :cassette_name => 'stackoverflow_com' } do
7
+ let(:quantcast) { described_class.new(page_body("http://stackoverflow.com/")) }
8
+
9
9
  it { quantcast.output[:found].should eq true }
10
10
  end
11
11
 
12
12
  context "no quantcast" 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/cscart')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/cscart'
3
3
 
4
4
  describe Sniffles::Sniffers::Cscart do
5
- describe "#output" do
5
+ describe "#output" do
6
6
  context "cscart", :vcr => { :cassette_name => "demo_cs-cart_com" } do
7
- let(:cscart) { described_class.new(page_body("http://demo.cs-cart.com/community/")) }
8
-
7
+ let(:cscart) { described_class.new(page_body("http://demo.cs-cart.com/")) }
8
+
9
9
  it { cscart.output[:found].should eq true }
10
10
  end
11
-
11
+
12
12
  context "not cscart" 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
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/ghost'
3
+
4
+ describe Sniffles::Sniffers::Ghost do
5
+ describe "#output" do
6
+ context "Ghost blog", :vcr => { :cassette_name => "ghost_org" } do
7
+ let(:ghost) { described_class.new(page_body("http://blog.ghost.org/")) }
8
+
9
+ it { ghost.output[:found].should eq true }
10
+ end
11
+
12
+ context "Not a Ghost Blog" 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,26 +1,26 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/invision')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/invision'
3
3
 
4
4
  describe Sniffles::Sniffers::Invision do
5
- describe "#output" do
5
+ describe "#output" do
6
6
  context "invision", :vcr => { :cassette_name => "community_invisionpower_com" } do
7
7
  subject { described_class.new(page_body("http://community.invisionpower.com/")).output }
8
-
8
+
9
9
  its([:found]) { should eq true }
10
- its([:version]) { should eq "3.3.0 Beta 3" }
10
+ its([:version]) { should eq "3.4.6" }
11
11
  end
12
-
12
+
13
13
  context "invision w/o version", :vcr => { :cassette_name => "invisionmodding_com" } do
14
14
  subject { described_class.new(page_body("http://invisionmodding.com/")).output }
15
15
 
16
16
  its([:found]) { should eq true }
17
17
  its([:version]) { should eq false }
18
18
  end
19
-
19
+
20
20
  context "not invision" do
21
21
  subject { described_class.new(empty_html_doc).output }
22
-
22
+
23
23
  its([:found]) { should eq false }
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -1,19 +1,19 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/cms/joomla')
1
+ require 'spec_helper'
2
+ require 'sniffles/sniffers/cms/joomla'
3
3
 
4
4
  describe Sniffles::Sniffers::Joomla do
5
- describe "#output" do
6
- context "joomla", :vcr => { :cassette_name => "joomla_org" } do
7
- let(:joomla) { described_class.new(page_body("http://www.joomla.org/")) }
8
-
5
+ describe "#output" do
6
+ context "joomla", :vcr => { :cassette_name => "joomla" } do
7
+ let(:joomla) { described_class.new(page_body("http://indevol.bellasartes.uclm.es/")) }
8
+
9
9
  it { joomla.output[:found].should eq true }
10
10
  it { joomla.output[:version].should eq "1.5" }
11
11
  end
12
-
12
+
13
13
  context "not joomla" do
14
14
  let(:blank) { described_class.new(empty_html_doc) }
15
-
15
+
16
16
  it { blank.output[:found].should eq false }
17
17
  end
18
18
  end
19
- end
19
+ end