InternalW3cValidation 1.0.0 → 1.0.3
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 +8 -8
- data/lib/InternalW3cValidation.rb +29 -0
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmI4MDRmMGY5M2I5YmViOGQyNWQzODc3Zjc1ZjNmZGIxOTQwMDk3MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWJmMTllZWU4MTI2OWYxYTAwNjM4NWJhMzlhMDc3NDBmZGJiMzZiZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGI1YTAwNzIwZTgzOTRhNDA5ZmYzMWNmYmRlZDkzOTk3ODQ4Y2E0ZmNhMmVl
|
10
|
+
MGFkMzE3YmRiNDU5YmNlODhiYzQ2NDllMWI5MTk5MmNlNDZmYzcxNmY3MDRl
|
11
|
+
MjUwNmJjOWZhZDlhNjEyMjZlODA4YWM4OTIwNjdiMGEyOWQ0N2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTE3OGFiYjBmZjMwOWQwZjc2M2JjNGRjMDRjY2QzOTE4OWZjZWJlNDU4NWY3
|
14
|
+
Y2ZiOTAyODczZjg0Yzc2MDljMjE3ZmVjZTEyZmY3MmE3MWI5NWQ4NGRiMTVj
|
15
|
+
ODQxOTg4NjUxMTAwODZlYWUwMWRmZmY1ZmVjNzIxZWQxZDYyNjg=
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative "InternalW3cValidator"
|
2
|
+
|
3
|
+
def internalW3cValidation(*args, &block)
|
4
|
+
internal_w3c_validator_wrapper = InternalW3cValidatorWrapper.new(&block)
|
5
|
+
task = Proc.new { internal_w3c_validator_wrapper.run }
|
6
|
+
Rake::Task.define_task(*args, &task)
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
class InternalW3cValidatorWrapper
|
11
|
+
def initialize(&block)
|
12
|
+
@block = block;
|
13
|
+
end
|
14
|
+
|
15
|
+
def run()
|
16
|
+
configuration = InternalW3cValidationConfiguration.new
|
17
|
+
@block.call(configuration)
|
18
|
+
results = InternalW3cValidator.new.validate_pages(configuration.pages)
|
19
|
+
results.each do | error |
|
20
|
+
puts error.to_s
|
21
|
+
end
|
22
|
+
throw "There are #{results.length} W3c Validation Errors" if results.length > 0 && configuration.failOnError
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class InternalW3cValidationConfiguration
|
27
|
+
attr_accessor :pages,
|
28
|
+
:failOnError
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: InternalW3cValidation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iainjmitchell
|
@@ -9,13 +9,42 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-04-17 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: w3c_validators
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: peach
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
description:
|
14
42
|
email: iainjmitchell@gmail.com
|
15
43
|
executables: []
|
16
44
|
extensions: []
|
17
45
|
extra_rdoc_files: []
|
18
46
|
files:
|
47
|
+
- lib/InternalW3cValidation.rb
|
19
48
|
- lib/InternalW3cValidator.rb
|
20
49
|
homepage: https://github.com/code-computerlove/internal-w3c-validation
|
21
50
|
licenses:
|