ancestry 4.3.1 → 4.3.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -1
- data/lib/ancestry/instance_methods.rb +4 -0
- data/lib/ancestry/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: c49a8b31bcfbc287a47c4b03ceed6902efc763ef2b120b89fbd18aa9ac93a30e
|
4
|
+
data.tar.gz: f1cf8e4f308fb7ec6b18526a4c86e715416e841fd91f010205b6bdfdd4e3accb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d8d4702482f4d9a3183d991031b9fdb870ad2ff6de7eac8a8a3fac7dd8bb68d7b34bef6add6f22ec5ef51d430194082cce6d8a15d63b8f059feb2ecc7ef4875
|
7
|
+
data.tar.gz: '09e1135d7334ff5181df9574c4554ea0a28c4b350b50049d56e16cb0cec07a7b3e60a7ebc33d119dd6704211d152d293627a7c7372a604ce05167e877515164e'
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,13 @@
|
|
3
3
|
Doing our best at supporting [SemVer](http://semver.org/) with
|
4
4
|
a nice looking [Changelog](http://keepachangelog.com).
|
5
5
|
|
6
|
+
## Version [4.3.2] <sub><sup>2023-03-25</sub></sup>
|
7
|
+
|
8
|
+
* Fix: added back fields that were removed in #589 [#647](https://github.com/stefankroes/ancestry/pull/647) (thx @rastamhadi)
|
9
|
+
- path_ids_in_database
|
10
|
+
|
6
11
|
## Version [4.3.1] <sub><sup>2023-03-19</sub></sup>
|
12
|
+
|
7
13
|
* Fix: added back fields that were removed in #589 [#637](https://github.com/stefankroes/ancestry/pull/637) (thx @znz)
|
8
14
|
- ancestor_ids_in_database
|
9
15
|
- parent_id_in_database
|
@@ -18,7 +24,22 @@ a nice looking [Changelog](http://keepachangelog.com).
|
|
18
24
|
* Documented column collation and testing [#601](https://github.com/stefankroes/ancestry/pull/601) [#607](https://github.com/stefankroes/ancestry/pull/607) (thx @kshnurov)
|
19
25
|
* Added initializer with default_ancestry_format [#612](https://github.com/stefankroes/ancestry/pull/612) [#613](https://github.com/stefankroes/ancestry/pull/613)
|
20
26
|
* ruby 3.2 support [#596](https://github.com/stefankroes/ancestry/pull/596) (thx @petergoldstein)
|
21
|
-
*
|
27
|
+
* Reduce memory for sort_by_ancestry [#415](https://github.com/stefankroes/ancestry/pull/415)
|
28
|
+
|
29
|
+
#### Notable features
|
30
|
+
|
31
|
+
Default configuration values are provided for a few options: `update_strategy`, `ancestry_format`, and `primary_key_format`.
|
32
|
+
These can be set in an initializer via `Ancestry.default_{ancestry_format} = value`
|
33
|
+
|
34
|
+
A new `ancestry_format` of `:materialized_path2` formats the ancestry column with leading and trailing slashes.
|
35
|
+
It shows promise to make the `ancestry` field more sql friendly.
|
36
|
+
|
37
|
+
Both of these are better documented in [the readme](/README.md).
|
38
|
+
|
39
|
+
#### Breaking changes
|
40
|
+
|
41
|
+
- `ancestry_primary_key_format` is now specified or a single key not the whole regular expression.
|
42
|
+
We used to accept `/\A[0-9]+(/[0-9]+)*` or `'[0-9]'`, but now we only accept `'[0-9]'`.
|
22
43
|
|
23
44
|
## Version [4.2.0] <sub><sup>2022-06-09</sub></sup>
|
24
45
|
|
@@ -133,6 +133,10 @@ module Ancestry
|
|
133
133
|
ancestor_ids_before_last_save + [id]
|
134
134
|
end
|
135
135
|
|
136
|
+
def path_ids_in_database
|
137
|
+
ancestor_ids_in_database + [id]
|
138
|
+
end
|
139
|
+
|
136
140
|
def path depth_options = {}
|
137
141
|
self.ancestry_base_class.scope_depth(depth_options, depth).ordered_by_ancestry.inpath_of(self)
|
138
142
|
end
|
data/lib/ancestry/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ancestry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kroes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|