eac_ruby_utils 0.110.0 → 0.111.0

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: c2b5cd79e1ec23311c26c6e444bc22ad3467fe4339414b040a6185c214f1941c
4
- data.tar.gz: da8074cc3cdf8de32546c95088aa64bfc2b5d7bf8d56aff537de7f8d706ed077
3
+ metadata.gz: a889ac2d4aac725fd91d963d4ca90a7179ae513c033edcd7c6f3bb4bfe73f0ce
4
+ data.tar.gz: 46453cd0a6bc65f8f7b1533b6bcd7d70e52c75d9af0caffb2fcad84fcc90ccfb
5
5
  SHA512:
6
- metadata.gz: 56cdf581724ea7e15f46990e19fd70fc6b14dcc3d4d03bf995c8c15b20f615393561bf82e3008fb02a612cd1fc859dca3e6df1a397fb0383bcc721e4a805cae2
7
- data.tar.gz: cc7a20c43187222d5c9ab0492bf45765a0d0fd6ec95a754012a61b62add8b34971a658a986034d188e15895fd4b06110dde7a597da5f6678ad072e608b199630
6
+ metadata.gz: a47d0a6561ce05b2f973900271848ae78039697beda431d9981c491fec73a7c7efe0be2cf054d19a222ec4f7f4bb7a86eb8608406820ae82a6c942f49e0db2e4
7
+ data.tar.gz: 9087ea886ee2d028a9701c45466d67d2cc450b6f1da6a301e65aca41bcf4d19a52a199342cb62806a953838d31be4c7a743a3ba206162e40b90a996fe4f44988
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/common_constructor'
3
+ require 'eac_ruby_utils/patches/class/common_constructor'
4
4
  require 'eac_ruby_utils/inflector'
5
5
 
6
6
  module EacRubyUtils
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.110.0'
4
+ VERSION = '0.111.0'
5
5
  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.110.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: 2022-12-24 00:00:00.000000000 Z
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