validate-website 1.5.6 → 1.5.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36bfd11556df68d70d38ead12dd46b45054638de
4
- data.tar.gz: 4172bdd3bce9e93a8a9d86e12009943e27c0cc00
3
+ metadata.gz: 19b5caf5684592eb5e6b49412c7f8a0e4db8c2b2
4
+ data.tar.gz: 76593f1fe75dcc5c8bbb774c3ea5d808e6ef87d5
5
5
  SHA512:
6
- metadata.gz: eb3290172ad8af25ea097144603e94c739aa7039fd8a29dc1a58daf5987f8a2844584e0585c64baf0cb760cffc4c9d88907f7b0b6ccd3802de128b30a14d52d4
7
- data.tar.gz: 5eea33893e997b004f08bb9604b3e0006e4d7daf10bf9e10dad28d383d55f329ffbbb54aa8ddbf1ac72ef11fc18d82f0d5404ea000cfb0cf1c2c88447ce110c7
6
+ metadata.gz: 903af9e5534dab24012acd929314cd451f2ef07aee8037acac3c0add88fc33b8671888abb8d2739fb88f770a847847f264a22011e68103b90b9b00073e916ec1
7
+ data.tar.gz: 8a0725fa75523673943e960bd304febbefd2d5ff106b9820fc8975bd44e0e059d81ae38313d7df3590f937e4a986c45d63386e323138c151575c8c7d6d90454a
data/History.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ v1.5.7 / 2016-06-13
3
+ ==================
4
+
5
+ * Fix JRuby CI build
6
+ * Update JRuby and other rubies on Travis
7
+ * Update rubocop to v0.40
8
+ * Add env variable VALIDATOR_NU_URL support
9
+
2
10
  v1.5.6 / 2016-03-02
3
11
  ==================
4
12
 
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.
@@ -85,7 +85,8 @@ module ValidateWebsite
85
85
  def response
86
86
  @response ||= ValidateWebsite::Static.fake_httpresponse(
87
87
  body,
88
- content_types)
88
+ content_types
89
+ )
89
90
  end
90
91
 
91
92
  def page
@@ -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 = URI.parse(self.class.html5_validator_service_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(url.host, url.port)
110
+ http = Net::HTTP.new(uri.host, uri.port)
109
111
  http.start do |con|
110
- con.post(url.path, multipart.to_s, html5_headers(multipart))
112
+ con.post(uri.path, multipart.to_s, html5_headers(multipart))
111
113
  end.body
112
114
  end
113
115
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version file for ValidateWebsite
4
4
  module ValidateWebsite
5
- VERSION = '1.5.6'.freeze
5
+ VERSION = '1.5.7'.freeze
6
6
  end
@@ -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>&nbsp;; 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
@@ -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?.must_equal true
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.6
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-03-02 00:00:00.000000000 Z
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: '10'
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: '10'
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.37'
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.37'
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.4.5.1
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