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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 639bb06863d19cad4c662b7850f4e4bb543bb7f0b9fd5154816b0fda326056d8
4
- data.tar.gz: e64f5b21c41397ee24f45591f81c651c0d876413dbb302586c8a8db147696805
3
+ metadata.gz: 125160d20e6f4039c63694f5ef1eab14b51194a43b96b35fcc6cc6f9f80d3eb0
4
+ data.tar.gz: 56735f57b37a74ef58b0dddf68ed8738c42507f99bf76a09f9f7ba8c1ac5438e
5
5
  SHA512:
6
- metadata.gz: cb37b3ef1a4414dcd3d505102cdd05699663ed5d0da01e2d0fc26fe8364b6d03f377f3f132e226532089e7893e8051354f43690175b0fcdb7f78d7820483d233
7
- data.tar.gz: 2e238f05371e623cc1de5318bbe3453c968d66f85edeb698f07fb5fe50f34f8b441c193ea73c4ee7bb6a56a3cfb11533ac06c60ad7fbc737d80fb358065751db
6
+ metadata.gz: 1f0b5c623af04f3fa168c12e17c7ce4940ca6d676391054fc05835b9e422196773118c6582a8af5017d2a8b0d48ae2bf3defd826f86aceab3368fca60947ab80
7
+ data.tar.gz: 06000f70b529ec822ab08eb934389ba75a33ea16ca71c554ca12895b77ed396bc995c8bbb979b044428ff68a7f8d9942644892221d81c80c56833a638580cb68
@@ -1,61 +1,56 @@
1
1
  module Genealogy
2
2
  module Constants
3
- extend ActiveSupport::Concern
4
-
5
- included do |base|
6
- # deafault options for has_parent method
7
- base.const_set :DEFAULTS, {
8
- column_names: {
9
- sex: 'sex',
10
- father_id: 'father_id',
11
- mother_id: 'mother_id',
12
- current_spouse_id: 'current_spouse_id',
13
- birth_date: 'birth_date',
14
- death_date: 'death_date'
15
- },
16
- perform_validation: true,
17
- ineligibility: :pedigree,
18
- current_spouse: false,
19
- sex_values: ['M','F'],
20
- limit_ages: {
21
- min_male_procreation_age: 12,
22
- max_male_procreation_age: 75,
23
- min_female_procreation_age: 9,
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
- # ineligibility levels
31
- base.const_set :PEDIGREE, 1
32
- base.const_set :PEDIGREE_AND_DATES, 2
33
- base.const_set :OFF, 0
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
- base.const_set :AKA, ActiveSupport::HashWithIndifferentAccess.new({
43
- father: "F",
44
- mother: "M",
45
- paternal_grandfather: "PGF",
46
- paternal_grandmother: "PGM",
47
- maternal_grandfather: "MGF",
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
- end
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
@@ -1,3 +1,3 @@
1
1
  module Genealogy
2
- VERSION = "2.7.0"
2
+ VERSION = "2.7.1"
3
3
  end
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.0
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-24 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord