jimmyz-happymapper 0.3.1 → 0.3.2

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/History CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.2
2
+ * 1 bug fix
3
+ * to_xml_node was blowing up if a non-primitive element was nil. Fixed (jimmyz)
4
+
1
5
  == 0.3.1
2
6
  * 1 minor tweak
3
7
  * Added to_xml and namespace_url code to the family_tree.rb example
data/happymapper.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{happymapper}
5
- s.version = "0.3.1"
5
+ s.version = "0.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["John Nunemaker"]
@@ -64,7 +64,7 @@ module HappyMapper
64
64
  end
65
65
  node
66
66
  else
67
- value.to_xml_node(root_node)
67
+ value.to_xml_node(root_node) unless value.nil?
68
68
  end
69
69
  end
70
70
 
@@ -1,3 +1,3 @@
1
1
  module HappyMapper
2
- Version = '0.3.1'
2
+ Version = '0.3.2'
3
3
  end
@@ -639,6 +639,14 @@ describe HappyMapper do
639
639
  doc.should have_nodes("/posts/@user",0)
640
640
  end
641
641
 
642
+ it "should not serialize elements that are nil" do
643
+ ft = FamilySearch::FamilyTree.new
644
+ #ft has nil persons element should not raise error
645
+ lambda{
646
+ ft.to_xml
647
+ }.should_not raise_error
648
+ end
649
+
642
650
  describe "with namespace url and prefix" do
643
651
  before(:all) do
644
652
  ft = FamilySearch::FamilyTree.parse(fixture_file('family_tree.xml'))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jimmyz-happymapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker