validate-website 0.9.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/validate_website/core.rb +93 -80
- data/lib/validate_website/option_parser.rb +58 -136
- data/lib/validate_website/validator.rb +13 -13
- data/man/man1/validate-website-static.1 +6 -16
- data/man/man1/validate-website.1 +6 -21
- data/spec/core_spec.rb +37 -8
- data/spec/data/html5-linuxfr.html +1049 -291
- data/spec/data/news/ryzom-naissance-du-projet-libre-ryzom-forge.md +0 -0
- data/spec/validator_spec.rb +3 -3
- metadata +18 -3
- data/lib/validate_website/rspec.rb +0 -10
File without changes
|
data/spec/validator_spec.rb
CHANGED
@@ -74,11 +74,11 @@ describe ValidateWebsite::Validator do
|
|
74
74
|
validator.errors.size.must_equal 38
|
75
75
|
end
|
76
76
|
|
77
|
-
it 'should exclude errors ignored by :
|
78
|
-
ignore =
|
77
|
+
it 'should exclude errors ignored by :ignore option' do
|
78
|
+
ignore = /The nowrap attribute on the td element is obsolete/
|
79
79
|
validator = ValidateWebsite::Validator.new(@html5_page.doc,
|
80
80
|
@html5_page.body,
|
81
|
-
|
81
|
+
ignore)
|
82
82
|
validator.valid?.must_equal false
|
83
83
|
validator.errors.size.must_equal 36
|
84
84
|
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: 0.
|
4
|
+
version: 1.0.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: 2014-
|
11
|
+
date: 2014-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spidr
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: slop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.5'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.5'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,7 +229,6 @@ files:
|
|
215
229
|
- lib/validate_website/colorful_messages.rb
|
216
230
|
- lib/validate_website/core.rb
|
217
231
|
- lib/validate_website/option_parser.rb
|
218
|
-
- lib/validate_website/rspec.rb
|
219
232
|
- lib/validate_website/runner.rb
|
220
233
|
- lib/validate_website/validator.rb
|
221
234
|
- man/man1/validate-website-static.1
|
@@ -224,6 +237,7 @@ files:
|
|
224
237
|
- spec/data/html4-strict.html
|
225
238
|
- spec/data/html5-linuxfr.html
|
226
239
|
- spec/data/html5.html
|
240
|
+
- spec/data/news/ryzom-naissance-du-projet-libre-ryzom-forge.md
|
227
241
|
- spec/data/validator.nu-failure.html
|
228
242
|
- spec/data/validator.nu-success.html
|
229
243
|
- spec/data/xhtml1-strict.html
|
@@ -261,3 +275,4 @@ summary: Web crawler for checking the validity of your documents
|
|
261
275
|
test_files:
|
262
276
|
- spec/core_spec.rb
|
263
277
|
- spec/validator_spec.rb
|
278
|
+
has_rdoc:
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
RSpec::Matchers.define :be_w3c_valid do |expected|
|
3
|
-
match do |body|
|
4
|
-
@validator = ValidateWebsite::Validator.new(Nokogiri::HTML(body), body)
|
5
|
-
@validator.valid?
|
6
|
-
end
|
7
|
-
failure_message_for_should do |actual|
|
8
|
-
@validator.errors
|
9
|
-
end
|
10
|
-
end
|