sniffles 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/Gemfile +2 -8
- data/Guardfile +1 -1
- data/README.md +12 -13
- data/lib/sniffles.rb +9 -9
- data/lib/sniffles/html.rb +3 -3
- data/lib/sniffles/sniffers/advertising/adsense.rb +8 -14
- data/lib/sniffles/sniffers/advertising/kontera.rb +6 -6
- data/lib/sniffles/sniffers/analytics/chartbeat.rb +7 -7
- data/lib/sniffles/sniffers/analytics/facebook_insights.rb +7 -7
- data/lib/sniffles/sniffers/analytics/google_analytics.rb +8 -8
- data/lib/sniffles/sniffers/analytics/kissmetrics.rb +7 -7
- data/lib/sniffles/sniffers/analytics/mixpanel.rb +7 -7
- data/lib/sniffles/sniffers/analytics/quantcast.rb +6 -6
- data/lib/sniffles/sniffers/cms/cscart.rb +6 -6
- data/lib/sniffles/sniffers/{advertising/gumgum.rb → cms/ghost.rb} +8 -8
- data/lib/sniffles/sniffers/cms/invision.rb +9 -9
- data/lib/sniffles/sniffers/cms/joomla.rb +7 -7
- data/lib/sniffles/sniffers/cms/movabletype.rb +8 -8
- data/lib/sniffles/sniffers/cms/mybb.rb +6 -6
- data/lib/sniffles/sniffers/cms/phpbb.rb +7 -7
- data/lib/sniffles/sniffers/cms/shopify.rb +7 -7
- data/lib/sniffles/sniffers/cms/tumblr.rb +7 -7
- data/lib/sniffles/sniffers/cms/vanilla.rb +8 -8
- data/lib/sniffles/sniffers/cms/vbulletin.rb +10 -10
- data/lib/sniffles/sniffers/cms/wordpress.rb +12 -12
- data/lib/sniffles/sniffers/{advertising/admeld.rb → cms/xcart.rb} +3 -2
- data/lib/sniffles/sniffers/cms/zencart.rb +6 -6
- data/lib/sniffles/sniffers/javascript/jquery.rb +6 -6
- data/lib/sniffles/text.rb +4 -4
- data/lib/sniffles/version.rb +1 -1
- data/sniffles.gemspec +2 -2
- data/spec/cassettes/beenverified_com.yml +644 -784
- data/spec/cassettes/blackhatworld_com.yml +2298 -3292
- data/spec/cassettes/blog_mixpanel_com.yml +1351 -0
- data/spec/cassettes/community_invisionpower_com.yml +836 -2771
- data/spec/cassettes/cxxvi_com.yml +311 -0
- data/spec/cassettes/demo-store_prestashop_com.yml +897 -813
- data/spec/cassettes/demo_cs-cart_com.yml +2996 -1146
- data/spec/cassettes/demo_oscommerce_com.yml +136 -408
- data/spec/cassettes/digital-photography-school_com.yml +656 -0
- data/spec/cassettes/downlopedia_com.yml +1262 -1321
- data/spec/cassettes/drupal.yml +1540 -1507
- data/spec/cassettes/exprodirect_com.yml +1888 -0
- data/spec/cassettes/facebook_insights.yml +544 -474
- data/spec/cassettes/flatpress_org_home_blog.yml +287 -317
- data/spec/cassettes/foursquare_com.yml +1901 -348
- data/spec/cassettes/geomagik_com.yml +475 -0
- data/spec/cassettes/ghost_org.yml +207 -0
- data/spec/cassettes/google_blogspot_com.yml +574 -1059
- data/spec/cassettes/guistyles_com.yml +705 -1292
- data/spec/cassettes/installatron_com.yml +286 -0
- data/spec/cassettes/invisionmodding_com.yml +1124 -2442
- data/spec/cassettes/joomla.yml +280 -0
- data/spec/cassettes/kissmetrics_com.yml +165 -0
- data/spec/cassettes/lancelhoff_com.yml +637 -0
- data/spec/cassettes/magento.yml +459 -459
- data/spec/cassettes/metafilter_com.yml +1449 -1230
- data/spec/cassettes/movabletype_com_blog.yml +175 -1221
- data/spec/cassettes/ocbfashionjewelry_com.yml +588 -0
- data/spec/cassettes/pandoramoa_com.yml +290 -608
- data/spec/cassettes/pearsonified_com.yml +433 -435
- data/spec/cassettes/phpbb_com.yml +438 -416
- data/spec/cassettes/sitefinity_com.yml +443 -418
- data/spec/cassettes/sixflags_com.yml +560 -1014
- data/spec/cassettes/soulemama_typepad_com.yml +2378 -2581
- data/spec/cassettes/stackoverflow_com.yml +4762 -0
- data/spec/cassettes/staff_tumblr_com.yml +1956 -1658
- data/spec/cassettes/topix_com.yml +1748 -1417
- data/spec/cassettes/wellmedicated_com.yml +801 -0
- data/spec/cassettes/wordpress_com.yml +238 -863
- data/spec/cassettes/xenforo_com.yml +1143 -1933
- data/spec/sniffles/html_spec.rb +6 -6
- data/spec/sniffles/sniffers/advertising/adsense_spec.rb +7 -8
- data/spec/sniffles/sniffers/advertising/buysellads_spec.rb +5 -5
- data/spec/sniffles/sniffers/advertising/casale_spec.rb +5 -5
- data/spec/sniffles/sniffers/advertising/kontera_spec.rb +6 -6
- data/spec/sniffles/sniffers/advertising/thedeck_spec.rb +5 -5
- data/spec/sniffles/sniffers/advertising/tribalfusion_spec.rb +5 -5
- data/spec/sniffles/sniffers/analytics/chartbeat_spec.rb +3 -3
- data/spec/sniffles/sniffers/analytics/clicky_spec.rb +3 -3
- data/spec/sniffles/sniffers/analytics/facebook_insights_spec.rb +6 -6
- data/spec/sniffles/sniffers/analytics/google_analytics_spec.rb +7 -19
- data/spec/sniffles/sniffers/analytics/kissmetrics_spec.rb +5 -5
- data/spec/sniffles/sniffers/analytics/mixpanel_spec.rb +9 -9
- data/spec/sniffles/sniffers/analytics/quantcast_spec.rb +7 -7
- data/spec/sniffles/sniffers/cms/cscart_spec.rb +8 -8
- data/spec/sniffles/sniffers/cms/ghost_spec.rb +18 -0
- data/spec/sniffles/sniffers/cms/invision_spec.rb +9 -9
- data/spec/sniffles/sniffers/cms/joomla_spec.rb +9 -9
- data/spec/sniffles/sniffers/cms/movabletype_spec.rb +8 -8
- data/spec/sniffles/sniffers/cms/mybb_spec.rb +9 -9
- data/spec/sniffles/sniffers/cms/phpbb_spec.rb +8 -8
- data/spec/sniffles/sniffers/cms/shopify_spec.rb +9 -9
- data/spec/sniffles/sniffers/cms/tumblr_spec.rb +7 -7
- data/spec/sniffles/sniffers/cms/vanilla_spec.rb +9 -9
- data/spec/sniffles/sniffers/cms/vbulletin_spec.rb +11 -17
- data/spec/sniffles/sniffers/cms/wordpress_spec.rb +12 -12
- data/spec/sniffles/sniffers/cms/xcart_spec.rb +18 -0
- data/spec/sniffles/sniffers/cms/zencart_spec.rb +9 -9
- data/spec/sniffles/sniffers/javascript/jquery_spec.rb +8 -8
- data/spec/sniffles/sniffers_spec.rb +1 -1
- data/spec/sniffles_spec.rb +17 -17
- data/spec/spec_helper.rb +7 -3
- data/spec/support/helpers.rb +2 -2
- metadata +39 -39
- data/lib/sniffles/sniffers/cms/posterous.rb +0 -28
- data/spec/cassettes/blog_posterous_com.yml +0 -5015
- data/spec/cassettes/demo_forum-software_org_mybb.yml +0 -385
- data/spec/cassettes/forum-software_org_vanilla.yml +0 -223
- data/spec/cassettes/humemes_com.yml +0 -496
- data/spec/cassettes/joomla_org.yml +0 -733
- data/spec/cassettes/orangecrushbeads_com.yml +0 -751
- data/spec/cassettes/shop_angrybirds_com.yml +0 -455
- data/spec/cassettes/softpedia_com.yml +0 -3196
- data/spec/cassettes/squidoo_com.yml +0 -532
- data/spec/cassettes/tmz_com.yml +0 -2927
- data/spec/cassettes/vbulletin_com.yml +0 -2983
- data/spec/cassettes/wundergroud_com.yml +0 -907
- data/spec/sniffles/sniffers/advertising/admeld_spec.rb +0 -17
- data/spec/sniffles/sniffers/advertising/gumgum_spec.rb +0 -18
- data/spec/sniffles/sniffers/cms/posterous_spec.rb +0 -18
data/spec/sniffles/html_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
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
|
2
|
-
require
|
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 => "
|
7
|
-
let(:adsense) { described_class.new(page_body("http://
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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 => "
|
5
|
+
describe "#output", :vcr => { :cassette_name => "lancelhoff_com" } do
|
6
6
|
context "kontera" do
|
7
|
-
let(:kontera) { described_class.new(page_body("http://www.
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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
|
2
|
-
require
|
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
|
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
|
2
|
-
require
|
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
|
-
|
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
|
2
|
-
require
|
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 => "
|
6
|
-
let(:kissmetrics) { described_class.new(page_body("https://
|
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
|
2
|
-
require
|
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 => "
|
7
|
-
let(:mixpanel) { described_class.new(page_body("http://
|
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
|
2
|
-
require
|
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 => '
|
7
|
-
let(:quantcast) { described_class.new(page_body("http://
|
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
|
2
|
-
require
|
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/
|
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
|
2
|
-
require
|
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.
|
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
|
2
|
-
require
|
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 => "
|
7
|
-
let(:joomla) { described_class.new(page_body("http://
|
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
|