eac_ruby_utils 0.124.0 → 0.126.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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eac_ruby_utils/contextualizable.rb +1 -3
  3. data/lib/eac_ruby_utils/custom_format.rb +1 -3
  4. data/lib/eac_ruby_utils/envs/ssh_env/dasho_options.rb +1 -3
  5. data/lib/eac_ruby_utils/fs/extname.rb +22 -17
  6. data/lib/eac_ruby_utils/fs.rb +2 -0
  7. data/lib/eac_ruby_utils/objects_table.rb +41 -0
  8. data/lib/eac_ruby_utils/patch_module.rb +17 -0
  9. data/lib/eac_ruby_utils/patches/class/method_class.rb +1 -1
  10. data/lib/eac_ruby_utils/patches/class/settings_provider.rb +2 -2
  11. data/lib/eac_ruby_utils/patches/class/static_method_class.rb +1 -1
  12. data/lib/eac_ruby_utils/patches/integer/rjust_zero.rb +13 -0
  13. data/lib/eac_ruby_utils/patches/integer.rb +4 -0
  14. data/lib/eac_ruby_utils/patches/module/acts_as_immutable.rb +2 -2
  15. data/lib/eac_ruby_utils/patches/module/context.rb +2 -2
  16. data/lib/eac_ruby_utils/patches/module/immutable.rb +2 -2
  17. data/lib/eac_ruby_utils/patches/module/listable.rb +2 -2
  18. data/lib/eac_ruby_utils/patches/module/patch_self.rb +9 -0
  19. data/lib/eac_ruby_utils/patches/module/simple_cache.rb +2 -2
  20. data/lib/eac_ruby_utils/patches/object/i18n_translate.rb +1 -3
  21. data/lib/eac_ruby_utils/patches/pathname/basename_noext.rb +0 -1
  22. data/lib/eac_ruby_utils/require_sub/base.rb +1 -0
  23. data/lib/eac_ruby_utils/root_module_setup.rb +72 -0
  24. data/lib/eac_ruby_utils/rspec/default_setup.rb +12 -9
  25. data/lib/eac_ruby_utils/rspec.rb +2 -2
  26. data/lib/eac_ruby_utils/version.rb +1 -1
  27. data/lib/eac_ruby_utils.rb +11 -2
  28. metadata +36 -6
  29. data/lib/eac_ruby_utils/patch.rb +0 -11
  30. data/lib/eac_ruby_utils/patches/module/patch.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b58f8dc99b555c425e70cc08cb038153122279388a3547551c50dbf9521b28e6
4
- data.tar.gz: aaeef7762918739d2582582b98ab72b07369ff1719d7349928528d039bccb149
3
+ metadata.gz: b6fa9ca21dfcc4833795698cd71fe64c049739f6621bc4cc9e92f9617c820b56
4
+ data.tar.gz: 5f952359cdc1e9a8dc648ecc5b4f1d9401868ad9a08657eeec8d510850ed89dd
5
5
  SHA512:
6
- metadata.gz: 04c75cde5f4929f9f55e4c0f74d5bf49802d11b4ec925df7cab02126d3289d7bf146784e7e69bf59f5ba97f7ba6b75ae2ed98594c0e8d1b1df1e3303f1868172
7
- data.tar.gz: 025ad56ad448d54cdc0ee6dc4dc0a1d1d4249965b6b3765593630dab10550a8fd44dc689b7b31dfc65c7b03d55ac2c448d6db9010b95ae8f8e7841b9ac7d5734
6
+ metadata.gz: f92a99f7e5f4746d3f7bc761e6d1977dd50920924e09676ac3d10298a3197cce9f7e1fc923e311058b8efee8468681bf6643d65cf8b70078a55d5308e3ef3627
7
+ data.tar.gz: e2304ee62e742a30c48bff94f9db979d6c2ae609e1db33cfc1843b66891e2406a0ee41e24ab4ecb19ae2a211268c168262c5cb7bd713e1eef2756b9b445d52e6
@@ -13,9 +13,7 @@ module EacRubyUtils
13
13
  end
14
14
 
15
15
  module InstanceMethods
16
- def context
17
- self.class.context
18
- end
16
+ delegate :context, to: :class
19
17
  end
20
18
  end
21
19
  end
@@ -25,9 +25,7 @@ module EacRubyUtils
25
25
  end
26
26
 
27
27
  def mapping
28
- @mapping ||= format.mapping.select do |k, _v|
29
- sequences.include?(k)
30
- end
28
+ @mapping ||= format.mapping.slice(*sequences)
31
29
  end
32
30
 
33
31
  def sequences
@@ -39,9 +39,7 @@ module EacRubyUtils
39
39
  end
40
40
  end
41
41
 
42
- def nodasho_options
43
- self.class.nodasho_options
44
- end
42
+ delegate :nodasho_options, to: :class
45
43
 
46
44
  def uri_query_value(name)
47
45
  uri.query_values.if_present { |v| v[name] }
@@ -1,28 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/patches/module/common_concern'
4
+
3
5
  module EacRubyUtils
4
6
  module Fs
5
- class << self
6
- # A [File.extname] which find multiple extensions (Ex.: .tar.gz).
7
- def extname(path, limit = -1)
8
- recursive_extension(::File.basename(path), limit)
9
- end
7
+ module Extname
8
+ common_concern
9
+ class_methods do
10
+ # A [File.extname] which find multiple extensions (Ex.: .tar.gz).
11
+ def extname(path, limit = -1)
12
+ recursive_extension(::File.basename(path), limit)
13
+ end
10
14
 
11
- # Shortcut to +extname(2)+.
12
- def extname2(path)
13
- extname(path, 2)
14
- end
15
+ # Shortcut to +extname(2)+.
16
+ def extname2(path)
17
+ extname(path, 2)
18
+ end
15
19
 
16
- private
20
+ private
17
21
 
18
- def recursive_extension(basename, limit)
19
- return '' if limit.zero?
22
+ def recursive_extension(basename, limit)
23
+ return '' if limit.zero?
20
24
 
21
- m = /\A(.+)(\.[a-z][a-z0-9]*)\z/i.match(basename)
22
- if m
23
- "#{recursive_extension(m[1], limit - 1)}#{m[2]}"
24
- else
25
- ''
25
+ m = /\A(.+)(\.[a-z][a-z0-9]*)\z/i.match(basename)
26
+ if m
27
+ "#{recursive_extension(m[1], limit - 1)}#{m[2]}"
28
+ else
29
+ ''
30
+ end
26
31
  end
27
32
  end
28
33
  end
@@ -4,6 +4,8 @@ require 'eac_ruby_utils/require_sub'
4
4
 
5
5
  module EacRubyUtils
6
6
  module Fs
7
+ include ::EacRubyUtils::Fs::Extname
8
+
7
9
  ::EacRubyUtils.require_sub __FILE__
8
10
  end
9
11
  end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/regexp_parser'
4
+
5
+ module EacRubyUtils
6
+ class ObjectsTable
7
+ BY_PARSER = ::EacRubyUtils::RegexpParser.new(/\Aby_([^!\?]+)(!)?\z/) do |m|
8
+ BY_PARSER_PARSED_STRUCT.new(m[1], "by_attribute#{m[2].present? ? '!' : ''}")
9
+ end
10
+ BY_PARSER_PARSED_STRUCT = ::Struct.new(:attribute, :method_name)
11
+
12
+ common_constructor :objects, default: [[]]
13
+
14
+ # @param name [String, Symbol]
15
+ # @param value [Object]
16
+ # @return [Object, nil]
17
+ def by_attribute(name, value)
18
+ objects.find { |e| e.send(name) == value }
19
+ end
20
+
21
+ # @param name [String, Symbol]
22
+ # @param value [Object]
23
+ # @return [Object]
24
+ def by_attribute!(name, value)
25
+ by_attribute(name, value) ||
26
+ raise(::ArgumentError, "No item found with attribute #{name}=#{value}")
27
+ end
28
+
29
+ def respond_to_missing?(method_name, include_private = false)
30
+ super || BY_PARSER.parse?(method_name)
31
+ end
32
+
33
+ def method_missing(method_name, *arguments, &block)
34
+ if (parsed = BY_PARSER.parse(method_name))
35
+ return send(parsed.method_name, parsed.attribute, *arguments, &block)
36
+ end
37
+
38
+ super
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/module/common_concern'
4
+
5
+ module EacRubyUtils
6
+ module PatchModule
7
+ common_concern
8
+
9
+ class_methods do
10
+ def patch_module(target, patch)
11
+ return if target.included_modules.include?(patch)
12
+
13
+ target.send(:include, patch)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -4,6 +4,6 @@ require 'eac_ruby_utils/method_class'
4
4
 
5
5
  class Module
6
6
  def enable_method_class
7
- ::EacRubyUtils.patch(self, ::EacRubyUtils::MethodClass)
7
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::MethodClass)
8
8
  end
9
9
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/settings_provider'
5
5
 
6
6
  class Class
7
7
  def enable_settings_provider
8
- ::EacRubyUtils.patch(self, ::EacRubyUtils::SettingsProvider)
8
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::SettingsProvider)
9
9
  end
10
10
  end
@@ -4,6 +4,6 @@ require 'eac_ruby_utils/static_method_class'
4
4
 
5
5
  class Module
6
6
  def enable_static_method_class
7
- ::EacRubyUtils.patch(self, ::EacRubyUtils::StaticMethodClass)
7
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::StaticMethodClass)
8
8
  end
9
9
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils'
4
+
5
+ class Integer
6
+ RJUST_ZERO_STRING = '0'
7
+
8
+ # @param size [Integer]
9
+ # @return [String]
10
+ def rjust_zero(size)
11
+ to_s.rjust(size, RJUST_ZERO_STRING)
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ EacRubyUtils.require_sub __FILE__
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/acts_as_immutable'
5
5
 
6
6
  class Module
7
7
  def acts_as_immutable
8
- ::EacRubyUtils.patch(self, ::EacRubyUtils::ActsAsImmutable)
8
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::ActsAsImmutable)
9
9
  end
10
10
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/contextualizable'
5
5
 
6
6
  class Module
7
7
  # Patches module with [EacRubyUtils::Contextualizable].
8
8
  def enable_context
9
- ::EacRubyUtils.patch(self, ::EacRubyUtils::Contextualizable)
9
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::Contextualizable)
10
10
  end
11
11
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/acts_as_immutable'
5
5
 
6
6
  class Module
7
7
  # @deprecated Use {#acts_as_immutable} instead.
8
8
  def enable_immutable
9
- ::EacRubyUtils.patch(self, ::EacRubyUtils::ActsAsImmutable)
9
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::ActsAsImmutable)
10
10
  end
11
11
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/listable'
5
5
 
6
6
  class Module
7
7
  def enable_listable
8
- ::EacRubyUtils.patch(self, ::EacRubyUtils::Listable)
8
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::Listable)
9
9
  end
10
10
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patch_module'
4
+
5
+ class Module
6
+ def patch_self(patch_module)
7
+ ::EacRubyUtils.patch_module(self, patch_module)
8
+ end
9
+ end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/patch'
3
+ require 'eac_ruby_utils/patch_module'
4
4
  require 'eac_ruby_utils/simple_cache'
5
5
 
6
6
  class Module
7
7
  def enable_simple_cache
8
- ::EacRubyUtils.patch(self, ::EacRubyUtils::SimpleCache)
8
+ ::EacRubyUtils.patch_module(self, ::EacRubyUtils::SimpleCache)
9
9
  end
10
10
  end
@@ -7,7 +7,5 @@ class Object
7
7
  self.class.i18n_translate(entry_suffix, values)
8
8
  end
9
9
 
10
- def on_i18n_locale(locale)
11
- self.class.on_i18n_locale(locale)
12
- end
10
+ delegate :on_i18n_locale, to: :class
13
11
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/fs/extname'
4
3
  require 'pathname'
5
4
 
6
5
  class Pathname
@@ -10,6 +10,7 @@ module EacRubyUtils
10
10
  nil => nil,
11
11
  false => nil,
12
12
  true => :include,
13
+ extend: :extend,
13
14
  include: :include,
14
15
  prepend: :prepend
15
16
  }.freeze
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/patches/pathname'
4
+ require 'eac_ruby_utils/patches/object/to_pathname'
5
+ require 'zeitwerk'
6
+
7
+ module EacRubyUtils
8
+ class RootModuleSetup
9
+ class << self
10
+ # @param root_module_file [String]
11
+ def perform(root_module_file, &block)
12
+ new(root_module_file, &block).perform
13
+ end
14
+ end
15
+
16
+ attr_reader :block, :root_module_file
17
+
18
+ # @param root_module_file [String]
19
+ def initialize(root_module_file, &block)
20
+ self.root_module_file = root_module_file
21
+ self.block = block
22
+ end
23
+
24
+ # @param path [String] Relative path to root module's directory.
25
+ def ignore(path)
26
+ count_before = loader.send(:ignored_paths).count
27
+ target_path = path.to_pathname.basename_sub { |b| "#{b.basename('.*')}.rb" }
28
+ .expand_path(root_module_directory)
29
+ result = loader.ignore target_path
30
+ return result if result.count > count_before
31
+
32
+ raise ::ArgumentError, [
33
+ "Trying to ignore path \"#{path}\" did not increase the ignored paths.",
34
+ "Argument path: \"#{path}\"", "Target path: \"#{target_path}\"", "Ignored paths: #{result}"
35
+ ].join("\n")
36
+ end
37
+
38
+ # @return [void]
39
+ def perform
40
+ perform_block
41
+ perform_zeitwerk
42
+ end
43
+
44
+ # @return [String]
45
+ def root_module_directory
46
+ ::File.expand_path(::File.basename(root_module_file, '.*'),
47
+ ::File.dirname(root_module_file))
48
+ end
49
+
50
+ protected
51
+
52
+ attr_writer :block, :root_module_file
53
+
54
+ def perform_block
55
+ instance_eval(&block) if block
56
+ end
57
+
58
+ # @return [void]
59
+ def perform_zeitwerk
60
+ loader.setup
61
+ end
62
+
63
+ # @return [Zeitwerk::GemLoader]
64
+ def loader
65
+ @loader ||= ::Zeitwerk::Registry.loader_for_gem(
66
+ root_module_file,
67
+ namespace: Object,
68
+ warn_on_extra_files: true
69
+ )
70
+ end
71
+ end
72
+ end
@@ -4,16 +4,19 @@ require 'eac_ruby_utils/rspec/setup_manager'
4
4
 
5
5
  module EacRubyUtils
6
6
  module Rspec
7
- class << self
8
- # @return [EacRubyUtils::Rspec::SetupManager]
9
- def default_setup
10
- @default_setup ||
11
- raise("Default instance was not set. Use #{self.class.name}.default_setup_create")
12
- end
7
+ module DefaultSetup
8
+ common_concern
9
+ class_methods do
10
+ # @return [EacRubyUtils::Rspec::SetupManager]
11
+ def default_setup
12
+ @default_setup ||
13
+ raise("Default instance was not set. Use #{self.class.name}.default_setup_create")
14
+ end
13
15
 
14
- # @return [EacRubyUtils::Rspec::SetupManager]
15
- def default_setup_create(app_root_path, rspec_config = nil)
16
- @default_setup = ::EacRubyUtils::Rspec::SetupManager.create(app_root_path, rspec_config)
16
+ # @return [EacRubyUtils::Rspec::SetupManager]
17
+ def default_setup_create(app_root_path, rspec_config = nil)
18
+ @default_setup = ::EacRubyUtils::Rspec::SetupManager.create(app_root_path, rspec_config)
19
+ end
17
20
  end
18
21
  end
19
22
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/require_sub'
4
- EacRubyUtils.require_sub(__FILE__)
3
+ require 'eac_ruby_utils/patches/module/require_sub'
5
4
 
6
5
  module EacRubyUtils
7
6
  module Rspec
7
+ require_sub __FILE__, include_modules: true
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.124.0'
4
+ VERSION = '0.126.0'
5
5
  end
@@ -1,6 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/root_module_setup'
4
+ EacRubyUtils::RootModuleSetup.perform __FILE__ do
5
+ ignore 'core_ext'
6
+ ignore 'locales/from_all_gems'
7
+ ignore 'patches'
8
+ ignore 'ruby/on_clean_environment'
9
+ end
10
+
3
11
  module EacRubyUtils
4
- require 'eac_ruby_utils/require_sub'
5
- ::EacRubyUtils.require_sub __FILE__
12
+ include ::EacRubyUtils::PatchModule
6
13
  end
14
+
15
+ require 'eac_ruby_utils/core_ext'
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.124.0
4
+ version: 0.126.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: 2024-11-30 00:00:00.000000000 Z
11
+ date: 2025-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -92,6 +92,26 @@ dependencies:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '4.2'
95
+ - !ruby/object:Gem::Dependency
96
+ name: zeitwerk
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '2.6'
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 2.6.18
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '2.6'
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 2.6.18
95
115
  - !ruby/object:Gem::Dependency
96
116
  name: avm-eac_ubuntu_base0
97
117
  requirement: !ruby/object:Gem::Requirement
@@ -118,14 +138,20 @@ dependencies:
118
138
  requirements:
119
139
  - - "~>"
120
140
  - !ruby/object:Gem::Version
121
- version: '0.10'
141
+ version: '0.11'
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: 0.11.1
122
145
  type: :development
123
146
  prerelease: false
124
147
  version_requirements: !ruby/object:Gem::Requirement
125
148
  requirements:
126
149
  - - "~>"
127
150
  - !ruby/object:Gem::Version
128
- version: '0.10'
151
+ version: '0.11'
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: 0.11.1
129
155
  description:
130
156
  email:
131
157
  executables: []
@@ -222,8 +248,9 @@ files:
222
248
  - lib/eac_ruby_utils/module_ancestors_variable/base.rb
223
249
  - lib/eac_ruby_utils/module_ancestors_variable/hash.rb
224
250
  - lib/eac_ruby_utils/module_ancestors_variable/set.rb
251
+ - lib/eac_ruby_utils/objects_table.rb
225
252
  - lib/eac_ruby_utils/options_consumer.rb
226
- - lib/eac_ruby_utils/patch.rb
253
+ - lib/eac_ruby_utils/patch_module.rb
227
254
  - lib/eac_ruby_utils/patches.rb
228
255
  - lib/eac_ruby_utils/patches/addressable.rb
229
256
  - lib/eac_ruby_utils/patches/addressable/uri.rb
@@ -245,6 +272,8 @@ files:
245
272
  - lib/eac_ruby_utils/patches/hash/options_consumer.rb
246
273
  - lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb
247
274
  - lib/eac_ruby_utils/patches/hash/to_struct.rb
275
+ - lib/eac_ruby_utils/patches/integer.rb
276
+ - lib/eac_ruby_utils/patches/integer/rjust_zero.rb
248
277
  - lib/eac_ruby_utils/patches/kernel.rb
249
278
  - lib/eac_ruby_utils/patches/kernel/ibr.rb
250
279
  - lib/eac_ruby_utils/patches/kernel/nyi.rb
@@ -260,7 +289,7 @@ files:
260
289
  - lib/eac_ruby_utils/patches/module/immutable.rb
261
290
  - lib/eac_ruby_utils/patches/module/listable.rb
262
291
  - lib/eac_ruby_utils/patches/module/module_parent.rb
263
- - lib/eac_ruby_utils/patches/module/patch.rb
292
+ - lib/eac_ruby_utils/patches/module/patch_self.rb
264
293
  - lib/eac_ruby_utils/patches/module/require_sub.rb
265
294
  - lib/eac_ruby_utils/patches/module/simple_cache.rb
266
295
  - lib/eac_ruby_utils/patches/module/speaker.rb
@@ -301,6 +330,7 @@ files:
301
330
  - lib/eac_ruby_utils/require_sub.rb
302
331
  - lib/eac_ruby_utils/require_sub/base.rb
303
332
  - lib/eac_ruby_utils/require_sub/sub_file.rb
333
+ - lib/eac_ruby_utils/root_module_setup.rb
304
334
  - lib/eac_ruby_utils/rspec.rb
305
335
  - lib/eac_ruby_utils/rspec/default_setup.rb
306
336
  - lib/eac_ruby_utils/rspec/setup.rb
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module EacRubyUtils
4
- class << self
5
- def patch(target, patch)
6
- return if target.included_modules.include?(patch)
7
-
8
- target.send(:include, patch)
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/patch'
4
-
5
- class Module
6
- def patch(patch_module)
7
- ::EacRubyUtils.patch(self, patch_module)
8
- end
9
- end