eac_ruby_utils 0.128.6 → 0.129.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7ef2a64c656bcea53310530c8fad0121501a86aca56d555a19498baea7db711
|
|
4
|
+
data.tar.gz: 23e28067abfcf7c4de6d2623c91fa1e2870018b599ad196094e37cab323d8e14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d2e8beeb77e0cb2481515a4bad720e90221ba3903bddb4cf60a87d898dc068a83eb10227f344b1e796cbe13327ba1da80600e4d4f89cf011bb2842523b5b646
|
|
7
|
+
data.tar.gz: 34266ce2b1055cf3a58f73f0cc373e622dbe9bdf7eb899c3548c4276bf46a46cde46fe7c911a6b5ed5f9b15707b45bb78572cb3a728b6ac4b6285f9b9f974c60
|
|
@@ -17,7 +17,8 @@ module EacRubyUtils
|
|
|
17
17
|
|
|
18
18
|
include ::EacRubyUtils::Listable
|
|
19
19
|
|
|
20
|
-
lists.add_symbol :option, :base, :include_modules, :
|
|
20
|
+
lists.add_symbol :option, :base, :include_modules, :recursive, :require_dependency,
|
|
21
|
+
:require_mode
|
|
21
22
|
lists.add_symbol :require_mode, :active_support, :autoload, :kernel
|
|
22
23
|
|
|
23
24
|
attr_reader :file, :options
|
|
@@ -36,8 +37,15 @@ module EacRubyUtils
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
def apply
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
raise('Options :base and :recursive cannot be simultaneously present/true') if
|
|
41
|
+
base? && recursive?
|
|
42
|
+
|
|
43
|
+
if recursive?
|
|
44
|
+
require_sub_files_recursively
|
|
45
|
+
else
|
|
46
|
+
require_sub_files
|
|
47
|
+
include_modules
|
|
48
|
+
end
|
|
41
49
|
end
|
|
42
50
|
|
|
43
51
|
def base
|
|
@@ -60,6 +68,11 @@ module EacRubyUtils
|
|
|
60
68
|
"\"#{options[OPTION_INCLUDE_MODULES]}\""
|
|
61
69
|
end
|
|
62
70
|
|
|
71
|
+
# @return [Boolean]
|
|
72
|
+
def recursive?
|
|
73
|
+
options.fetch(OPTION_RECURSIVE, false) ? true : false
|
|
74
|
+
end
|
|
75
|
+
|
|
63
76
|
# @return [Symbol]
|
|
64
77
|
def require_mode
|
|
65
78
|
return options[OPTION_REQUIRE_MODE] if options[OPTION_REQUIRE_MODE]
|
|
@@ -73,6 +86,10 @@ module EacRubyUtils
|
|
|
73
86
|
sub_files.each(&:require_file)
|
|
74
87
|
end
|
|
75
88
|
|
|
89
|
+
def require_sub_files_recursively
|
|
90
|
+
sub_files.each(&:require_file)
|
|
91
|
+
end
|
|
92
|
+
|
|
76
93
|
def sub_files
|
|
77
94
|
@sub_files ||= Dir["#{File.dirname(file)}/#{::File.basename(file, '.*')}/*.rb"].sort
|
|
78
95
|
.map { |path| ::EacRubyUtils::RequireSub::SubFile.new(self, path) }
|
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.129.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: 2026-
|
|
11
|
+
date: 2026-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -118,14 +118,14 @@ dependencies:
|
|
|
118
118
|
requirements:
|
|
119
119
|
- - "~>"
|
|
120
120
|
- !ruby/object:Gem::Version
|
|
121
|
-
version: '0.
|
|
121
|
+
version: '0.7'
|
|
122
122
|
type: :development
|
|
123
123
|
prerelease: false
|
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
|
125
125
|
requirements:
|
|
126
126
|
- - "~>"
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
|
-
version: '0.
|
|
128
|
+
version: '0.7'
|
|
129
129
|
- !ruby/object:Gem::Dependency
|
|
130
130
|
name: eac_ruby_gem_support
|
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|