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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d3970fe19124e7d291ca3ae41b4b97b3ca9b2fe4634d2f4806b58142a01ec87
4
- data.tar.gz: 0d8b0cc84e29b59e917a1b7a1c1fb92d8b5a54560ab47294d906f56fb4bcaa3f
3
+ metadata.gz: 57237faa04d72c8dcfd1bc7d2acf3dec207eb641c12c08e8fa63dda0f649bbf7
4
+ data.tar.gz: 7101691749e528d36d478497874c367472b475c82873f065cbad66439e5d77b3
5
5
  SHA512:
6
- metadata.gz: 14031a19b195ee3802a88bbe54af5851495463e079b45fda9d9747fda7c9606d512eee8eb376fb191b21cb1e5db586a7b32bb15bc9181251032cf60c6d91a4f6
7
- data.tar.gz: 9ef4f32b7b801102e4348a2a4297cf502b7185ce0ec2af0984d9782ed4cd6a33208adb7287a9ee2e3b719d41ac23d2281f8b9769f9800ff499a84bda47b2e3c8
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.1...HEAD
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 four helpers are the only supported template API, but the binding is
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, so an if/elsif/else contributes only its first branch and
41
- # templates meant for this render must use additive if blocks. There is
42
- # no bundle to resolve against, so gem_version is nil. canonical_render?
43
- # is the exception: it is deterministic in both bindings, so branching on
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
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Hyperdrive
3
- VERSION = "0.9.1"
3
+ VERSION = "0.9.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-hyperdrive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bakaface