validate-website 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -3
- data/lib/colorful_messages.rb +1 -0
- data/lib/validate_website.rb +2 -0
- data/lib/validator.rb +5 -1
- metadata +9 -9
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ require "rspec/core/rake_task" # RSpec 2.0
|
|
7
7
|
# Globals
|
8
8
|
|
9
9
|
PKG_NAME = 'validate-website'
|
10
|
-
PKG_VERSION = '0.5.
|
10
|
+
PKG_VERSION = '0.5.2'
|
11
11
|
|
12
12
|
PKG_FILES = ['README.rdoc', 'Rakefile', 'LICENSE']
|
13
13
|
Find.find('bin/', 'lib/', 'man/', 'spec/') do |f|
|
@@ -53,10 +53,10 @@ spec = Gem::Specification.new do |s|
|
|
53
53
|
s.summary = 'Web crawler for checking the validity of your documents'
|
54
54
|
s.name = PKG_NAME
|
55
55
|
s.version = PKG_VERSION
|
56
|
-
s.requirements << 'spk-anemone' << 'rainbow' << 'html5'
|
56
|
+
s.requirements << 'spk-anemone' << 'rainbow' << 'spk-html5'
|
57
57
|
s.add_dependency('spk-anemone', '>= 0.4.0')
|
58
58
|
s.add_dependency('rainbow', '>= 1.1')
|
59
|
-
s.add_dependency('html5', '= 0.10.
|
59
|
+
s.add_dependency('spk-html5', '= 0.10.1')
|
60
60
|
s.add_development_dependency('rspec', '>= 2.0.0')
|
61
61
|
s.add_development_dependency('fakeweb', '>= 1.3.0')
|
62
62
|
s.require_path = 'lib'
|
data/lib/colorful_messages.rb
CHANGED
data/lib/validate_website.rb
CHANGED
data/lib/validator.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
class Validator
|
2
4
|
XHTML_PATH = File.join(File.dirname(__FILE__), '..', 'lib', 'xhtml')
|
3
5
|
|
@@ -45,7 +47,9 @@ class Validator
|
|
45
47
|
require 'html5/filters/validator'
|
46
48
|
html5_parser = HTML5::HTMLParser.new(:tokenizer => HTMLConformanceChecker)
|
47
49
|
html5_parser.parse(@page.body)
|
48
|
-
@errors = html5_parser.errors.collect
|
50
|
+
@errors = html5_parser.errors.collect do |er|
|
51
|
+
"#{er[1]} line #{er[0][0]}"
|
52
|
+
end
|
49
53
|
else
|
50
54
|
@errors << 'Unknown Document'
|
51
55
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validate-website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Laurent Arnoud
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -50,19 +50,19 @@ dependencies:
|
|
50
50
|
type: :runtime
|
51
51
|
version_requirements: *id002
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
|
-
name: html5
|
53
|
+
name: spk-html5
|
54
54
|
prerelease: false
|
55
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
58
58
|
- - "="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
60
|
+
hash: 53
|
61
61
|
segments:
|
62
62
|
- 0
|
63
63
|
- 10
|
64
|
-
-
|
65
|
-
version: 0.10.
|
64
|
+
- 1
|
65
|
+
version: 0.10.1
|
66
66
|
type: :runtime
|
67
67
|
version_requirements: *id003
|
68
68
|
- !ruby/object:Gem::Dependency
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
requirements:
|
242
242
|
- spk-anemone
|
243
243
|
- rainbow
|
244
|
-
- html5
|
244
|
+
- spk-html5
|
245
245
|
rubyforge_project:
|
246
246
|
rubygems_version: 1.3.7
|
247
247
|
signing_key:
|