validate-website 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +10 -0
- data/LICENSE +1 -1
- data/README.md +3 -3
- data/Rakefile +1 -2
- data/lib/validate_website/core.rb +2 -1
- data/lib/validate_website/crawl.rb +1 -1
- data/lib/validate_website/static_link.rb +1 -1
- data/lib/validate_website/version.rb +1 -1
- data/test/test_helper.rb +3 -3
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f63d4c84f653035be69262c33ccad0025c48013492b653882a803f7d110e717f
|
4
|
+
data.tar.gz: fdf8e994af98a8dbff7411dd480b88f759009a70b5b5c1fcde15120b5db1ad02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0774aaab6ca32e10d43cfc0dd6c57219cc9e3862af5febd892a30884920195512301f702e5af11459a55c8dde4eaa4238a09833b102924a8ca36c9deb8480f
|
7
|
+
data.tar.gz: c0cdf68b1486c2d15257d7fb07e8561f52054b5a234e46162a468b1ffdc6bbc26905563150ccab3053e78a15a70c59142a857afa1aaff7563a22279840752332
|
data/History.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
|
2
|
+
1.11.0 / 2021-01-08
|
3
|
+
===================
|
4
|
+
|
5
|
+
* Merge pull request #23 from @marocchino / ruby-3-support
|
6
|
+
* Use webrick's escape instead of encode_www_form_component
|
7
|
+
* Support ruby 3
|
8
|
+
* Fix doc for ValidateWebsite::Core initialize
|
9
|
+
* Switch to gitlab ci and remove 2.{3,4} support
|
10
|
+
* Update rubocop to 0.76.0
|
11
|
+
|
2
12
|
1.10.0 / 2020-07-03
|
3
13
|
==================
|
4
14
|
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2009-
|
3
|
+
Copyright (c) 2009-2021 Laurent Arnoud <laurent@spkdev.net>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -145,12 +145,12 @@ See [GitHub](https://github.com/spk/validate-website/graphs/contributors).
|
|
145
145
|
|
146
146
|
The MIT License
|
147
147
|
|
148
|
-
Copyright (c) 2009-
|
148
|
+
Copyright (c) 2009-2021 Laurent Arnoud <laurent@spkdev.net>
|
149
149
|
|
150
150
|
---
|
151
|
-
[![Build](https://img.shields.io/
|
151
|
+
[![Build](https://img.shields.io/gitlab/pipeline/spkdev/validate-website/master)](https://gitlab.com/spkdev/validate-website/-/commits/master)
|
152
|
+
[![Coverage](https://gitlab.com/spkdev/validate-website/badges/master/coverage.svg)](https://gitlab.com/spkdev/validate-website/-/commits/master)
|
152
153
|
[![Version](https://img.shields.io/gem/v/validate-website.svg)](https://rubygems.org/gems/validate-website)
|
153
154
|
[![Documentation](https://img.shields.io/badge/doc-rubydoc-blue.svg)](http://www.rubydoc.info/gems/validate-website)
|
154
155
|
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT "MIT")
|
155
|
-
[![Coverage Status](https://img.shields.io/coveralls/github/spk/validate-website.svg)](https://coveralls.io/github/spk/validate-website?branch=master)
|
156
156
|
[![Inline docs](https://inch-ci.org/github/spk/validate-website.svg?branch=master)](http://inch-ci.org/github/spk/validate-website)
|
data/Rakefile
CHANGED
@@ -34,6 +34,7 @@ module ValidateWebsite
|
|
34
34
|
# @example
|
35
35
|
# new({ site: "https://example.com/" }, :crawl)
|
36
36
|
# @param [Hash] options
|
37
|
+
# @param [Symbol] validation_type `crawl` for web or `static` for local
|
37
38
|
# @return [NilClass]
|
38
39
|
def initialize(options, validation_type)
|
39
40
|
@not_founds_count = 0
|
@@ -117,7 +118,7 @@ module ValidateWebsite
|
|
117
118
|
# @param [Hash] Validator options
|
118
119
|
#
|
119
120
|
def validate(doc, body, url, options)
|
120
|
-
validator = Validator.new(doc, body, options)
|
121
|
+
validator = Validator.new(doc, body, **options)
|
121
122
|
if validator.valid?
|
122
123
|
print color(:success, '.', options[:color]) # rspec style
|
123
124
|
else
|
@@ -46,7 +46,7 @@ module ValidateWebsite
|
|
46
46
|
|
47
47
|
page.doc.search('//img[@src]').reduce(Set[]) do |result, elem|
|
48
48
|
u = elem.attributes['src'].content
|
49
|
-
result << page.to_absolute(URI.parse(
|
49
|
+
result << page.to_absolute(URI.parse(WEBrick::HTTPUtils.escape(u)))
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -8,7 +8,7 @@ require 'spidr'
|
|
8
8
|
# rubocop:disable Metrics/BlockLength
|
9
9
|
StaticLink = Struct.new(:link, :site) do
|
10
10
|
def link_uri
|
11
|
-
@link_uri = URI.parse(
|
11
|
+
@link_uri = URI.parse(WEBrick::HTTPUtils.escape(link))
|
12
12
|
@link_uri = URI.join(site, @link_uri) if @link_uri.host.nil?
|
13
13
|
@link_uri
|
14
14
|
end
|
data/test/test_helper.rb
CHANGED
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.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent Arnoud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: crass
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webrick
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: asciidoctor
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +156,14 @@ dependencies:
|
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
159
|
+
version: 0.76.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
166
|
+
version: 0.76.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: webmock
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,14 +273,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
273
|
requirements:
|
260
274
|
- - ">="
|
261
275
|
- !ruby/object:Gem::Version
|
262
|
-
version: 2.
|
276
|
+
version: '2.5'
|
263
277
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
278
|
requirements:
|
265
279
|
- - ">="
|
266
280
|
- !ruby/object:Gem::Version
|
267
281
|
version: '0'
|
268
282
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
283
|
+
rubygems_version: 3.2.0.rc.2
|
270
284
|
signing_key:
|
271
285
|
specification_version: 4
|
272
286
|
summary: Web crawler for checking the validity of your documents
|