ruby-fs-stack 0.4.10 → 0.4.11

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.10
1
+ 0.4.11
@@ -741,7 +741,7 @@ module Org::Familysearch::Ws::Familytree::V2::Schema
741
741
  # ** :ordinance - a hash with values {:date => '15 Nov 2007', :temple => 'SLAKE', :place => 'Utah, United States', :type => "Sealing_to_Spouse"}
742
742
  def add_relationship(options)
743
743
  g_command = get_command(options[:type])
744
- relationship = self.send(g_command.to_sym).find{|r|r.id == options[:with]}
744
+ relationship = self.send(g_command.to_sym).find{|r|r.id == options[:with] || r.requestedId == options[:with]}
745
745
  if relationship.nil?
746
746
  relationship = Relationship.new
747
747
  relationship.id = options[:with]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-fs-stack}
8
- s.version = "0.4.10"
8
+ s.version = "0.4.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jimmy Zimmerman"]
12
- s.date = %q{2010-04-07}
12
+ s.date = %q{2010-04-30}
13
13
  s.description = %q{A library that enables you to read and update information with the new.familysearch.org API.}
14
14
  s.email = %q{jimmy.zimmerman@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -919,6 +919,22 @@ describe Org::Familysearch::Ws::Familytree::V2::Schema::Person do
919
919
  @person.relationships.spouses[0].assertions.events.size.should == 2
920
920
  end
921
921
 
922
+ it "should be able to build a relationship even if the related person's id has changed" do
923
+ # set up the initial relationship
924
+ @person.create_relationship :type => 'spouse', :with => 'KWQS-BBZ', :event => {:type => 'Marriage',:place =>"Utah, United States", :date => '15 Nov 2007'}
925
+ @person.relationships.spouses.size.should == 1
926
+ @person.relationships.spouses[0].id.should == 'KWQS-BBZ'
927
+ @person.relationships.spouses[0].assertions.events[0].value.type.should == 'Marriage'
928
+ @person.relationships.spouses[0].assertions.events[0].value.date.original.should == '15 Nov 2007'
929
+ @person.relationships.spouses[0].assertions.events[0].value.place.original.should == 'Utah, United States'
930
+ @person.relationships.spouses[0].assertions.exists[0].value.should be_instance_of(Org::Familysearch::Ws::Familytree::V2::Schema::ExistsValue)
931
+ # simulate a change in the related person's ID
932
+ @person.relationships.spouses[0].requestedId = 'KWQS-BBZ'
933
+ @person.relationships.spouses[0].id = 'KWQS-BBR'
934
+ @person.create_relationship :type => 'spouse', :with => 'KWQS-BBZ', :event => {:type => 'Marriage',:place =>"Utah, United States", :date => '15 Nov 2007'}
935
+ @person.relationships.spouses[0].assertions.events.size.should == 2
936
+ end
937
+
922
938
  end
923
939
 
924
940
  describe "create_combine" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 10
9
- version: 0.4.10
8
+ - 11
9
+ version: 0.4.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jimmy Zimmerman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-07 00:00:00 -06:00
17
+ date: 2010-04-30 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency