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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a5b0553089c9d66d3622781fe6c4ab5ca68ac6a198fe36c53c84c8d34e14adb
4
- data.tar.gz: f3f0cc4aef203f85ebb9868e793b7cd0312db8c4b6f7fb0d15beefeaaef1cc83
3
+ metadata.gz: f63d4c84f653035be69262c33ccad0025c48013492b653882a803f7d110e717f
4
+ data.tar.gz: fdf8e994af98a8dbff7411dd480b88f759009a70b5b5c1fcde15120b5db1ad02
5
5
  SHA512:
6
- metadata.gz: c9a8fae92bcb19d5f92466a7b77f3e40cca59643c946c15563885d9e65a1d2793271dee2b723a296fe487d57634fdd88f4440a60d2fac625a6a7208c8105159d
7
- data.tar.gz: e7a78f899b42d5f27cb41e99472e37499389bf39c567dd9f16ab064fce38927a43de89c00411c25697c622ad76f59b8d4b9836d898249822cf9bc0d37591c3bf
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-2020 Laurent Arnoud <laurent@spkdev.net>
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-2020 Laurent Arnoud <laurent@spkdev.net>
148
+ Copyright (c) 2009-2021 Laurent Arnoud <laurent@spkdev.net>
149
149
 
150
150
  ---
151
- [![Build](https://img.shields.io/travis/spk/validate-website.svg)](https://travis-ci.org/spk/validate-website)
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
@@ -4,8 +4,7 @@ require 'rake/testtask'
4
4
  require 'rubocop/rake_task'
5
5
  require 'asciidoctor'
6
6
 
7
- default = %i[test]
8
- default << :rubocop unless RUBY_ENGINE == 'rbx'
7
+ default = %i[test rubocop]
9
8
  task default: default
10
9
 
11
10
  desc 'Update manpage from asciidoc file'
@@ -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(URI.encode(u)))
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(URI.encode(link))
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version file for ValidateWebsite
4
4
  module ValidateWebsite
5
- VERSION = '1.10.0'
5
+ VERSION = '1.11.0'
6
6
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  begin
4
- require 'coveralls'
5
- Coveralls.wear!
4
+ require 'simplecov'
5
+ SimpleCov.start
6
6
  rescue LoadError
7
- warn 'coveralls not loaded'
7
+ warn 'simplecov not loaded'
8
8
  end
9
9
 
10
10
  require 'minitest/autorun'
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.10.0
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: 2020-07-03 00:00:00.000000000 Z
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.72.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.72.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.3.0
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.1.2
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