genealogy 2.6.4 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/genealogy/alter_methods.rb +4 -6
- data/lib/genealogy/complex_query_methods.rb +0 -1
- data/lib/genealogy/current_spouse_methods.rb +0 -2
- data/lib/genealogy/genealogy.rb +22 -21
- data/lib/genealogy/ineligible_methods.rb +12 -14
- data/lib/genealogy/query_methods.rb +47 -8
- data/lib/genealogy/util_methods.rb +5 -7
- data/lib/genealogy/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8c2e921b1de225c52799f37886d08b19eaa9b22c43b035df462aa6dc88853a5
|
4
|
+
data.tar.gz: b98bfe7b146347013cff7af6a6018b26c4590744d68fa38dc2a42ce0351ab3fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25540e3f4f05a3cc7cd27d8e3566fa783ac645beab2c270d241f9faf7ef5022cd8585ce82ea8675dc7814df20734719d1ca06fbb5f880bc89997a59277b640a9
|
7
|
+
data.tar.gz: bba098769a2904dadf4cc48fac99e09529a8643916595f2415b48468a1c3256d98b90f1e87117251744fbbcdcb0ed902943fbf4d337ee2a4f237fb12c8516e00
|
@@ -3,8 +3,6 @@ module Genealogy
|
|
3
3
|
module AlterMethods
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
include Constants
|
7
|
-
|
8
6
|
# @!macro [attach] generate
|
9
7
|
# @method add_$1(parent)
|
10
8
|
# Add $1
|
@@ -76,7 +74,7 @@ module Genealogy
|
|
76
74
|
def self.generate_method_add_grandparent(lineage,grandparent)
|
77
75
|
relationship = "#{lineage}_grand#{grandparent}"
|
78
76
|
define_method "add_#{relationship}" do |gp|
|
79
|
-
parent = LINEAGE2PARENT[lineage]
|
77
|
+
parent = gclass::LINEAGE2PARENT[lineage]
|
80
78
|
raise_if_gap_on(parent)
|
81
79
|
check_incompatible_relationship(relationship,gp)
|
82
80
|
send(parent).send("add_#{grandparent}",gp)
|
@@ -95,7 +93,7 @@ module Genealogy
|
|
95
93
|
def self.generate_method_remove_grandparent(lineage,grandparent)
|
96
94
|
relationship = "#{lineage}_grand#{grandparent}"
|
97
95
|
define_method "remove_#{relationship}" do
|
98
|
-
parent = LINEAGE2PARENT[lineage]
|
96
|
+
parent = gclass::LINEAGE2PARENT[lineage]
|
99
97
|
raise_if_gap_on(parent)
|
100
98
|
send(parent).send("remove_#{grandparent}")
|
101
99
|
end
|
@@ -115,7 +113,7 @@ module Genealogy
|
|
115
113
|
def self.generate_method_add_grandparents_by_lineage(lineage)
|
116
114
|
relationship = "#{lineage}_grandparents"
|
117
115
|
define_method "add_#{relationship}" do |gf,gm|
|
118
|
-
parent = LINEAGE2PARENT[lineage]
|
116
|
+
parent = gclass::LINEAGE2PARENT[lineage]
|
119
117
|
raise_if_gap_on(parent)
|
120
118
|
send(parent).send("add_parents",gf,gm)
|
121
119
|
end
|
@@ -131,7 +129,7 @@ module Genealogy
|
|
131
129
|
def self.generate_method_remove_grandparents_by_lineage(lineage)
|
132
130
|
relationship = "#{lineage}_grandparents"
|
133
131
|
define_method "remove_#{relationship}" do
|
134
|
-
parent = LINEAGE2PARENT[lineage]
|
132
|
+
parent = gclass::LINEAGE2PARENT[lineage]
|
135
133
|
raise_if_gap_on(parent)
|
136
134
|
send(parent).send("remove_parents")
|
137
135
|
end
|
data/lib/genealogy/genealogy.rb
CHANGED
@@ -2,9 +2,7 @@ module Genealogy
|
|
2
2
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
include Genealogy::Constants
|
5
|
+
class_methods do
|
8
6
|
|
9
7
|
# gives to ActiveRecord model geneaogy capabilities. Modules UtilMethods QueryMethods IneligibleMethods AlterMethods and SpouseMethods are included
|
10
8
|
# @param [Hash] options
|
@@ -22,16 +20,19 @@ module Genealogy
|
|
22
20
|
|
23
21
|
def has_parents options = {}
|
24
22
|
|
25
|
-
include
|
26
|
-
include
|
27
|
-
include
|
28
|
-
include
|
29
|
-
include
|
30
|
-
include
|
31
|
-
|
23
|
+
include Constants
|
24
|
+
include UtilMethods
|
25
|
+
include QueryMethods
|
26
|
+
include ComplexQueryMethods
|
27
|
+
include IneligibleMethods
|
28
|
+
include AlterMethods
|
29
|
+
include CurrentSpouseMethods
|
32
30
|
|
33
31
|
check_has_parents_options(options)
|
34
32
|
|
33
|
+
# instance_variable_set(:@role_as_relative, nil)
|
34
|
+
attr_accessor :role_as_relative
|
35
|
+
|
35
36
|
# keep track of the original extend class to prevent wrong scopes in query method in case of STI
|
36
37
|
class_attribute :gclass, instance_writer: false
|
37
38
|
self.gclass = self
|
@@ -43,22 +44,22 @@ module Genealogy
|
|
43
44
|
class_attribute :ineligibility_level, instance_accessor: false
|
44
45
|
self.ineligibility_level = case options[:ineligibility]
|
45
46
|
when :pedigree
|
46
|
-
PEDIGREE
|
47
|
+
gclass::PEDIGREE
|
47
48
|
when true
|
48
|
-
PEDIGREE
|
49
|
+
gclass::PEDIGREE
|
49
50
|
when :pedigree_and_dates
|
50
|
-
PEDIGREE_AND_DATES
|
51
|
+
gclass::PEDIGREE_AND_DATES
|
51
52
|
when false
|
52
|
-
OFF
|
53
|
+
gclass::OFF
|
53
54
|
when nil
|
54
|
-
PEDIGREE
|
55
|
+
gclass::PEDIGREE
|
55
56
|
else
|
56
57
|
raise ArgumentError, "ineligibility option must be one among :pedigree, :pedigree_and_dates or false"
|
57
58
|
end
|
58
59
|
|
59
60
|
## limit_ages
|
60
|
-
if ineligibility_level >= PEDIGREE_AND_DATES
|
61
|
-
DEFAULTS[:limit_ages].each do |age,v|
|
61
|
+
if ineligibility_level >= gclass::PEDIGREE_AND_DATES
|
62
|
+
gclass::DEFAULTS[:limit_ages].each do |age,v|
|
62
63
|
class_attribute age, instance_accessor: false
|
63
64
|
self.send("#{age}=", options[:limit_ages].try(:[],age) || v)
|
64
65
|
end
|
@@ -67,12 +68,12 @@ module Genealogy
|
|
67
68
|
[:current_spouse, :perform_validation].each do |opt|
|
68
69
|
ca = "#{opt}_enabled"
|
69
70
|
class_attribute ca, instance_accessor: false
|
70
|
-
self.send "#{ca}=", options.key?(opt) ? options[opt] : DEFAULTS[opt]
|
71
|
+
self.send "#{ca}=", options.key?(opt) ? options[opt] : gclass::DEFAULTS[opt]
|
71
72
|
end
|
72
73
|
|
73
74
|
|
74
75
|
# column names class attributes
|
75
|
-
DEFAULTS[:column_names].merge(options[:column_names]).each do |k,v|
|
76
|
+
gclass::DEFAULTS[:column_names].merge(options[:column_names]).each do |k,v|
|
76
77
|
class_attribute_name = "#{k}_column"
|
77
78
|
class_attribute class_attribute_name, instance_accessor: false
|
78
79
|
self.send("#{class_attribute_name}=", v)
|
@@ -81,7 +82,7 @@ module Genealogy
|
|
81
82
|
|
82
83
|
## sex
|
83
84
|
class_attribute :sex_values, :sex_male_value, :sex_female_value, instance_accessor: false
|
84
|
-
self.sex_values = options[:sex_values] || DEFAULTS[:sex_values]
|
85
|
+
self.sex_values = options[:sex_values] || gclass::DEFAULTS[:sex_values]
|
85
86
|
self.sex_male_value = self.sex_values.first
|
86
87
|
self.sex_female_value = self.sex_values.last
|
87
88
|
|
@@ -95,7 +96,7 @@ module Genealogy
|
|
95
96
|
belongs_to_options = {class_name: self.name}
|
96
97
|
belongs_to_options[:optional] = true if Gem::Specification.find_by_name('activerecord').version >= Gem::Version.new("5")
|
97
98
|
tracked_relatives.each do |k|
|
98
|
-
belongs_to k, belongs_to_options.merge(foreign_key: self.send("#{k}_id_column"))
|
99
|
+
belongs_to k, **belongs_to_options.merge(foreign_key: self.send("#{k}_id_column"))
|
99
100
|
end
|
100
101
|
|
101
102
|
has_many :children_as_father, class_name: self.name, foreign_key: self.father_id_column, dependent: :nullify
|
@@ -4,8 +4,6 @@ module Genealogy
|
|
4
4
|
module IneligibleMethods
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
-
include Constants
|
8
|
-
|
9
7
|
# @!macro [attach] generate_method_ineligibles_parent_with_docs
|
10
8
|
# @method ineligible_$1s
|
11
9
|
# list of individual who cannot be $1 according to the ineligibility level in use.
|
@@ -16,8 +14,8 @@ module Genealogy
|
|
16
14
|
define_method "ineligible_#{parent_role}s" do
|
17
15
|
unless self.send(parent_role)
|
18
16
|
ineligibles = []
|
19
|
-
ineligibles |= descendants | [self] | gclass.send("#{unexpected_sex}s") if gclass.ineligibility_level >= PEDIGREE
|
20
|
-
if gclass.ineligibility_level >= PEDIGREE_AND_DATES and birth_range
|
17
|
+
ineligibles |= descendants | [self] | gclass.send("#{unexpected_sex}s") if gclass.ineligibility_level >= gclass::PEDIGREE
|
18
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE_AND_DATES and birth_range
|
21
19
|
ineligibles |= (gclass.all - ineligibles).find_all do |indiv|
|
22
20
|
!indiv.can_procreate_during?(birth_range)
|
23
21
|
end
|
@@ -43,9 +41,9 @@ module Genealogy
|
|
43
41
|
ineligibles = []
|
44
42
|
if parent = send(parent_role)
|
45
43
|
ineligibles |= parent.send("ineligible_#{grandparent2parent_role}s")
|
46
|
-
elsif gclass.ineligibility_level >= PEDIGREE
|
44
|
+
elsif gclass.ineligibility_level >= gclass::PEDIGREE
|
47
45
|
ineligibles |= descendants | siblings | [self] | gclass.send("#{unexpected_sex}s")
|
48
|
-
if gclass.ineligibility_level >= PEDIGREE_AND_DATES
|
46
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE_AND_DATES
|
49
47
|
ineligibles |= (gclass.all - ineligibles).find_all do |indiv|
|
50
48
|
!indiv.can_procreate_during?(send("#{parent_role}_birth_range"))
|
51
49
|
end
|
@@ -67,8 +65,8 @@ module Genealogy
|
|
67
65
|
# @return [Array]
|
68
66
|
def ineligible_children
|
69
67
|
ineligibles = []
|
70
|
-
ineligibles |= ancestors | children | siblings | [self] | gclass.all_with(SEX2PARENT[ssex]) if gclass.ineligibility_level >= PEDIGREE
|
71
|
-
if gclass.ineligibility_level >= PEDIGREE_AND_DATES and fertility_range
|
68
|
+
ineligibles |= ancestors | children | siblings | [self] | gclass.all_with(gclass::SEX2PARENT[ssex]) if gclass.ineligibility_level >= gclass::PEDIGREE
|
69
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE_AND_DATES and fertility_range
|
72
70
|
ineligibles |= (gclass.all - ineligibles).find_all{ |indiv| !can_procreate_during?(indiv.birth_range)}
|
73
71
|
end
|
74
72
|
ineligibles
|
@@ -81,12 +79,12 @@ module Genealogy
|
|
81
79
|
# @return [Array]
|
82
80
|
def ineligible_siblings
|
83
81
|
ineligibles = []
|
84
|
-
if gclass.ineligibility_level >= PEDIGREE
|
82
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE
|
85
83
|
ineligibles |= ancestors | descendants | siblings | [self]
|
86
84
|
ineligibles |= (father ? gclass.all_with(:father).where("father_id != ?", father) : [])
|
87
85
|
ineligibles |= (mother ? gclass.all_with(:mother).where("mother_id != ?", mother) : [])
|
88
86
|
end
|
89
|
-
if gclass.ineligibility_level >= PEDIGREE_AND_DATES
|
87
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE_AND_DATES
|
90
88
|
[:father,:mother].each do |parent|
|
91
89
|
if p = send(parent)
|
92
90
|
# if a parent is present ineligible siblings are parent's ineligible children
|
@@ -118,14 +116,14 @@ module Genealogy
|
|
118
116
|
def self.generate_method_ineligibles_half_siblings_with_docs(lineage,parent_role)
|
119
117
|
define_method "ineligible_#{lineage}_half_siblings" do
|
120
118
|
ineligibles = []
|
121
|
-
parent = LINEAGE2PARENT[lineage]
|
119
|
+
parent = gclass::LINEAGE2PARENT[lineage]
|
122
120
|
p = send(parent)
|
123
|
-
if gclass.ineligibility_level >= PEDIGREE
|
121
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE
|
124
122
|
ineligibles |= p.ineligible_children
|
125
|
-
ineligibles |= send("#{OPPOSITELINEAGE[lineage]}_half_siblings") # other lineage half siblings would become full siblings so they cannot be current lineage half sibling
|
123
|
+
ineligibles |= send("#{gclass::OPPOSITELINEAGE[lineage]}_half_siblings") # other lineage half siblings would become full siblings so they cannot be current lineage half sibling
|
126
124
|
ineligibles |= gclass.all_with(parent)
|
127
125
|
end
|
128
|
-
if gclass.ineligibility_level >= PEDIGREE_AND_DATES
|
126
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE_AND_DATES
|
129
127
|
if p
|
130
128
|
# if a parent is present ineligible siblings are parent's ineligible children
|
131
129
|
ineligibles |= p.ineligible_children
|
@@ -3,8 +3,6 @@ module Genealogy
|
|
3
3
|
module QueryMethods
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
include Constants
|
7
|
-
|
8
6
|
# @return [2-elements Array] father and mother
|
9
7
|
def parents
|
10
8
|
[father,mother]
|
@@ -51,17 +49,17 @@ module Genealogy
|
|
51
49
|
# @return [ActiveRecord::Relation] children
|
52
50
|
def children(options = {})
|
53
51
|
raise SexError, "Sex value not valid for #{self}. It's needed to look for children" unless gclass.sex_values.include? sex_before_type_cast
|
54
|
-
result = gclass.where("#{SEX2PARENT[ssex]}_id" => self)
|
52
|
+
result = gclass.where("#{gclass::SEX2PARENT[ssex]}_id" => self)
|
55
53
|
if options.keys.include? :spouse
|
56
54
|
check_indiv(spouse = options[:spouse],opposite_ssex)
|
57
|
-
result = result.where("#{SEX2PARENT[opposite_ssex]}_id" => spouse ) if spouse
|
55
|
+
result = result.where("#{gclass::SEX2PARENT[opposite_ssex]}_id" => spouse ) if spouse
|
58
56
|
end
|
59
57
|
result
|
60
58
|
end
|
61
59
|
|
62
60
|
# @return [ActiveRecord::Relation] list of individuals with whom has had children
|
63
61
|
def spouses
|
64
|
-
gclass.where(id: children.pluck("#{SEX2PARENT[opposite_ssex]}_id".to_sym).compact.uniq) | (self.class.current_spouse_enabled ? [] : [current_spouse])
|
62
|
+
gclass.where(id: children.pluck("#{gclass::SEX2PARENT[opposite_ssex]}_id".to_sym).compact.uniq) | (self.class.current_spouse_enabled ? [] : [current_spouse])
|
65
63
|
end
|
66
64
|
|
67
65
|
# @param [Hash] options
|
@@ -275,6 +273,7 @@ module Genealogy
|
|
275
273
|
# family hash with roles as keys? :spouse and individuals as values. Defaults roles are :father, :mother, :children, :siblings and current_spouse if enabled
|
276
274
|
# @option options [Symbol] half to filter siblings (see #siblings)
|
277
275
|
# @option options [Boolean] extended to include roles for grandparents, grandchildren, uncles, aunts, nieces, nephews and cousins
|
276
|
+
# @option options [Boolean] singular_role to use singularized role as keys
|
278
277
|
# @return [Hash] family hash with roles as keys? :spouse and individuals as values.
|
279
278
|
def family_hash(options = {})
|
280
279
|
roles = [:father, :mother, :children, :siblings]
|
@@ -294,7 +293,42 @@ module Genealogy
|
|
294
293
|
raise ArgumentError, "Admitted values for :half options are: :father, :mother, :include, :include_separately, nil"
|
295
294
|
end
|
296
295
|
roles += [:paternal_grandfather, :paternal_grandmother, :maternal_grandfather, :maternal_grandmother, :grandchildren, :uncles_and_aunts, :nieces_and_nephews, :cousins] if options[:extended] == true
|
297
|
-
roles.inject({}){|res,role| res.merge!({role => self.send(role)})}
|
296
|
+
res = roles.inject({}){|res,role| res.merge!({role => self.send(role)})}
|
297
|
+
if options[:singular_role] == true
|
298
|
+
res2 = {
|
299
|
+
father: res[:father],
|
300
|
+
mother: res[:mother],
|
301
|
+
daughter: res[:children].females,
|
302
|
+
son: res[:children].males,
|
303
|
+
sister: res[:siblings].females,
|
304
|
+
brother: res[:siblings].males
|
305
|
+
}
|
306
|
+
|
307
|
+
res2[:current_spouse] = res[:current_spouse] if res.has_key? :current_spouse
|
308
|
+
|
309
|
+
res2.merge!({
|
310
|
+
paternal_grandfather: res[:paternal_grandfather],
|
311
|
+
paternal_grandmother: res[:paternal_grandmother],
|
312
|
+
maternal_grandfather: res[:maternal_grandfather],
|
313
|
+
maternal_grandmother: res[:maternal_grandmother],
|
314
|
+
grandchild: res[:grandchildren],
|
315
|
+
uncle: res[:uncles_and_aunts].males,
|
316
|
+
aunts: res[:uncles_and_aunts].females,
|
317
|
+
nephew: res[:nieces_and_nephews].males,
|
318
|
+
niece: res[:nieces_and_nephews].females,
|
319
|
+
cousin: res[:cousins]
|
320
|
+
}) if options[:extended] == true
|
321
|
+
|
322
|
+
res2.merge!({
|
323
|
+
paternal_half_brother: res[:paternal_half_siblings].males,
|
324
|
+
paternal_half_sister: res[:paternal_half_siblings].females,
|
325
|
+
maternal_half_brother: res[:maternal_half_siblings].males,
|
326
|
+
maternal_half_sister: res[:maternal_half_siblings].females,
|
327
|
+
}) if options[:half] == :include_separately
|
328
|
+
|
329
|
+
res = res2
|
330
|
+
end
|
331
|
+
res
|
298
332
|
end
|
299
333
|
|
300
334
|
# family_hash with option extended: :true
|
@@ -307,8 +341,13 @@ module Genealogy
|
|
307
341
|
# @return [Array]
|
308
342
|
# @see #family_hash
|
309
343
|
def family(options = {})
|
310
|
-
|
311
|
-
|
344
|
+
family_hash(options).inject([]) do |memo, r|
|
345
|
+
[r.last].compact.flatten.each do |relative|
|
346
|
+
relative.role_as_relative = r.first.to_s.singularize.to_sym
|
347
|
+
memo << relative
|
348
|
+
end
|
349
|
+
memo
|
350
|
+
end
|
312
351
|
end
|
313
352
|
|
314
353
|
# family with option extended: :true
|
@@ -3,8 +3,6 @@ module Genealogy
|
|
3
3
|
module UtilMethods
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
include Constants
|
7
|
-
|
8
6
|
# Genealogy thinks time in term of Date, not DateTime
|
9
7
|
# @return [Date]
|
10
8
|
def birth
|
@@ -80,9 +78,9 @@ module Genealogy
|
|
80
78
|
def self.generate_method_parent_birth_range(parent)
|
81
79
|
define_method "#{parent}_birth_range" do
|
82
80
|
if birth
|
83
|
-
(birth - gclass.send("max_#{PARENT2SEX[parent]}_procreation_age").years)..(birth - gclass.send("min_#{PARENT2SEX[parent]}_procreation_age").years)
|
81
|
+
(birth - gclass.send("max_#{gclass::PARENT2SEX[parent]}_procreation_age").years)..(birth - gclass.send("min_#{gclass::PARENT2SEX[parent]}_procreation_age").years)
|
84
82
|
elsif life_range
|
85
|
-
(life_range.begin - gclass.send("max_#{PARENT2SEX[parent]}_procreation_age").years)..(life_range.end - gclass.send("min_#{PARENT2SEX[parent]}_procreation_age").years)
|
83
|
+
(life_range.begin - gclass.send("max_#{gclass::PARENT2SEX[parent]}_procreation_age").years)..(life_range.end - gclass.send("min_#{gclass::PARENT2SEX[parent]}_procreation_age").years)
|
86
84
|
end
|
87
85
|
end
|
88
86
|
end
|
@@ -96,7 +94,7 @@ module Genealogy
|
|
96
94
|
def self.generate_method_parent_fertility_range(parent)
|
97
95
|
define_method "#{parent}_fertility_range" do
|
98
96
|
if parent_birth_range = send("#{parent}_birth_range")
|
99
|
-
(parent_birth_range.begin + gclass.send("min_#{PARENT2SEX[parent]}_procreation_age").years)..(parent_birth_range.end + gclass.send("max_#{PARENT2SEX[parent]}_procreation_age").years)
|
97
|
+
(parent_birth_range.begin + gclass.send("min_#{gclass::PARENT2SEX[parent]}_procreation_age").years)..(parent_birth_range.end + gclass.send("max_#{gclass::PARENT2SEX[parent]}_procreation_age").years)
|
100
98
|
end
|
101
99
|
end
|
102
100
|
end
|
@@ -119,7 +117,7 @@ module Genealogy
|
|
119
117
|
# opposite sex in terms of :male or :female
|
120
118
|
# @return [Symbol]
|
121
119
|
def opposite_ssex
|
122
|
-
OPPOSITESEX[ssex]
|
120
|
+
gclass::OPPOSITESEX[ssex]
|
123
121
|
end
|
124
122
|
|
125
123
|
# @return [Boolean]
|
@@ -160,7 +158,7 @@ module Genealogy
|
|
160
158
|
# puts "[#{__method__}]: #{arg} class: #{arg.class}, #{self} class: #{self.class}"
|
161
159
|
next if relative.nil?
|
162
160
|
check_indiv(relative)
|
163
|
-
if gclass.ineligibility_level >= PEDIGREE
|
161
|
+
if gclass.ineligibility_level >= gclass::PEDIGREE
|
164
162
|
if ineligibles = self.send("ineligible_#{relationship.to_s.pluralize}")
|
165
163
|
# puts "[#{__method__}]: checking if #{relative} can be #{relationship} of #{self}"
|
166
164
|
raise IncompatibleRelationshipException, "#{relative} can't be #{relationship} of #{self}" if ineligibles.include? relative
|
data/lib/genealogy/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genealogy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- masciugo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -257,7 +257,7 @@ homepage: https://github.com/masciugo/genealogy
|
|
257
257
|
licenses:
|
258
258
|
- MIT
|
259
259
|
metadata: {}
|
260
|
-
post_install_message:
|
260
|
+
post_install_message:
|
261
261
|
rdoc_options: []
|
262
262
|
require_paths:
|
263
263
|
- lib
|
@@ -272,8 +272,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
rubygems_version: 3.
|
276
|
-
signing_key:
|
275
|
+
rubygems_version: 3.3.7
|
276
|
+
signing_key:
|
277
277
|
specification_version: 4
|
278
278
|
summary: Make ActiveRecord model act as a pedigree
|
279
279
|
test_files: []
|