mongoid-path_extension 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/mongoid/path_extension.rb +9 -0
- data/lib/mongoid/path_extension/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c9fc4ee3ce866ace65ef1f12787390c8bb421039c7f33651f6e93ad257d91b
|
4
|
+
data.tar.gz: 4582aefeab9450ef02a137979d864010d226ea0b952c2b530398d7f4af87f845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8f40e9981395a9fee0bbcf4a08f46a36fd426493febbe99c17059a6fef9f3157af152e2f3507ecf8e879b7674035986d9c97aaa482de7bbb88e04ecf99019c9
|
7
|
+
data.tar.gz: 8b419ce91071324217edd1a30a8b7be13e076279059073f31e4fb5217d285feea17903fceb6c7e64546c93e4a35bf4d6d7eba3e293a924db8f763b03dc1731b2
|
data/CHANGELOG.md
CHANGED
@@ -28,6 +28,15 @@ module Mongoid
|
|
28
28
|
components.length > 1
|
29
29
|
end
|
30
30
|
|
31
|
+
def ancestor_paths
|
32
|
+
return unless has_parent?
|
33
|
+
res = []
|
34
|
+
components[0..-2].each_with_index do |component, index|
|
35
|
+
res << components[0..index].join('/')
|
36
|
+
end
|
37
|
+
res
|
38
|
+
end
|
39
|
+
|
31
40
|
def parent_path
|
32
41
|
return unless has_parent?
|
33
42
|
components[0..-2].join('/')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-path_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -140,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.7.3
|
143
|
+
rubygems_version: 3.1.4
|
145
144
|
signing_key:
|
146
145
|
specification_version: 4
|
147
146
|
summary: Mongoid field extension simplifying path parsing.
|