site_validator 1.3.10 → 1.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/site_validator/page.rb +7 -1
- data/lib/site_validator/version.rb +1 -1
- data/spec/mocks/mocked_validator.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d8979aa04b3d9835efa8ae8410f6f4b98177f74
|
4
|
+
data.tar.gz: cbace4f93f945fdb5b5bbbb62e81d664ee775c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e0c6d61a6b17421a410ca31dfad0ba8317b8be76cee97a64fed6c21b39902c959292e34829b4f809f9e204d6df2dc54b67f6012c2a5027b964d5c8c399db201
|
7
|
+
data.tar.gz: f7a33d646cdea51c4411187554180be943f05f691f4d3d70aa7a0cc3f45db0857953dd9ee3d5ef431ed5f4ffae5ce237bc4f7835b5e2f097d88c80e42ebc8b82
|
data/lib/site_validator/page.rb
CHANGED
@@ -62,7 +62,13 @@ module SiteValidator
|
|
62
62
|
##
|
63
63
|
# Gets the validations for this page, ensuring it times out soon
|
64
64
|
def validations
|
65
|
-
@validations ||= Timeout::timeout(timeout) {
|
65
|
+
@validations ||= Timeout::timeout(timeout) {
|
66
|
+
results = markup_validator.validate_uri(url)
|
67
|
+
|
68
|
+
raise "Could not validate page" if results.checked_by.empty?
|
69
|
+
|
70
|
+
results
|
71
|
+
}
|
66
72
|
end
|
67
73
|
|
68
74
|
##
|
@@ -6,6 +6,10 @@ module SiteValidator
|
|
6
6
|
@errors, @warnings = [], []
|
7
7
|
end
|
8
8
|
|
9
|
+
def checked_by
|
10
|
+
"w3c_validator"
|
11
|
+
end
|
12
|
+
|
9
13
|
def add_error(message_id, line, col, message, source, explanation)
|
10
14
|
@errors << SiteValidator::MockedMessage.new(message_id, line, col, message, source, explanation)
|
11
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Iniesta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: w3c_validators
|