eac_ruby_utils 0.110.0 → 0.111.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a889ac2d4aac725fd91d963d4ca90a7179ae513c033edcd7c6f3bb4bfe73f0ce
|
4
|
+
data.tar.gz: 46453cd0a6bc65f8f7b1533b6bcd7d70e52c75d9af0caffb2fcad84fcc90ccfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a47d0a6561ce05b2f973900271848ae78039697beda431d9981c491fec73a7c7efe0be2cf054d19a222ec4f7f4bb7a86eb8608406820ae82a6c942f49e0db2e4
|
7
|
+
data.tar.gz: 9087ea886ee2d028a9701c45466d67d2cc450b6f1da6a301e65aca41bcf4d19a52a199342cb62806a953838d31be4c7a743a3ba206162e40b90a996fe4f44988
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
|
5
|
+
class Pathname
|
6
|
+
# Indicate if +self+ is child of +parent_path+.
|
7
|
+
#
|
8
|
+
# @return [Boolean]
|
9
|
+
def child_of?(parent_path)
|
10
|
+
self_parts = expand_path.each_filename.to_a
|
11
|
+
parent_parts = parent_path.expand_path.each_filename.to_a
|
12
|
+
return false if self_parts == parent_parts
|
13
|
+
|
14
|
+
parent_parts.zip(self_parts).all? { |x, y| x == y }
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.111.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -261,6 +261,7 @@ files:
|
|
261
261
|
- lib/eac_ruby_utils/patches/pathname/assert_parent.rb
|
262
262
|
- lib/eac_ruby_utils/patches/pathname/basename_noext.rb
|
263
263
|
- lib/eac_ruby_utils/patches/pathname/basename_sub.rb
|
264
|
+
- lib/eac_ruby_utils/patches/pathname/child_of.rb
|
264
265
|
- lib/eac_ruby_utils/patches/pathname/if_exist.rb
|
265
266
|
- lib/eac_ruby_utils/patches/pathname/mkpath_s.rb
|
266
267
|
- lib/eac_ruby_utils/patches/pathname/parent_n.rb
|