legionio 1.6.30 → 1.6.31
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.md +7 -0
- data/lib/legion/extensions/builders/hooks.rb +12 -1
- data/lib/legion/extensions/helpers/base.rb +1 -1
- data/lib/legion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56ff571f5c8480be8a6e783549dd9cd377805dd5590e0e07a7fa60f2f0da39da
|
|
4
|
+
data.tar.gz: 6d6251a3b04602caffb8e76b12fc1677c7caf1981a5e7f9cd73c1bea52bf97d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b40b7e385bfa89fd4642ea18bc0bc014ba6407dc182f3ffbb8462963e45c9afffa0471015cda08a77c78ad71eabb31709cfe69a967653ae531c3457e5b90419
|
|
7
|
+
data.tar.gz: c6fa233e90846bf0296f1f9ba3adf171d9ccfa34d224de96fcd721e1e013218c3cfc778988a80d661d57a93ca1002a1b57ffba0a75033aa40b657b1f92c2e9f3
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.6.31] - 2026-03-28
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `build_hook_list` in `Builders::Hooks` now calls `runner_class` on a hook instance (instance method) instead of the class, preventing the `TypeError: no implicit conversion of nil into String` boot crash caused by `Helpers::Base#runner_class` being inherited at the class level and calling `sub!` on a string that contains no `'Actor'` substring
|
|
9
|
+
- `Helpers::Base#runner_class` changed `sub!` to `sub` (non-destructive) as a defensive fix — `sub!` returns `nil` when no substitution is made, which caused `Kernel.const_get(nil)` to raise `TypeError`
|
|
10
|
+
- Runner reference returned by `hook_class.new.runner_class` is now resolved safely: string class names are resolved via `Kernel.const_defined?` + `Kernel.const_get`; Class objects are used directly; `nil` falls back to `hook_class`
|
|
11
|
+
|
|
5
12
|
## [1.6.30] - 2026-03-28
|
|
6
13
|
|
|
7
14
|
### Fixed
|
|
@@ -29,7 +29,7 @@ module Legion
|
|
|
29
29
|
next unless hook_class < Legion::Extensions::Hooks::Base
|
|
30
30
|
|
|
31
31
|
route_path = "#{extension_name}/#{hook_name}"
|
|
32
|
-
runner = hook_class
|
|
32
|
+
runner = resolve_hook_runner(hook_class)
|
|
33
33
|
|
|
34
34
|
@hooks[hook_name.to_sym] = {
|
|
35
35
|
extension: lex_class.to_s.downcase,
|
|
@@ -61,6 +61,17 @@ module Legion
|
|
|
61
61
|
def hook_files
|
|
62
62
|
@hook_files ||= find_files('hooks')
|
|
63
63
|
end
|
|
64
|
+
|
|
65
|
+
private
|
|
66
|
+
|
|
67
|
+
def resolve_hook_runner(hook_class)
|
|
68
|
+
ref = hook_class.new.runner_class
|
|
69
|
+
if ref.is_a?(String)
|
|
70
|
+
Kernel.const_defined?(ref) ? Kernel.const_get(ref) : nil
|
|
71
|
+
elsif ref.is_a?(Class)
|
|
72
|
+
ref
|
|
73
|
+
end
|
|
74
|
+
end
|
|
64
75
|
end
|
|
65
76
|
end
|
|
66
77
|
end
|
data/lib/legion/version.rb
CHANGED