ancestry 4.3.1 → 4.3.2

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: 1628363389f64272d25675e727b155ba36c221404a95fc7d7d41de12b2185614
4
- data.tar.gz: 2a76d777929b18efa86bde34b969f11ab58c3f44424e82c97e69ef8f348d1c96
3
+ metadata.gz: c49a8b31bcfbc287a47c4b03ceed6902efc763ef2b120b89fbd18aa9ac93a30e
4
+ data.tar.gz: f1cf8e4f308fb7ec6b18526a4c86e715416e841fd91f010205b6bdfdd4e3accb
5
5
  SHA512:
6
- metadata.gz: 5ece87f9d1577748ffbaaf8617afdc4bf4094f653300b4a2df043a5f16822b267da877f0689b7d792f5f2174f1b4e1b41333e89c0e9dc23c388af30712267953
7
- data.tar.gz: a12ce97c69b384100eecf3a347dcd3fea0abb60193c71b0e6a83d667c8f6a4cfdeba7e401e743bf95cf59f4d87ddc550d63b258ac294dd057ca7c518f1c8540f
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
- * arrange is 3x faster and uses 20-30x less memory [#415](https://github.com/stefankroes/ancestry/pull/415)
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
@@ -1,3 +1,3 @@
1
1
  module Ancestry
2
- VERSION = '4.3.1'
2
+ VERSION = '4.3.2'
3
3
  end
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.1
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-20 00:00:00.000000000 Z
12
+ date: 2023-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord