eac_ruby_utils 0.102.0 → 0.103.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: 2c7e86736386edb4c749cb5fbe79308fc1fd55021153c0dda8cb663ed85e50ab
4
- data.tar.gz: 350abe9716ee7bc7ac031c65c7ac94b029a1b1a3f0ea80de98cb877519c53d6f
3
+ metadata.gz: 4a255c998a0548aa5e8367b8f620620ed10c3815cf6cfa7bb91a0f4375c819db
4
+ data.tar.gz: 8b8dad7b6318319a4e4c2696c13b55f961d7cfa7042aa2723560d08cfec29f16
5
5
  SHA512:
6
- metadata.gz: c2a88f7354c4529dc5a00e00f19276b5445d226375e135ff35eb4aa0e01cf7bf4326efafdb0524c87f9430dc779b16215a806a3558a19ff3ba1c540d52a25e93
7
- data.tar.gz: 6a8c6f5e3bef91ea69eee363ed327893385b6ee7f93063078957c3fa55b509b0c30a28cba603a9872be2b18d5172e5310c116dd6c9c54de85a15b9e40ce8cd27
6
+ metadata.gz: 35719457a0c1fd6e7899c2ed268fa3f6f699ec6cca8da046a4e0d6d6fcc785db7a91ddb2638c86af6ca0f49cb1cf5d1e63958795dfbf46eb6dc7c9a3a9ffc3cb
7
+ data.tar.gz: f9586ed06df1e3fe7ecb358df065ce42c6c2231f2b964b2e8f908c877acbcee23e5c425e3722c17105f845e48109c6bfffcf021f115f92327de96436014bca6a
@@ -3,6 +3,7 @@
3
3
  require 'active_support/core_ext/module/introspection'
4
4
  require 'eac_ruby_utils/patches/class/common_constructor'
5
5
  require 'eac_ruby_utils/patches/module/common_concern'
6
+ require 'eac_ruby_utils/patches/module/module_parent'
6
7
  require 'eac_ruby_utils/patches/string/inflector'
7
8
 
8
9
  module EacRubyUtils
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/module/introspection'
4
+
5
+ ::Module.alias_method :module_parent, :parent unless ::Module.method_defined?(:module_parent)
@@ -2,7 +2,7 @@
2
2
 
3
3
  class Object
4
4
  def pretty_debug(options = {})
5
- print_debug_title(options)
5
+ print_debug_options(options)
6
6
 
7
7
  STDERR.write(pretty_inspect)
8
8
 
@@ -10,18 +10,22 @@ class Object
10
10
  end
11
11
 
12
12
  def print_debug(options = {})
13
- print_debug_title(options)
13
+ print_debug_options(options)
14
14
  STDERR.write(to_debug + "\n")
15
15
 
16
16
  self
17
17
  end
18
18
 
19
- def print_debug_title(title)
20
- if title.is_a?(::Hash)
21
- return unless title[:title]
19
+ def print_debug_label(label)
20
+ STDERR.write("#{label}: ")
21
+ end
22
22
 
23
- title = title[:title]
24
- end
23
+ def print_debug_options(options)
24
+ options[:title].if_present { |v| print_debug_title(v) }
25
+ options[:label].if_present { |v| print_debug_label(v) }
26
+ end
27
+
28
+ def print_debug_title(title)
25
29
  char = '='
26
30
  STDERR.write(char * (4 + title.length) + "\n")
27
31
  STDERR.write("#{char} #{title} #{char}\n")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.102.0'
4
+ VERSION = '0.103.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.102.0
4
+ version: 0.103.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-08-18 00:00:00.000000000 Z
11
+ date: 2022-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -211,6 +211,7 @@ files:
211
211
  - lib/eac_ruby_utils/patches/module/immutable.rb
212
212
  - lib/eac_ruby_utils/patches/module/listable.rb
213
213
  - lib/eac_ruby_utils/patches/module/method_class.rb
214
+ - lib/eac_ruby_utils/patches/module/module_parent.rb
214
215
  - lib/eac_ruby_utils/patches/module/patch.rb
215
216
  - lib/eac_ruby_utils/patches/module/require_sub.rb
216
217
  - lib/eac_ruby_utils/patches/module/simple_cache.rb