InternalW3cValidation 1.0.0 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/InternalW3cValidation.rb +29 -0
  3. metadata +31 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDk1OWM5Yzc3MDM5ZmIxNGJkMjllZGU2N2YwYjRkY2Y2YjVmNDBiMw==
4
+ NmI4MDRmMGY5M2I5YmViOGQyNWQzODc3Zjc1ZjNmZGIxOTQwMDk3MQ==
5
5
  data.tar.gz: !binary |-
6
- MTI0NzU4NjcxMGMwZGM2NjdlNzk3MGZkYmY2NzA1ODYxYzA4ZjMzZQ==
6
+ OWJmMTllZWU4MTI2OWYxYTAwNjM4NWJhMzlhMDc3NDBmZGJiMzZiZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjY2MGJlZWE0OTZhNDRmYzAzYjE1NjQ3ZDBhZTk3MzhiODYyYjEzZDA1MzU1
10
- ZDk2YWZlNjg5YjNmMmZjZWE2MTFhZTM2ZGY5MzNiNzYzZGYwMjJjNWI5MDc3
11
- MDVkMzM1ZjBjZTRjZmMxMzNmYjU4MzgzNTdjNGMxZDUzNDEwZGQ=
9
+ OGI1YTAwNzIwZTgzOTRhNDA5ZmYzMWNmYmRlZDkzOTk3ODQ4Y2E0ZmNhMmVl
10
+ MGFkMzE3YmRiNDU5YmNlODhiYzQ2NDllMWI5MTk5MmNlNDZmYzcxNmY3MDRl
11
+ MjUwNmJjOWZhZDlhNjEyMjZlODA4YWM4OTIwNjdiMGEyOWQ0N2I=
12
12
  data.tar.gz: !binary |-
13
- NmNjMWYzMGU4NWY5MzUyNjMzOWI4YTY2N2I4ZDc1MjBjYWNkMGQwYmM2Njdj
14
- MWQxY2I2MjA1OTIzYzQ1ZDZmODY5NjRjZTAxNjEzMzYzN2I0Y2QwM2FmODdh
15
- MTFiYjk3Njg5MWYyNjM4NWFlZTI5ZTYzNDBjYmViOTFjNmQ4ZTg=
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.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: