yaxml 0.0.9 → 0.1

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/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.0.9" + (REV ? ".#{REV}" : "")
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
- Thu, 02 Apr 2009 12:04:53 +0200
1
+ Sat, 07 Jan 2012 20:34:32 +0100
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 02 09:58:58 +0200 2009</td>
59
+ <td>Sun Dec 11 23:15:14 +0100 2011</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 02 09:58:58 +0200 2009</td>
59
+ <td>Sun Dec 11 23:15:14 +0100 2011</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 02 12:04:45 +0200 2009</td>
59
+ <td>Sun Dec 11 23:15:14 +0100 2011</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 02 09:58:58 +0200 2009</td>
59
+ <td>Sun Dec 11 23:15:14 +0100 2011</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
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
@@ -10,6 +10,7 @@ bill-to: &id001
10
10
  city : Royal Oak
11
11
  state : MI
12
12
  postal : 48046
13
+ empty: ""
13
14
  ship-to: *id001
14
15
  product:
15
16
  - sku : BL394D
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.0.9
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: 2009-04-02 00:00:00 +02:00
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/classes/YAXML.html
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/files/CHANGELOG.html
47
- - doc/rdoc/files/README.html
48
- - test/test_simple_parser.rb
49
- - test/load_files.rb
50
- - test/test_complex_parser.rb
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/