site_validator 1.0.1 → 1.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.
@@ -55,10 +55,10 @@ module SiteValidator
55
55
  def pages_in_sitemap
56
56
  pages = xml_locations.select {|loc| looks_like_html?(loc.text)}.map {|loc| SiteValidator::Page.new(loc.text)}
57
57
  if pages.empty?
58
- m = MetaInspector.new(url, timeout)
58
+ m = MetaInspector.new(url, :timeout => timeout)
59
59
  links = [m.url]
60
60
 
61
- m.links.select {|l| l.start_with?(m.root_url) && looks_like_html?(l)}.map {|l| l.split('#')[0]}.uniq.each do |link|
61
+ m.internal_links.select {|l| looks_like_html?(l)}.map {|l| l.split('#')[0]}.uniq.each do |link|
62
62
  if link[-1,1] == "/"
63
63
  links << link unless (links.include?(link) || links.include?(link.chop))
64
64
  else
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module SiteValidator
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -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.9.10'
20
+ gem.add_dependency 'metainspector', '~> 1.10.1'
21
21
 
22
22
  gem.add_development_dependency 'rspec', '~> 2.5.0'
23
23
  gem.add_development_dependency 'mocha', '~> 0.11.4'
@@ -115,8 +115,8 @@ describe SiteValidator::Sitemap do
115
115
  it "should not crash when URLs have international characters" do
116
116
  @sitemap_international.pages.length.should == 9
117
117
  @sitemap_international.pages[0].url.should == 'http://example.com/international'
118
- @sitemap_international.pages[1].url.should == 'http://example.com/romanée'
119
- @sitemap_international.pages[2].url.should == 'http://example.com/españa'
118
+ @sitemap_international.pages[1].url.should == 'http://example.com/roman%C3%A9e'
119
+ @sitemap_international.pages[2].url.should == 'http://example.com/espa%C3%B1a'
120
120
  @sitemap_international.pages[3].url.should == 'http://example.com/roman%C3%A9e-2'
121
121
  @sitemap_international.pages[4].url.should == 'http://example.com/espa%C3%B1a-2'
122
122
  @sitemap_international.pages[5].url.should == 'http://example.com/search?q=espa%C3%B1a'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site_validator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Iniesta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-13 00:00:00 Z
18
+ date: 2012-11-16 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: w3c_validators
@@ -54,14 +54,14 @@ dependencies:
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
- - - "="
57
+ - - ~>
58
58
  - !ruby/object:Gem::Version
59
- hash: 39
59
+ hash: 61
60
60
  segments:
61
61
  - 1
62
- - 9
63
62
  - 10
64
- version: 1.9.10
63
+ - 1
64
+ version: 1.10.1
65
65
  type: :runtime
66
66
  version_requirements: *id003
67
67
  - !ruby/object:Gem::Dependency