foobara 0.1.2 → 0.1.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: 772c1b159a33ecf7e3f63a1a2a70d8574d986be541bf3ac88cd00a87c8fc8036
4
- data.tar.gz: 94ccbde2bafcb9860d7275083659cd8f62f76f8d7bc27b03fcfa2d63e3e085ff
3
+ metadata.gz: 382dbd4fb1743f89af17bc70f7acdbef0ad2851767122f702e2503dcfacddf12
4
+ data.tar.gz: 02dfabf373e9ec1545ecbcaeeed6c31b0f6338bcc5e9095b3e0efe9bc9f61c03
5
5
  SHA512:
6
- metadata.gz: a78ea31d30819836a421d49413f2ce379262dac03bf2cc4db2d779c74cc98ea4580f48bd7b472e5d473e3edf269f31af17927adc0248f1ecd7436127585b4e21
7
- data.tar.gz: cf07fcd19587a5820afb06f4cba5d783f2f340f552f64fdb8a577bd5794f139e513828ddb97a8263f41c1d31c104b1d34bb1dfec751da3aa0da43d75c78d660d
6
+ metadata.gz: 535af52cbd9ad41609694db0b23e69f003d5959ccff113bc98dcedc13ff15df685b6abfcafe510f26243888d979b4724b061d00a76164805167d8f90cc3f4d39
7
+ data.tar.gz: 692827d4929a901e5127c706c5f63d5da40330dfc5a5e868ea0661ef5885b25dbb5a4db43f8b76e980076ded3d876637ea1328bd164a16fed9e86664d99b9d4c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.1.3] - 2025-08-25
2
+
3
+ - Add Command#abstract and exclude abstract commands from CommandConnector#connect when connecting domains/orgs
4
+
1
5
  # [0.1.2] - 2025-08-24
2
6
 
3
7
  - Exclude processor/processor_class categories from manifest by default
@@ -9,6 +9,14 @@ module Foobara
9
9
  end
10
10
 
11
11
  module ClassMethods
12
+ def abstract
13
+ @abstract = true
14
+ end
15
+
16
+ def abstract?
17
+ @abstract
18
+ end
19
+
12
20
  def type_for_declaration(...)
13
21
  domain.foobara_type_from_declaration(...)
14
22
  end
@@ -344,13 +344,21 @@ module Foobara
344
344
  command_registry.register(*args, **opts)
345
345
  when Module
346
346
  if registerable.foobara_organization?
347
+ args = args[1..]
347
348
  registerable.foobara_domains.map do |domain|
348
- connect(domain, *args[1..], **opts)
349
+ connect(domain, *args, **opts)
349
350
  end.flatten
350
351
  elsif registerable.foobara_domain?
351
- registerable.foobara_all_command(mode: Namespace::LookupMode::DIRECT).map do |command_class|
352
- Util.array(connect(command_class, *args[1..], **opts))
353
- end.flatten
352
+ args = args[1..]
353
+ connected = []
354
+
355
+ registerable.foobara_each_command(mode: Namespace::LookupMode::DIRECT) do |command_class|
356
+ unless command_class.abstract?
357
+ connected << connect(command_class, *args, **opts)
358
+ end
359
+ end
360
+
361
+ connected.flatten
354
362
  else
355
363
  # :nocov:
356
364
  raise "Don't know how to register #{registerable} (#{registerable.class})"
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
538
538
  - !ruby/object:Gem::Version
539
539
  version: '0'
540
540
  requirements: []
541
- rubygems_version: 3.7.1
541
+ rubygems_version: 3.6.9
542
542
  specification_version: 4
543
543
  summary: A command-centric and discoverable software framework with a focus on domain
544
544
  concepts and abstracting away integration code