genealogy 2.5.1 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/genealogy/current_spouse_methods.rb +4 -4
- data/lib/genealogy/query_methods.rb +1 -1
- data/lib/genealogy/version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f461fa3a5e968d7f272d1a9ef1f20bc2108f60a6749e8e94046c2653112d66
|
4
|
+
data.tar.gz: 609016f406c5bfe72820be1736181232960b018b48ca16662cf1470bad729df4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0feff7049a767fb26e7a77cbd350973979ec85dcac616cc33d6e3a5b524d57f560a717181dac7f59c19724ef75259d371e62430c79e09708fd4ec439c3e2ef88
|
7
|
+
data.tar.gz: 392c130489392630814de7197dda4231c60e8a0607be6973e7328ce172e70ec480435ee21de6deaa24304255a0bb17ae6f90b7ea6220a33e9ffbe90127210576
|
@@ -7,7 +7,7 @@ module Genealogy
|
|
7
7
|
|
8
8
|
# add current spouse updating receiver and argument individuals foreign_key in a transaction
|
9
9
|
# @param [Object] spouse
|
10
|
-
# @return [Boolean]
|
10
|
+
# @return [Boolean]
|
11
11
|
def add_current_spouse(spouse)
|
12
12
|
|
13
13
|
raise_unless_current_spouse_enabled
|
@@ -30,7 +30,7 @@ module Genealogy
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# remove current spouse resetting receiver and argument individuals foreign_key in a transaction
|
33
|
-
# @return [Boolean]
|
33
|
+
# @return [Boolean]
|
34
34
|
def remove_current_spouse
|
35
35
|
raise_unless_current_spouse_enabled
|
36
36
|
if gclass.perform_validation_enabled
|
@@ -59,8 +59,8 @@ module Genealogy
|
|
59
59
|
private
|
60
60
|
|
61
61
|
def raise_unless_current_spouse_enabled
|
62
|
-
raise FeatureNotEnabled, "Spouse tracking not enabled. Enable it with option '
|
62
|
+
raise FeatureNotEnabled, "Spouse tracking not enabled. Enable it with option 'current_spouse: true' for has_parents method}" unless self.class.current_spouse_enabled
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
66
|
-
end
|
66
|
+
end
|
@@ -61,7 +61,7 @@ module Genealogy
|
|
61
61
|
|
62
62
|
# @return [ActiveRecord::Relation] list of individuals with whom has had children
|
63
63
|
def spouses
|
64
|
-
gclass.where(id: children.pluck("#{SEX2PARENT[opposite_ssex]}_id".to_sym).compact.uniq)
|
64
|
+
gclass.where(id: children.pluck("#{SEX2PARENT[opposite_ssex]}_id".to_sym).compact.uniq) | (self.class.current_spouse_enabled ? [] : [current_spouse])
|
65
65
|
end
|
66
66
|
|
67
67
|
# @param [Hash] options
|
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.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- masciugo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.4.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.4.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mysql2
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: pg
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '1.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '1.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,8 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
|
276
|
-
rubygems_version: 2.7.6
|
275
|
+
rubygems_version: 3.0.3
|
277
276
|
signing_key:
|
278
277
|
specification_version: 4
|
279
278
|
summary: Make ActiveRecord model act as a pedigree
|