Skip to content
This repository
  • 3 commits
  • 5 files changed
  • 0 comments
  • 1 contributor
2  lib/site_validator/sitemap.rb
@@ -78,7 +78,7 @@ def looks_like_html?(url)
78 78 scheme = u.scheme if u.scheme
79 79 extension = u.path.split(".").last if u.path
80 80
81   - (scheme =~ /http[s]?/i) && (extension !~ /gif|jpg|jpeg|png|tiff|bmp|txt|pdf|doc|rtf|xml|xls|csv|wav|mp3|ogg|zip|rar|tar|gz/i)
  81 + (scheme =~ /http[s]?/i) && (extension !~ /gif|jpg|jpeg|png|tiff|bmp|txt|pdf|mobi|epub|doc|rtf|xml|xls|csv|wav|mp3|ogg|zip|rar|tar|gz/i)
82 82 end
83 83
84 84 def xml_locations
2  lib/site_validator/version.rb
... ... @@ -1,5 +1,5 @@
1 1 # -*- encoding: utf-8 -*-
2 2
3 3 module SiteValidator
4   - VERSION = "1.0.3"
  4 + VERSION = "1.0.4"
5 5 end
2  site_validator.gemspec
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17 17
18 18 gem.add_dependency 'w3c_validators', '~> 1.2'
19 19 gem.add_dependency 'nokogiri', '~> 1.5.3'
20   - gem.add_dependency 'metainspector', '~> 1.10.1'
  20 + gem.add_dependency 'metainspector', '~> 1.10.2'
21 21
22 22 gem.add_development_dependency 'rspec', '~> 2.5.0'
23 23 gem.add_development_dependency 'mocha', '~> 0.11.4'
2  spec/samples/exclusions.html
@@ -28,6 +28,8 @@
28 28
29 29 <a href="/file.pdf">link</a><br />
30 30 <a href="/file.txt">link</a><br />
  31 + <a href="/file.mobi">link</a><br />
  32 + <a href="/file.epub">link</a><br />
31 33 <a href="/file.doc">link</a><br />
32 34 <a href="/file.xls">link</a><br />
33 35 <a href="/file.rtf">link</a><br />
6 spec/samples/exclusions.xml
@@ -43,6 +43,12 @@ Content-Type: text/xml
43 43 <loc>http://example.com/file.txt</loc>
44 44 </url>
45 45 <url>
  46 + <loc>http://example.com/file.mobi</loc>
  47 + </url>
  48 + <url>
  49 + <loc>http://example.com/file.epub</loc>
  50 + </url>
  51 + <url>
46 52 <loc>http://example.com/file.doc</loc>
47 53 </url>
48 54 <url>

No commit comments for this range

Something went wrong with that request. Please try again.