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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99e11afd2ccf9f2feab56a6422df4c747dfa338ba5b8b94383c7aed049f9275c
4
- data.tar.gz: 2e1d4a6e20151cb9a84b2f467d7f9c80f79c1789e650248ae809df80bf0774ba
3
+ metadata.gz: 31c9fc4ee3ce866ace65ef1f12787390c8bb421039c7f33651f6e93ad257d91b
4
+ data.tar.gz: 4582aefeab9450ef02a137979d864010d226ea0b952c2b530398d7f4af87f845
5
5
  SHA512:
6
- metadata.gz: 9b8d0ffb954b29642530a041d07387d286ac289c0a19a83c99b5d7d9362faab2c1eb5a298d6730b85eea892d0ba10da78db600c7c8a96da285d6a5b3015e0a13
7
- data.tar.gz: b86f1edf5ada500a7ad6a943f6b9fe6b1daa7891415a200ffe92edd0254d2caeca8b33949c336ad7b90e8e5c807f2e21d45bba6601a72344a19c068ec9199a58
6
+ metadata.gz: a8f40e9981395a9fee0bbcf4a08f46a36fd426493febbe99c17059a6fef9f3157af152e2f3507ecf8e879b7674035986d9c97aaa482de7bbb88e04ecf99019c9
7
+ data.tar.gz: 8b419ce91071324217edd1a30a8b7be13e076279059073f31e4fb5217d285feea17903fceb6c7e64546c93e4a35bf4d6d7eba3e293a924db8f763b03dc1731b2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.3
4
+
5
+ * Adds `#ancestor_paths`, a simple getter which returns an array of the ancestor paths. Also cleans up the test suite, removing the deprecation warnings. (@asgerb)
6
+
3
7
  ## 0.1.2
4
8
 
5
9
  * Mongoid 7 compatibility
@@ -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('/')
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  class PathExtension < String
3
- VERSION = '0.1.2'.freeze
3
+ VERSION = '0.1.3'.freeze
4
4
  end
5
5
  end
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.2
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: 2018-05-03 00:00:00.000000000 Z
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
- rubyforge_project:
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.