eac_ruby_utils 0.102.1 → 0.104.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 +4 -4
- data/lib/eac_ruby_utils/method_class.rb +4 -2
- data/lib/eac_ruby_utils/patches/{module → class}/method_class.rb +0 -0
- data/lib/eac_ruby_utils/patches/class/static_method_class.rb +9 -0
- data/lib/eac_ruby_utils/patches/object/debug.rb +11 -7
- data/lib/eac_ruby_utils/static_method_class.rb +12 -0
- data/lib/eac_ruby_utils/version.rb +1 -1
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 744b6385ba484515339bcfb778ca5f130e8a830bd1e96d8e8098d114f520473c
|
4
|
+
data.tar.gz: e508cd9b3c3b2c2f49e374d42a3b5b01bed648134ac3c46ca479c611071c252d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2896356ed70030f1be88e9b7ee080762548561204b2b62ea2b14f8b58bf718bedf1fa0048ada5e9caf623cf4b103b49ca090f1ea41bc1459f86a441391d6bb9
|
7
|
+
data.tar.gz: 66884fc4b103e9fd62ddf6029787baf460c64efa9738505268a40c54cbcde544cb440215dd31a3a8ebab097f407ce1011803e735fcf8f8ce013b19df11bbdaf8
|
@@ -13,7 +13,7 @@ module EacRubyUtils
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class Setup
|
16
|
-
common_constructor :method_class do
|
16
|
+
common_constructor :method_class, :static_method, default: [false] do
|
17
17
|
perform
|
18
18
|
end
|
19
19
|
|
@@ -29,7 +29,9 @@ module EacRubyUtils
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def sender_module
|
32
|
-
method_class.module_parent
|
32
|
+
r = method_class.module_parent
|
33
|
+
r = r.singleton_class if static_method
|
34
|
+
r
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
class Object
|
4
4
|
def pretty_debug(options = {})
|
5
|
-
|
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
|
-
|
13
|
+
print_debug_options(options)
|
14
14
|
STDERR.write(to_debug + "\n")
|
15
15
|
|
16
16
|
self
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
|
21
|
-
|
19
|
+
def print_debug_label(label)
|
20
|
+
STDERR.write("#{label}: ")
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
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")
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/method_class'
|
4
|
+
require 'eac_ruby_utils/patches/module/common_concern'
|
5
|
+
|
6
|
+
module EacRubyUtils
|
7
|
+
module StaticMethodClass
|
8
|
+
common_concern do
|
9
|
+
::EacRubyUtils::MethodClass::Setup.new(self, true)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
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.104.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-09-
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -37,6 +37,9 @@ dependencies:
|
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '2.8'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.8.1
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,6 +47,9 @@ dependencies:
|
|
44
47
|
- - "~>"
|
45
48
|
- !ruby/object:Gem::Version
|
46
49
|
version: '2.8'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.8.1
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: bundler
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,8 +195,10 @@ files:
|
|
189
195
|
- lib/eac_ruby_utils/patches/class.rb
|
190
196
|
- lib/eac_ruby_utils/patches/class/abstract.rb
|
191
197
|
- lib/eac_ruby_utils/patches/class/common_constructor.rb
|
198
|
+
- lib/eac_ruby_utils/patches/class/method_class.rb
|
192
199
|
- lib/eac_ruby_utils/patches/class/self_included_modules.rb
|
193
200
|
- lib/eac_ruby_utils/patches/class/settings_provider.rb
|
201
|
+
- lib/eac_ruby_utils/patches/class/static_method_class.rb
|
194
202
|
- lib/eac_ruby_utils/patches/enumerable.rb
|
195
203
|
- lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb
|
196
204
|
- lib/eac_ruby_utils/patches/enumerator.rb
|
@@ -210,7 +218,6 @@ files:
|
|
210
218
|
- lib/eac_ruby_utils/patches/module/i18n_translate.rb
|
211
219
|
- lib/eac_ruby_utils/patches/module/immutable.rb
|
212
220
|
- lib/eac_ruby_utils/patches/module/listable.rb
|
213
|
-
- lib/eac_ruby_utils/patches/module/method_class.rb
|
214
221
|
- lib/eac_ruby_utils/patches/module/module_parent.rb
|
215
222
|
- lib/eac_ruby_utils/patches/module/patch.rb
|
216
223
|
- lib/eac_ruby_utils/patches/module/require_sub.rb
|
@@ -265,6 +272,7 @@ files:
|
|
265
272
|
- lib/eac_ruby_utils/speaker.rb
|
266
273
|
- lib/eac_ruby_utils/speaker/receiver.rb
|
267
274
|
- lib/eac_ruby_utils/speaker/sender.rb
|
275
|
+
- lib/eac_ruby_utils/static_method_class.rb
|
268
276
|
- lib/eac_ruby_utils/string_delimited.rb
|
269
277
|
- lib/eac_ruby_utils/struct.rb
|
270
278
|
- lib/eac_ruby_utils/version.rb
|