fml 0.2.2 → 0.2.3

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.
data/fml.gemspec CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "fml"
5
- s.version = "0.2.2"
6
- s.date = "2010-04-26"
5
+ s.version = "0.2.3"
6
+ s.date = "2010-05-18"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.0") if s.respond_to? :required_rubygems_version=
9
9
 
@@ -5,14 +5,14 @@ module Floorplanner
5
5
  LINE_POINTS_REGEXP = /^((\s*[-+]?[0-9]*\.?[0-9]+\s+){5,8}\s*[-+]?[0-9]*\.?[0-9]+\s*?(?:,)?)*$/
6
6
 
7
7
  def initialize(fml_fn)
8
- @xml = XML::Document.file(fml_fn)
8
+ @xml = LibXML::XML::Document.file(fml_fn)
9
9
  end
10
10
 
11
11
  def self.validate(doc)
12
- schema = XML::RelaxNG.document(
13
- XML::Document.file(File.join(File.dirname(__FILE__), "..", "..", "xml", "fml.rng"))
12
+ schema = LibXML::XML::RelaxNG.document(
13
+ LibXML::XML::Document.file(File.join(File.dirname(__FILE__), "..", "..", "xml", "fml.rng"))
14
14
  )
15
- doc = XML::Document.file(doc) if doc.instance_of?(String)
15
+ doc = LibXML::XML::Document.file(doc) if doc.instance_of?(String)
16
16
  doc.validate_relaxng(schema) do |message,error|
17
17
  # TODO throw an exception
18
18
  puts message if error
@@ -35,13 +35,13 @@ module Floorplanner
35
35
 
36
36
  def initialize(fml)
37
37
  if fml.kind_of? String # filename
38
- @xml = XML::Document.file(fml)
39
- elsif fml.kind_of? XML::Document
38
+ @xml = LibXML::XML::Document.file(fml)
39
+ elsif fml.kind_of? LibXML::XML::Document
40
40
  @xml = fml
41
41
  elsif fml.respond_to?(:read) # IO
42
- @xml = XML::Document.io(fml)
42
+ @xml = LibXML::XML::Document.io(fml)
43
43
  else
44
- raise ArgumentError.new("values must be one of: filename, IO, XML::Document")
44
+ raise ArgumentError.new("values must be one of: filename, IO, LibXML::XML::Document")
45
45
  end
46
46
  end
47
47
 
@@ -71,7 +71,7 @@ module Floorplanner
71
71
  if thumb_node = @xml.find_first('/design/thumb-2d-url')
72
72
  thumb_node.content = thumb_2d_url
73
73
  elsif design_node = @xml.find_first('/design')
74
- thumb_node = XML::Node.new('thumb-2d-url')
74
+ thumb_node = LibXML::XML::Node.new('thumb-2d-url')
75
75
  thumb_node.content = thumb_2d_url
76
76
  design_node << thumb_node
77
77
  else
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dusan Maliarik
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-26 00:00:00 +02:00
17
+ date: 2010-05-18 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency