foobara 0.5.2 → 0.5.3

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: 3dedef3834e7b4624c4087f4c551c89ccd89eb7b775da12248142fa85b113f15
4
- data.tar.gz: 6c87f09dfffd75f143b3fa8f49d0c66e670558d62af49f240b5a1a210560d2d1
3
+ metadata.gz: 2ee98e7512333f9d3e069e3fe8a6c7cbbe2c5f27f2d918a7397cdaeed64b077f
4
+ data.tar.gz: 6fd8d38c4a30d1b0721fc241b6d09ef890e719fccd795b40d8319a7d77a82c56
5
5
  SHA512:
6
- metadata.gz: e9c8b7dc58977b80469b01811b525a0402b381baf54337806eb00c05ef2b9f90b3e9078a521b221f234113387f52524b01862129c22c93871b33cf89fe4286e0
7
- data.tar.gz: 241fa758312ee4570da8732246c450e161c27dc0c1ca7344a99d8832d7a34058ed601037133389d0033ecac31218960dc22846b3fccb426d3883f2b22bba7db9
6
+ metadata.gz: 0b9e6f6ba2685ee2462811158fefc0d30f4c83122a3701e8b5ab06e2188d1d9c3ce5775846af2a4b4e15ffb7007d19947894fd9e6d4c3a98b92d2636b5b1bbc8
7
+ data.tar.gz: 14db098dc24293b84247e8a4d44913c902aae7f4058ca148698587c14c7d9f971d5d1e97b04ad94f4ae8b80007cac1b6881348c03d13b1ec41c4213b3a1c2892
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- # [0.5.2] - 2026-02-23
1
+ # [0.5.3] - 2026-02-12
2
+
3
+ - Allow registering an allowed rule on an instance of a connector not just its class
4
+
5
+ # [0.5.2] - 2026-02-13
2
6
 
3
7
  - Fix bug that results in duplicate required entries when merging declarations
4
8
  - Communicate which nested attributes are guaranteed to exist to help external generators
@@ -2070,12 +2070,14 @@ RSpec.describe Foobara::CommandConnector do
2070
2070
  end
2071
2071
 
2072
2072
  let(:command_connector_class_d) do
2073
+ stub_class "CommandConnectorD", command_connector_class_c
2074
+ end
2075
+ let(:command_connector) do
2073
2076
  rule = allowed_rule_d
2074
- stub_class "CommandConnectorD", command_connector_class_c do
2077
+ command_connector_class_d.new do
2075
2078
  register_allowed_rule :d, rule
2076
2079
  end
2077
2080
  end
2078
- let(:command_connector) { command_connector_class_d.new }
2079
2081
 
2080
2082
  it "puts the expected allowed rules on the command connector" do
2081
2083
  command_connector.connect(command_class, suffix: "A", allow_if: :a)
@@ -227,6 +227,10 @@ module Foobara
227
227
  end
228
228
  end
229
229
 
230
+ def register_allowed_rule(*ruleish_args)
231
+ command_registry.allowed_rule(*ruleish_args)
232
+ end
233
+
230
234
  # TODO: should this be the official way to connect a command instead of #connect ?
231
235
  def command(...) = connect(...)
232
236
 
data/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Foobara
2
2
  module Version
3
- VERSION = "0.5.2".freeze
3
+ VERSION = "0.5.3".freeze
4
4
  MINIMUM_RUBY_VERSION = ">= 3.4.0".freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi