cli_class_tool 0.1.1 → 0.2.1
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/CHANGELOG +15 -0
- data/README.md +0 -3
- data/lib/cli_class_tool/utils.rb +5 -5
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 641f72caf2c39cac1c5a222756c481f0de86b5fd7db14893001a64773400d894
|
|
4
|
+
data.tar.gz: 612b9cca3cbd1b157780c490093657e77ba021bb973ca38e76e63f19de1e730e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2ceb59e563ebe911176786f1e4ffdd3762c2ef0b9a62acad6323896c68741228468f3b21e53331f4b22774b4bd0ac8746048330408d84366b6fa4426a546ff6
|
|
7
|
+
data.tar.gz: 3d848b3725fd1e80e061d04e358bbb71821708fc2ed490612ad4fe66b2ffc038396605cda7dfa28f89d7bdaaf703f6b038a0b66a68f18d18c12a2a12742667ab
|
data/CHANGELOG
ADDED
data/README.md
CHANGED
|
@@ -64,9 +64,6 @@ end
|
|
|
64
64
|
In your library entrypoint (e.g. `lib/my-project.rb`), require the `cli_class_tool` components, set up your project-specific namespace, and extend `CLIClassTool::Utils`:
|
|
65
65
|
|
|
66
66
|
```ruby
|
|
67
|
-
# Add lib to load path if necessary
|
|
68
|
-
$LOAD_PATH.push(File.dirname(__FILE__))
|
|
69
|
-
|
|
70
67
|
require 'cli_class_tool'
|
|
71
68
|
|
|
72
69
|
module MyProject
|
data/lib/cli_class_tool/utils.rb
CHANGED
|
@@ -146,12 +146,12 @@ module CLIClassTool
|
|
|
146
146
|
def loadAddons(path)
|
|
147
147
|
return unless Dir.exist?(path)
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
Dir.entries(
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
absolute_dir = File.expand_path(path)
|
|
150
|
+
Dir.entries(absolute_dir).each() do |entry|
|
|
151
|
+
absolute_file = File.join(absolute_dir, entry)
|
|
152
|
+
next if !File.file?(absolute_file) || entry !~ /\.rb$/
|
|
153
|
+
require absolute_file
|
|
153
154
|
end
|
|
154
|
-
$LOAD_PATH.pop()
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# Safely load an overridden/extended class instance using a generic addon_key
|
metadata
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cli_class_tool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Nicolas Morey
|
|
7
|
+
- Nicolas Morey
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 2026-06-01 00:00:00.000000000 Z
|
|
@@ -53,11 +53,12 @@ dependencies:
|
|
|
53
53
|
version: '0.8'
|
|
54
54
|
description: CLIClassTool decouples the generic execution, logging, and action routing
|
|
55
55
|
engine from project-specific business logic.
|
|
56
|
-
email:
|
|
56
|
+
email: nmorey@suse.com
|
|
57
57
|
executables: []
|
|
58
58
|
extensions: []
|
|
59
59
|
extra_rdoc_files: []
|
|
60
60
|
files:
|
|
61
|
+
- CHANGELOG
|
|
61
62
|
- LICENSE
|
|
62
63
|
- README.md
|
|
63
64
|
- lib/cli_class_tool.rb
|