rails-hyperdrive 0.9.1 → 0.9.2
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 +18 -1
- data/lib/rails/hyperdrive/skill_template.rb +14 -6
- data/lib/rails/hyperdrive/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: 57237faa04d72c8dcfd1bc7d2acf3dec207eb641c12c08e8fa63dda0f649bbf7
|
|
4
|
+
data.tar.gz: 7101691749e528d36d478497874c367472b475c82873f065cbad66439e5d77b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ae38d66200e6f17e66b11560cf029afdf9b7bbaf8dbd6477ef92de26cd440c454849900ee83fbe53fce5eae447ba2b6d40461227581cee3fcea5f874eb78f33
|
|
7
|
+
data.tar.gz: 521d4da069f27f9b91020ac08106db9ea19aed075ce07204924da1839328390c72d85d392b060ac6317bc6fcb930225f78f10055869830abc66808a22d5c4b76
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.2] - 2026-09-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `all_gems?(*names)`, a fifth skill-template ERB helper and the AND sibling of
|
|
15
|
+
`any_gem?`: true only when every named gem is bundled. Names only — chain
|
|
16
|
+
`gem?("a", ">= 2") && gem?("b")` when a member needs a version requirement —
|
|
17
|
+
and an empty list is true. Like the other bundle predicates it reads `true` in
|
|
18
|
+
the author-side canonical render. A template calling it needs the installer
|
|
19
|
+
release that ships it: on an older one the render raises `NameError` and the
|
|
20
|
+
artifact is skipped as a render failure — a supporting file on its own, or the
|
|
21
|
+
whole artifact when the template is the definition (`SKILL.md.erb`, or a
|
|
22
|
+
templated guideline, agent, or command). Declare
|
|
23
|
+
`hyperdrive_version: ">= 0.9.2"` in the manifest entry (or gem-wide), so an
|
|
24
|
+
older installer reports "upgrade rails-hyperdrive" instead.
|
|
25
|
+
|
|
10
26
|
## [0.9.1] - 2026-09-06
|
|
11
27
|
|
|
12
28
|
### Fixed
|
|
@@ -833,7 +849,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
833
849
|
- `hyperdrive:init` generator that installs architecture skills and auto-discovers
|
|
834
850
|
per-gem skills.
|
|
835
851
|
|
|
836
|
-
[Unreleased]: https://github.com/rails-hyperdrive/rails-hyperdrive/compare/v0.9.
|
|
852
|
+
[Unreleased]: https://github.com/rails-hyperdrive/rails-hyperdrive/compare/v0.9.2...HEAD
|
|
853
|
+
[0.9.2]: https://github.com/rails-hyperdrive/rails-hyperdrive/releases/tag/v0.9.2
|
|
837
854
|
[0.9.1]: https://github.com/rails-hyperdrive/rails-hyperdrive/releases/tag/v0.9.1
|
|
838
855
|
[0.9.0]: https://github.com/rails-hyperdrive/rails-hyperdrive/releases/tag/v0.9.0
|
|
839
856
|
[0.8.0]: https://github.com/rails-hyperdrive/rails-hyperdrive/releases/tag/v0.8.0
|
|
@@ -3,7 +3,7 @@ require "erb"
|
|
|
3
3
|
module Rails
|
|
4
4
|
module Hyperdrive
|
|
5
5
|
# Renders a skill's *.md.erb sources against the app's resolved bundle.
|
|
6
|
-
# The
|
|
6
|
+
# The five helpers are the only supported template API, but the binding is
|
|
7
7
|
# an ordinary object rather than a sandbox: a template runs arbitrary Ruby
|
|
8
8
|
# with the privileges of whoever triggered discovery.
|
|
9
9
|
module SkillTemplate
|
|
@@ -22,6 +22,10 @@ module Rails
|
|
|
22
22
|
names.any? { |n| @resolved.key?(n.to_s) }
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
def all_gems?(*names)
|
|
26
|
+
names.all? { |n| @resolved.key?(n.to_s) }
|
|
27
|
+
end
|
|
28
|
+
|
|
25
29
|
def gem_version(name)
|
|
26
30
|
version = @resolved[name.to_s]
|
|
27
31
|
version&.to_s
|
|
@@ -37,11 +41,11 @@ module Rails
|
|
|
37
41
|
end
|
|
38
42
|
|
|
39
43
|
# Canonical render binding: every gem reads as present at any requested
|
|
40
|
-
# version
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
# it is safe.
|
|
44
|
+
# version (gem?, any_gem? and all_gems? all answer true), so an
|
|
45
|
+
# if/elsif/else contributes only its first branch and templates meant for
|
|
46
|
+
# this render must use additive if blocks. There is no bundle to resolve
|
|
47
|
+
# against, so gem_version is nil. canonical_render? is the exception: it
|
|
48
|
+
# is deterministic in both bindings, so branching on it is safe.
|
|
45
49
|
class CanonicalContext
|
|
46
50
|
def gem?(_name, _requirement = nil)
|
|
47
51
|
true
|
|
@@ -51,6 +55,10 @@ module Rails
|
|
|
51
55
|
true
|
|
52
56
|
end
|
|
53
57
|
|
|
58
|
+
def all_gems?(*)
|
|
59
|
+
true
|
|
60
|
+
end
|
|
61
|
+
|
|
54
62
|
def gem_version(_name)
|
|
55
63
|
nil
|
|
56
64
|
end
|