middleman-xmlvalidator 0.0.33 → 0.0.34

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.
@@ -6,14 +6,14 @@ module Middleman
6
6
  app.after_build do |builder|
7
7
  puts "", "Validating with NokoGiri", ""
8
8
 
9
- puts File.exist?File.join(File.dirname(File.expand_path(__FILE__)), './RSSSchema.xsd')
9
+ #puts File.exist?File.join(File.dirname(File.expand_path(__FILE__)), './RSSSchema.xsd')
10
10
 
11
- # Dir.glob("build/**/*BingSiteAuth.xml").each do |full_path|
12
- # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'BingSiteAuth.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
13
- # Xmlvalidator.validate(full_path, 'BingSiteAuth.xsd').each do |error|
14
- # puts " " + error.message
15
- # end
16
- # end
11
+ Dir.glob("build/**/*BingSiteAuth.xml").each do |full_path|
12
+ puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'BingSiteAuth.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
13
+ Xmlvalidator.validate(full_path, 'BingSiteAuth.xsd').each do |error|
14
+ puts " " + error.message
15
+ end
16
+ end
17
17
 
18
18
  # Dir.glob("build/**/*crossdomain.xml").each do |full_path|
19
19
  # puts " validating".blue + " #{full_path}....." + (Xmlvalidator.valid(full_path, 'crossdomain.xsd') == true ? "COMPLETE".green : "ERRORS FOUND".red)
@@ -52,7 +52,7 @@ module Middleman
52
52
  end
53
53
 
54
54
  def self.validate(document_path, schema_path)
55
- schema = Nokogiri::XML::Schema(File.read("schema/" + schema_path))
55
+ schema = Nokogiri::XML::Schema(File.read(File.join(File.dirname(File.expand_path(__FILE__)), "./" + schema_path)))
56
56
  document = Nokogiri::XML(File.read(document_path))
57
57
  schema.validate(document)
58
58
  end
@@ -1,6 +1,6 @@
1
1
  module Middleman
2
2
  module Xmlvalidator
3
- VERSION = "0.0.33"
3
+ VERSION = "0.0.34"
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.33
4
+ version: 0.0.34
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: