validate-website 1.5.6 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +8 -0
- data/README.md +2 -0
- data/lib/validate_website/static.rb +2 -1
- data/lib/validate_website/validator.rb +5 -3
- data/lib/validate_website/version.rb +1 -1
- data/test/data/html4-strict.html +1 -1
- data/test/validator_test.rb +2 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19b5caf5684592eb5e6b49412c7f8a0e4db8c2b2
|
4
|
+
data.tar.gz: 76593f1fe75dcc5c8bbb774c3ea5d808e6ef87d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 903af9e5534dab24012acd929314cd451f2ef07aee8037acac3c0add88fc33b8671888abb8d2739fb88f770a847847f264a22011e68103b90b9b00073e916ec1
|
7
|
+
data.tar.gz: 8a0725fa75523673943e960bd304febbefd2d5ff106b9820fc8975bd44e0e059d81ae38313d7df3590f937e4a986c45d63386e323138c151575c8c7d6d90454a
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -108,6 +108,8 @@ Then you can use validate-website option:
|
|
108
108
|
|
109
109
|
~~~
|
110
110
|
--html5-validator-service-url http://localhost:8888/
|
111
|
+
# or
|
112
|
+
export VALIDATOR_NU_URL="http://localhost:8888/"
|
111
113
|
~~~
|
112
114
|
|
113
115
|
This will prevent you to be blacklisted from validator webservice.
|
@@ -27,6 +27,7 @@ module ValidateWebsite
|
|
27
27
|
@ignore = ignore
|
28
28
|
@dtd = @original_doc.internal_subset
|
29
29
|
@namespace = init_namespace(@dtd)
|
30
|
+
@errors = []
|
30
31
|
end
|
31
32
|
|
32
33
|
##
|
@@ -103,11 +104,12 @@ module ValidateWebsite
|
|
103
104
|
end
|
104
105
|
|
105
106
|
def html5_body(document)
|
106
|
-
url =
|
107
|
+
url = ENV['VALIDATOR_NU_URL'] || self.class.html5_validator_service_url
|
108
|
+
uri = URI.parse(url)
|
107
109
|
multipart = MultipartBody.new(content: document)
|
108
|
-
http = Net::HTTP.new(
|
110
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
109
111
|
http.start do |con|
|
110
|
-
con.post(
|
112
|
+
con.post(uri.path, multipart.to_s, html5_headers(multipart))
|
111
113
|
end.body
|
112
114
|
end
|
113
115
|
|
data/test/data/html4-strict.html
CHANGED
@@ -122,7 +122,7 @@ mais la plupart des outils de base du système proviennent du
|
|
122
122
|
il contient plus de 25000
|
123
123
|
<a href="distrib/packages">paquets</a> ; les paquets sont des composants
|
124
124
|
logiciels précompilés conçus pour s'installer facilement sur votre machine.</p>
|
125
|
-
<p><a href="intro/about">Suite...</a>
|
125
|
+
<p><a href="intro/about">Suite...</a></p>
|
126
126
|
<hr>
|
127
127
|
<h2>Pour commencer</h2>
|
128
128
|
<p>La <a href="releases/stable/">dernière version stable de Debian</a> est
|
data/test/validator_test.rb
CHANGED
@@ -130,7 +130,8 @@ describe ValidateWebsite::Validator do
|
|
130
130
|
@html4_strict_page = @http.get_page(page.url)
|
131
131
|
validator = subject.new(@html4_strict_page.doc,
|
132
132
|
@html4_strict_page.body)
|
133
|
-
validator.valid
|
133
|
+
validator.valid?
|
134
|
+
validator.errors.must_equal []
|
134
135
|
end
|
135
136
|
end
|
136
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validate-website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent Arnoud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spidr
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '11'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '11'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: minitest
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0.
|
131
|
+
version: '0.40'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0.
|
138
|
+
version: '0.40'
|
139
139
|
description: validate-website is a web crawler for checking the markup validity with
|
140
140
|
XML Schema / DTD and not found urls.
|
141
141
|
email: laurent@spkdev.net
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
291
|
version: '0'
|
292
292
|
requirements: []
|
293
293
|
rubyforge_project:
|
294
|
-
rubygems_version: 2.
|
294
|
+
rubygems_version: 2.5.1
|
295
295
|
signing_key:
|
296
296
|
specification_version: 4
|
297
297
|
summary: Web crawler for checking the validity of your documents
|