eac_ruby_utils 0.84.0 → 0.85.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: fe70166b1c7ab7701947e23296770c81623de9468b35db56dd56cb170c82aaea
4
- data.tar.gz: e2a691d4f517604d700b18f44ed5068cb226e94bf6ec5b861015de3a44a86c56
3
+ metadata.gz: 48f30b222067edfdcdc7d6a3656ceb73f0c8780d5a35830b9f0e5c8051a44b6b
4
+ data.tar.gz: f461e7f88ad988a472df1141a232e125e0ed29b9532e3c74992a5fad5f81867b
5
5
  SHA512:
6
- metadata.gz: 6aa220366d7d011386ba49d49578aa769bdbe55e727aa391a5de5b2af7c1a564ee38435d2cdd9eb320d580e1cbc320c2bf2c4d7fc4229db0413e4c38d69434d2
7
- data.tar.gz: 8dc484964808a092679ad9b221d565a5831f591ef4587fa01e3a030ac306d98206ff028d91c0277bb437b2153dd1a327601b91cb4a0de8c84f5faa6841a9ccc7
6
+ metadata.gz: be9046e777c84bf2680f519e1aafe808c974eba21ba285cb2fa8ec6e4598973f14e959a2432077810b90cfcaca4f195baf82bda18ea3b8acfdf647ce6487b3ed
7
+ data.tar.gz: 6c9cdc45780225347171b3c4362f04af79b22f4fef2c1080d38d97001c1aace0226e111d0b02cb7f5e28d58acd2cea5d698457d57b07c0b2c8242f5af914b7ef
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Pathname
4
+ # @return +block.call(self)+ if +self+ exists, +default_value+ otherwise.
5
+ def if_exist(default_value = nil)
6
+ return default_value unless exist?
7
+
8
+ block_given? ? yield(self) : self
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ class Pathname
6
+ def readlink_r
7
+ r = self
8
+ r = r.readlink while r.symlink?
9
+ r
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.84.0'
4
+ VERSION = '0.85.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.84.0
4
+ version: 0.85.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-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -205,8 +205,10 @@ files:
205
205
  - lib/eac_ruby_utils/patches/object/to_pathname.rb
206
206
  - lib/eac_ruby_utils/patches/pathname.rb
207
207
  - lib/eac_ruby_utils/patches/pathname/basename_sub.rb
208
+ - lib/eac_ruby_utils/patches/pathname/if_exist.rb
208
209
  - lib/eac_ruby_utils/patches/pathname/mkpath_s.rb
209
210
  - lib/eac_ruby_utils/patches/pathname/parent_n.rb
211
+ - lib/eac_ruby_utils/patches/pathname/readlink_r.rb
210
212
  - lib/eac_ruby_utils/patches/regexp.rb
211
213
  - lib/eac_ruby_utils/patches/regexp/if_match.rb
212
214
  - lib/eac_ruby_utils/patches/regexp/to_parser.rb