ruby-fs-stack 0.2.5 → 0.2.6
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.2.
|
1
|
+
0.2.6
|
@@ -186,16 +186,16 @@ module FamilytreeV2
|
|
186
186
|
# communicator.familytree_v2.relationship 'KWQS-BBQ', :parent => 'KWQS-BBT'
|
187
187
|
# communicator.familytree_v2.relationship 'KWQS-BBQ', :parent => 'KWQS-BBT'
|
188
188
|
def relationship(base_id,options)
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
return nil
|
195
|
-
else
|
189
|
+
begin
|
190
|
+
r_type = get_relationship_type(options)
|
191
|
+
with_id = options[r_type.to_sym]
|
192
|
+
url = "#{Base}person/#{base_id}/#{r_type}/#{with_id}"
|
193
|
+
res = @fs_communicator.get(url)
|
196
194
|
familytree = Org::Familysearch::Ws::Familytree::V2::Schema::FamilyTree.from_json JSON.parse(res.body)
|
197
195
|
person = familytree.persons.find{|p|p.id == base_id}
|
198
196
|
return person
|
197
|
+
rescue RubyFsStack::NotFound
|
198
|
+
return nil
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
@@ -334,6 +334,22 @@ module Org::Familysearch::Ws::Familytree::V2::Schema
|
|
334
334
|
end
|
335
335
|
end
|
336
336
|
|
337
|
+
class OrdinanceType
|
338
|
+
|
339
|
+
# Born in Covenant -> Possibly needs to be changed to no underscores
|
340
|
+
# Born_in_Covenant = "Born_in_Covenant"
|
341
|
+
|
342
|
+
# Override the incorrect constants in the enunciate library
|
343
|
+
with_warnings_suppressed do
|
344
|
+
# Sealing to parents.
|
345
|
+
Sealing_to_Parents = "Sealing to Parents"
|
346
|
+
|
347
|
+
# Sealing to spouse.
|
348
|
+
Sealing_to_Spouse = "Sealing to Spouse"
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
|
337
353
|
class OrdinanceValue
|
338
354
|
|
339
355
|
def add_date(value)
|
data/ruby-fs-stack.gemspec
CHANGED
@@ -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.2.
|
8
|
+
s.version = "0.2.6"
|
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{2009-12-
|
12
|
+
s.date = %q{2009-12-17}
|
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 = [
|
@@ -260,10 +260,7 @@ describe FamilytreeV2::Communicator do
|
|
260
260
|
|
261
261
|
describe "for relationships that don't yet exist" do
|
262
262
|
before(:each) do
|
263
|
-
@
|
264
|
-
@res.stub!(:body).and_return(@json)
|
265
|
-
@res.stub!(:code).and_return('404')
|
266
|
-
@fs_com_mock.stub!(:get).and_return(@res)
|
263
|
+
@fs_com_mock.stub!(:get).and_raise(RubyFsStack::NotFound)
|
267
264
|
|
268
265
|
@post_json = read_file('relationship_update.js')
|
269
266
|
@post_res = mock("HTTP::Response")
|
@@ -535,13 +535,13 @@ describe Org::Familysearch::Ws::Familytree::V2::Schema::Person do
|
|
535
535
|
@person.sealing_to_parents.first.value.parents.size.should == 2
|
536
536
|
@person.sealing_to_parents.first.value.parents.find{|p|p.gender == 'Male'}.id.should == 'KWQS-BBQ'
|
537
537
|
@person.sealing_to_parents.first.value.parents.find{|p|p.gender == 'Female'}.id.should == 'KWQS-BBR'
|
538
|
-
@person.sealing_to_parents.first.value.type.should == "
|
538
|
+
@person.sealing_to_parents.first.value.type.should == "Sealing to Parents"
|
539
539
|
|
540
540
|
#sealing_to_spouse
|
541
|
-
@person.create_relationship :type => 'spouse', :with => 'KWQS-BBR', :ordinance => {:date => date, :temple => temple, :place => place, :type => "
|
541
|
+
@person.create_relationship :type => 'spouse', :with => 'KWQS-BBR', :ordinance => {:date => date, :temple => temple, :place => place, :type => "Sealing to Spouse"}
|
542
542
|
@person.sealing_to_spouses('KWQS-BBR').size.should == 1
|
543
543
|
sts = @person.sealing_to_spouses('KWQS-BBR')
|
544
|
-
sts.first.value.type.should == "
|
544
|
+
sts.first.value.type.should == "Sealing to Spouse"
|
545
545
|
sts.first.value.date.original.should == date
|
546
546
|
sts.first.value.temple.should == temple
|
547
547
|
sts.first.value.place.original.should == place
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-fs-stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Zimmerman
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-17 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|