html_validation 1.1.5 → 1.1.6
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2be1ecba4fac05b51602b3c9896ed7b0fd33e39b530996d547638c5c921c5f4b
|
4
|
+
data.tar.gz: de11cf5ea5b782484c1f74c76bdfc0f0afd787838e996aec35c18c2595df46b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60a3e005e249723e68ce8a9466053a78050ba63177261a1855a974e50094e6d294b1f35b3b72828f8a45fa973bb71cc39ba568ac9873371053bea2840226b7dd
|
7
|
+
data.tar.gz: 787273a1c5ac354efbf488a79ac71801b5bcae6c9b31208ac38c8ef4b32dde93b5b780dfeaf06a7edcd598373a2a7bb6e0cc1499ad651c64f3695f2d1a24a890
|
@@ -44,7 +44,7 @@ class HTMLValidationResult
|
|
44
44
|
# file system path, or url, so long it is uniquely associated with the passed in html.
|
45
45
|
def valid?
|
46
46
|
@exceptions = validate
|
47
|
-
File.delete(data_path("accepted")) if File.
|
47
|
+
File.delete(data_path("accepted")) if File.exist?(data_path("accepted")) if @exceptions == ''
|
48
48
|
valid = (filter(@exceptions) == '' or accepted?(@exceptions))
|
49
49
|
save_html_and_exceptions
|
50
50
|
valid
|
@@ -58,7 +58,7 @@ class HTMLValidationResult
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def reject!
|
61
|
-
if File.
|
61
|
+
if File.exist?(data_path("accepted"))
|
62
62
|
File.delete data_path("accepted")
|
63
63
|
end
|
64
64
|
end
|
@@ -90,7 +90,7 @@ class HTMLValidationResult
|
|
90
90
|
# have we previously accepted this exact string for this path?
|
91
91
|
def accepted?(exception_str)
|
92
92
|
exception_str = filter(exception_str)
|
93
|
-
File.
|
93
|
+
File.exist?(data_path('accepted')) ? filter(File.open(data_path('accepted'), "r").read) == exception_str : false
|
94
94
|
end
|
95
95
|
|
96
96
|
# Line numbers of exceptions are likely to change with any minor edit, so our validation
|
@@ -122,5 +122,4 @@ class HTMLValidationResult
|
|
122
122
|
stderr.close
|
123
123
|
result
|
124
124
|
end
|
125
|
-
|
126
125
|
end
|
@@ -20,7 +20,6 @@ module PageValidations
|
|
20
20
|
|
21
21
|
|
22
22
|
class HTMLValidation
|
23
|
-
|
24
23
|
def self.result_attributes *names
|
25
24
|
@@result_attributes = names.each do |name|
|
26
25
|
class_eval(%Q{
|
@@ -136,6 +135,5 @@ module PageValidations
|
|
136
135
|
new_path = path.gsub(/www.|^(http:\/\/|\/|C:\\)/, '')
|
137
136
|
new_path.gsub(/[^0-9A-Za-z.]/, '_')
|
138
137
|
end
|
139
|
-
|
140
138
|
end
|
141
139
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_validation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Beland
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: HTML Validation lets you validate html locally. Lets you build html validation
|
14
14
|
into your test suite, but break the rules if you must.
|
@@ -29,7 +29,7 @@ homepage: https://github.com/ericbeland/html_validation
|
|
29
29
|
licenses:
|
30
30
|
- MIT
|
31
31
|
metadata: {}
|
32
|
-
post_install_message:
|
32
|
+
post_install_message:
|
33
33
|
rdoc_options: []
|
34
34
|
require_paths:
|
35
35
|
- lib
|
@@ -44,9 +44,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
|
-
|
48
|
-
|
49
|
-
signing_key:
|
47
|
+
rubygems_version: 3.3.26
|
48
|
+
signing_key:
|
50
49
|
specification_version: 4
|
51
50
|
summary: Local HTML validation for tests and RSpec.
|
52
51
|
test_files: []
|