yaxml 0.0.9 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGELOG.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +1 -1
- data/doc/rdoc/files/lib/yaxml_rb.html +1 -1
- data/lib/yaxml.rb +1 -1
- data/test/files/test.xml +2 -2
- data/test/files/test.yml +1 -0
- metadata +15 -15
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ include FileUtils
|
|
8
8
|
|
9
9
|
NAME = "yaxml"
|
10
10
|
REV = `svn info`[/Revision: (\d+)/, 1] rescue nil
|
11
|
-
VERS = ENV['VERSION'] || "0.
|
11
|
+
VERS = ENV['VERSION'] || "0.1" + (REV ? ".#{REV}" : "")
|
12
12
|
PKG = "#{NAME}-#{VERS}"
|
13
13
|
RDOC_OPTS = ['--quiet', '--title', 'The YAXML Module Reference', '--main', 'README', '--inline-source']
|
14
14
|
PKG_FILES = %w(CHANGELOG LICENSE README Rakefile) + Dir.glob("{doc,test,lib}/**/*")
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sat, 07 Jan 2012 20:34:32 +0100
|
data/doc/rdoc/files/LICENSE.html
CHANGED
data/doc/rdoc/files/README.html
CHANGED
data/lib/yaxml.rb
CHANGED
@@ -316,7 +316,7 @@ module YAXML
|
|
316
316
|
end
|
317
317
|
|
318
318
|
xml_node.elements.each do |el|
|
319
|
-
new_element = (el.has_elements?)? self.yaxmlnode2json( el ) : el.text.strip
|
319
|
+
new_element = (el.has_elements?)? self.yaxmlnode2json( el ) : el.text ? el.text.strip : ""
|
320
320
|
self.add_to_parent( new_element, parent, first_element, el.name )
|
321
321
|
end
|
322
322
|
|
data/test/files/test.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<invoice xmlns:yaml='http://yaml.org/xml'><tax>251.42</tax><number>34843</number><comments>Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.</comments><ship-to><address><city>Royal Oak</city><postal>48046</postal><lines>458 Walkman Dr.
|
2
2
|
Suite #292
|
3
|
-
</lines><state>MI</state></address><family>Dumars</family><given>Chris</given></ship-to><bill-to><address><city>Royal Oak</city><postal>48046</postal><lines>458 Walkman Dr.
|
3
|
+
</lines><empty></empty><state>MI</state></address><family>Dumars</family><given>Chris</given></ship-to><bill-to><address><city>Royal Oak</city><postal>48046</postal><lines>458 Walkman Dr.
|
4
4
|
Suite #292
|
5
|
-
</lines><state>MI</state></address><family>Dumars</family><given>Chris</given></bill-to><total>4443.52</total><date>2001-01-23</date><product><_><price>450.0</price><quantity>4</quantity><sku>BL394D</sku><description>Basketball</description></_><_><price>2392.0</price><quantity>1</quantity><sku>BL4438H</sku><description>Super Hoop</description></_></product></invoice>
|
5
|
+
</lines><empty></empty><state>MI</state></address><family>Dumars</family><given>Chris</given></bill-to><total>4443.52</total><date>2001-01-23</date><product><_><price>450.0</price><quantity>4</quantity><sku>BL394D</sku><description>Basketball</description></_><_><price>2392.0</price><quantity>1</quantity><sku>BL4438H</sku><description>Super Hoop</description></_></product></invoice>
|
data/test/files/test.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: "0.1"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Moreno
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2012-01-07 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -29,30 +29,30 @@ files:
|
|
29
29
|
- README
|
30
30
|
- Rakefile
|
31
31
|
- doc/rdoc
|
32
|
-
- doc/rdoc/fr_method_index.html
|
33
|
-
- doc/rdoc/fr_file_index.html
|
34
|
-
- doc/rdoc/created.rid
|
35
|
-
- doc/rdoc/rdoc-style.css
|
36
32
|
- doc/rdoc/classes
|
33
|
+
- doc/rdoc/classes/YAXML.html
|
37
34
|
- doc/rdoc/classes/YAXML
|
38
35
|
- doc/rdoc/classes/YAXML/Yaxml.html
|
39
|
-
- doc/rdoc/
|
40
|
-
- doc/rdoc/index.html
|
41
|
-
- doc/rdoc/fr_class_index.html
|
36
|
+
- doc/rdoc/created.rid
|
42
37
|
- doc/rdoc/files
|
38
|
+
- doc/rdoc/files/CHANGELOG.html
|
43
39
|
- doc/rdoc/files/LICENSE.html
|
40
|
+
- doc/rdoc/files/README.html
|
44
41
|
- doc/rdoc/files/lib
|
45
42
|
- doc/rdoc/files/lib/yaxml_rb.html
|
46
|
-
- doc/rdoc/
|
47
|
-
- doc/rdoc/
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
43
|
+
- doc/rdoc/fr_class_index.html
|
44
|
+
- doc/rdoc/fr_file_index.html
|
45
|
+
- doc/rdoc/fr_method_index.html
|
46
|
+
- doc/rdoc/index.html
|
47
|
+
- doc/rdoc/rdoc-style.css
|
51
48
|
- test/files
|
52
|
-
- test/files/test.yml
|
53
49
|
- test/files/simple_test.xml
|
54
50
|
- test/files/simple_test.yml
|
55
51
|
- test/files/test.xml
|
52
|
+
- test/files/test.yml
|
53
|
+
- test/load_files.rb
|
54
|
+
- test/test_complex_parser.rb
|
55
|
+
- test/test_simple_parser.rb
|
56
56
|
- lib/yaxml.rb
|
57
57
|
has_rdoc: true
|
58
58
|
homepage: http://yaxml.rubyforge.com/
|