middleman-xmlvalidator 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,37 +7,37 @@ module Middleman
|
|
7
7
|
puts "", "Validating with NokoGiri", ""
|
8
8
|
|
9
9
|
Dir.glob("build/**/*BingSiteAuth.xml").each do |full_path|
|
10
|
-
puts " validating".blue + " #{full_path}....." + (
|
11
|
-
|
10
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'BingSiteAuth.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
11
|
+
Xmlvalidator.validate(full_path, 'BingSiteAuth.xsd').each do |error|
|
12
12
|
puts " " + error.message
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
Dir.glob("build/**/*crossdomain.xml").each do |full_path|
|
17
|
-
puts " validating".blue + " #{full_path}....." + (
|
18
|
-
|
17
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'crossdomain.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
18
|
+
Xmlvalidator.validate(full_path, 'crossdomain.xsd').each do |error|
|
19
19
|
puts " " + error.message
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
Dir.glob("build/**/*Sitemap.xml").each do |full_path|
|
24
|
-
puts " validating".blue + " #{full_path}....." + (
|
25
|
-
|
24
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'Sitemap3.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
25
|
+
Xmlvalidator.validate(full_path, 'Sitemap3.xsd').each do |error|
|
26
26
|
puts " " + error.message
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
Dir.glob("build/**/*.rss").each do |full_path|
|
31
|
-
puts " validating".blue + " #{full_path}....." + (
|
32
|
-
|
31
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'RSSSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
32
|
+
Xmlvalidator.validate(full_path, 'RSSSchema.xsd').each do |error|
|
33
33
|
puts " " + error.message
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
Dir.glob("build/**/*.xml").each do |full_path|
|
38
38
|
if not (full_path.match(/^.*BingSiteAuth.xml$/) || full_path.match(/^.*crossdomain.xml$/) || full_path.match(/^.*Sitemap.xml$/))
|
39
|
-
puts " validating".blue + " #{full_path}....." + (
|
40
|
-
|
39
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'XMLSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
40
|
+
Xmlvalidator.validate(full_path, 'XMLSchema.xsd').each do |error|
|
41
41
|
puts " " + error.message
|
42
42
|
end
|
43
43
|
end
|