genealogy 2.7.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/genealogy/constants.rb +48 -53
- data/lib/genealogy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 125160d20e6f4039c63694f5ef1eab14b51194a43b96b35fcc6cc6f9f80d3eb0
|
4
|
+
data.tar.gz: 56735f57b37a74ef58b0dddf68ed8738c42507f99bf76a09f9f7ba8c1ac5438e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f0b5c623af04f3fa168c12e17c7ce4940ca6d676391054fc05835b9e422196773118c6582a8af5017d2a8b0d48ae2bf3defd826f86aceab3368fca60947ab80
|
7
|
+
data.tar.gz: 06000f70b529ec822ab08eb934389ba75a33ea16ca71c554ca12895b77ed396bc995c8bbb979b044428ff68a7f8d9942644892221d81c80c56833a638580cb68
|
data/lib/genealogy/constants.rb
CHANGED
@@ -1,61 +1,56 @@
|
|
1
1
|
module Genealogy
|
2
2
|
module Constants
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
max_female_procreation_age: 50,
|
25
|
-
max_male_life_expectancy: 110,
|
26
|
-
max_female_life_expectancy: 110
|
27
|
-
}
|
3
|
+
# deafault options for has_parent method
|
4
|
+
DEFAULTS = {
|
5
|
+
column_names: {
|
6
|
+
sex: 'sex',
|
7
|
+
father_id: 'father_id',
|
8
|
+
mother_id: 'mother_id',
|
9
|
+
current_spouse_id: 'current_spouse_id',
|
10
|
+
birth_date: 'birth_date',
|
11
|
+
death_date: 'death_date'
|
12
|
+
},
|
13
|
+
perform_validation: true,
|
14
|
+
ineligibility: :pedigree,
|
15
|
+
current_spouse: false,
|
16
|
+
sex_values: ['M','F'],
|
17
|
+
limit_ages: {
|
18
|
+
min_male_procreation_age: 12,
|
19
|
+
max_male_procreation_age: 75,
|
20
|
+
min_female_procreation_age: 9,
|
21
|
+
max_female_procreation_age: 50,
|
22
|
+
max_male_life_expectancy: 110,
|
23
|
+
max_female_life_expectancy: 110
|
28
24
|
}
|
25
|
+
}
|
29
26
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
base.const_set :PARENT2LINEAGE, ActiveSupport::HashWithIndifferentAccess.new({ father: :paternal, mother: :maternal })
|
36
|
-
base.const_set :LINEAGE2PARENT, ActiveSupport::HashWithIndifferentAccess.new({ paternal: :father, maternal: :mother })
|
37
|
-
base.const_set :OPPOSITELINEAGE, ActiveSupport::HashWithIndifferentAccess.new({ paternal: :maternal, maternal: :paternal })
|
38
|
-
base.const_set :PARENT2SEX, ActiveSupport::HashWithIndifferentAccess.new({ father: :male, mother: :female })
|
39
|
-
base.const_set :SEX2PARENT, ActiveSupport::HashWithIndifferentAccess.new({ male: :father, female: :mother })
|
40
|
-
base.const_set :OPPOSITESEX, ActiveSupport::HashWithIndifferentAccess.new({male: :female, female: :male})
|
27
|
+
# ineligibility levels
|
28
|
+
PEDIGREE = 1
|
29
|
+
PEDIGREE_AND_DATES = 2
|
30
|
+
OFF = 0
|
41
31
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
maternal_grandmother: "MGM",
|
49
|
-
children: "C",
|
50
|
-
siblings: "S",
|
51
|
-
half_siblings: "HS",
|
52
|
-
paternal_half_siblings: "PHS",
|
53
|
-
maternal_half_siblings: "MHS",
|
54
|
-
grandchildren: "GC",
|
55
|
-
uncles_and_aunts: "U&A",
|
56
|
-
nieces_and_nephews: "N&N"
|
57
|
-
})
|
32
|
+
PARENT2LINEAGE = ActiveSupport::HashWithIndifferentAccess.new({ father: :paternal, mother: :maternal })
|
33
|
+
LINEAGE2PARENT = ActiveSupport::HashWithIndifferentAccess.new({ paternal: :father, maternal: :mother })
|
34
|
+
OPPOSITELINEAGE = ActiveSupport::HashWithIndifferentAccess.new({ paternal: :maternal, maternal: :paternal })
|
35
|
+
PARENT2SEX = ActiveSupport::HashWithIndifferentAccess.new({ father: :male, mother: :female })
|
36
|
+
SEX2PARENT = ActiveSupport::HashWithIndifferentAccess.new({ male: :father, female: :mother })
|
37
|
+
OPPOSITESEX = ActiveSupport::HashWithIndifferentAccess.new({male: :female, female: :male})
|
58
38
|
|
59
|
-
|
39
|
+
AKA = ActiveSupport::HashWithIndifferentAccess.new({
|
40
|
+
father: "F",
|
41
|
+
mother: "M",
|
42
|
+
paternal_grandfather: "PGF",
|
43
|
+
paternal_grandmother: "PGM",
|
44
|
+
maternal_grandfather: "MGF",
|
45
|
+
maternal_grandmother: "MGM",
|
46
|
+
children: "C",
|
47
|
+
siblings: "S",
|
48
|
+
half_siblings: "HS",
|
49
|
+
paternal_half_siblings: "PHS",
|
50
|
+
maternal_half_siblings: "MHS",
|
51
|
+
grandchildren: "GC",
|
52
|
+
uncles_and_aunts: "U&A",
|
53
|
+
nieces_and_nephews: "N&N"
|
54
|
+
})
|
60
55
|
end
|
61
56
|
end
|
data/lib/genealogy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genealogy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- masciugo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|