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
- # Dir.glob("build/**/*crossdomain.xml").each do |full_path|
19
- # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'crossdomain.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
20
- # Xmlvalidator.validate(full_path, 'crossdomain.xsd').each do |error|
21
- # puts " " + error.message
22
- # end
23
- # end
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
- # Dir.glob("build/**/*Sitemap.xml").each do |full_path|
26
- # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'Sitemap3.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
27
- # Xmlvalidator.validate(full_path, 'Sitemap3.xsd').each do |error|
28
- # puts " " + error.message
29
- # end
30
- # end
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
- # Dir.glob("build/**/*.rss").each do |full_path|
33
- # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'RSSSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
34
- # Xmlvalidator.validate(full_path, 'RSSSchema.xsd').each do |error|
35
- # puts " " + error.message
36
- # end
37
- # end
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
- # Dir.glob("build/**/*.xml").each do |full_path|
40
- # if not (full_path.match(/^.*BingSiteAuth.xml$/) || full_path.match(/^.*crossdomain.xml$/) || full_path.match(/^.*Sitemap.xml$/))
41
- # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'XMLSchema.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
42
- # Xmlvalidator.validate(full_path, 'XMLSchema.xsd').each do |error|
43
- # puts " " + error.message
44
- # end
45
- # end
46
- # end
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
@@ -1,6 +1,6 @@
1
1
  module Middleman
2
2
  module Xmlvalidator
3
- VERSION = "0.0.35"
3
+ VERSION = "0.0.36"
4
4
  PACKAGE = "middleman-xmlvalidator"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-xmlvalidator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.36
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: