mongoid-path_extension 0.2.0 → 0.2.1

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: d546c233ca871e5a593b7b15258fac16b11b95e5437e9de723e4466637745152
4
- data.tar.gz: 442abc2acd91f2891fead82ff9711739ded7f1f596b4e8a02b9189aac0082051
3
+ metadata.gz: b2e87b6b31e7ed916ba10faed245954aa02fc6cba4b33d09c4925d6d9e7344eb
4
+ data.tar.gz: ef77ad94990d477659361e96805ea6005b5bd1858636d4eb7e4892b49c58348f
5
5
  SHA512:
6
- metadata.gz: fe93b14e53bb80f2427e4831b885dfd8cce51b6286bd9666713b4fa57b494db1dc80856e6fab341e8b81f0a6105b4264d716fad5a82c53057aa4aa1a7a177a4e
7
- data.tar.gz: 72724dcdaa0adae4cfa1483da7bbe5e76250ef270335c3565de5b1f52a22277ffee6a828fc2334170cfc3b4cf4f39ec8dedd07a288ff9c3746a0bbea0cfaefa8
6
+ metadata.gz: 2d9ae33f7c07e6c111b6c12d59265dcb99d64506c3432f626e55d0fc73fea4777789147c426e880bd8bcc4385556fb4a0fcb4b89d9cbdc508ce306c9f3e2ecbe
7
+ data.tar.gz: b0bec0c9b219200094f7886cfc9f6e108534762940b1cfb76e93c7da916e2a496fdfd8d41b7146041cf15c7f6dcc186552cd23187e20a9d68fea612b38d7438d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.1
4
+
5
+ * Fix setting permalink on parentless path resulting in prefixed forward slash
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  * Add permalink setter
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  class PathExtension < String
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ module Mongoid
24
24
 
25
25
  def permalink=(value)
26
26
  return if value.blank?
27
- new_str = [parent.to_s, value].join('/')
27
+ new_str = [parent&.to_s, value].compact.join("/")
28
28
  @str.replace(new_str)
29
29
  end
30
30
 
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.3.14
156
+ rubygems_version: 3.5.17
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Mongoid field extension simplifying path parsing.