middleman-xmlvalidator 0.0.35 → 0.0.36
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.
@@ -2,12 +2,9 @@ module Middleman
|
|
2
2
|
module Xmlvalidator
|
3
3
|
class << self
|
4
4
|
def registered(app)
|
5
|
-
|
6
5
|
app.after_build do |builder|
|
7
6
|
puts "", "Validating with NokoGiri", ""
|
8
7
|
|
9
|
-
#puts File.exist?File.join(File.dirname(File.expand_path(__FILE__)), './RSSSchema.xsd')
|
10
|
-
|
11
8
|
Dir.glob("build/**/*BingSiteAuth.xml").each do |full_path|
|
12
9
|
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'BingSiteAuth.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
13
10
|
Xmlvalidator.validate(full_path, 'BingSiteAuth.xsd').each do |error|
|
@@ -15,35 +12,35 @@ module Middleman
|
|
15
12
|
end
|
16
13
|
end
|
17
14
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
Dir.glob("build/**/*crossdomain.xml").each do |full_path|
|
16
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'crossdomain.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
17
|
+
Xmlvalidator.validate(full_path, 'crossdomain.xsd').each do |error|
|
18
|
+
puts " " + error.message
|
19
|
+
end
|
20
|
+
end
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
Dir.glob("build/**/*Sitemap.xml").each do |full_path|
|
23
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'Sitemap3.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
24
|
+
Xmlvalidator.validate(full_path, 'Sitemap3.xsd').each do |error|
|
25
|
+
puts " " + error.message
|
26
|
+
end
|
27
|
+
end
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
Dir.glob("build/**/*.rss").each do |full_path|
|
30
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'RSSSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
31
|
+
Xmlvalidator.validate(full_path, 'RSSSchema.xsd').each do |error|
|
32
|
+
puts " " + error.message
|
33
|
+
end
|
34
|
+
end
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
36
|
+
Dir.glob("build/**/*.xml").each do |full_path|
|
37
|
+
if not (full_path.match(/^.*BingSiteAuth.xml$/) || full_path.match(/^.*crossdomain.xml$/) || full_path.match(/^.*Sitemap.xml$/))
|
38
|
+
puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'XMLSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
|
39
|
+
Xmlvalidator.validate(full_path, 'XMLSchema.xsd').each do |error|
|
40
|
+
puts " " + error.message
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
47
44
|
|
48
45
|
puts "", "Validation with NokoGiri " + "Complete".green, ""
|
49
46
|
end
|