foobara 0.5.5 → 0.5.6

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: 6527e62790180b1aeb2f98e069655d8ac72750fbff834fc63e9b75a01c35cb4e
4
- data.tar.gz: a769dd2a642b71bd401dabe3c0917a1fa128069f2a7987ff79df633765ae93ad
3
+ metadata.gz: ea16151696626b19708aa3c7a211785a28b2a9a507b5ef882985bea42d87aa55
4
+ data.tar.gz: 32f4035f6239fc7d911baa3eaa1eefc9c064baa1d2848f3dd928d1d3a885ae70
5
5
  SHA512:
6
- metadata.gz: '0359999dd32f56220e88e3e860ff7e415a4fd2b978bf83768868b1e10b0013c9e02597731890d1a2abb2fd11c1e288e1c1e8056b3bd6bf7a11bc9589af371ae3'
7
- data.tar.gz: 33cf7a4428854d3016c1ccda045820e6da47a268e34f5bb05505bcc878ecdeff909caf1c411505d97849f4ffd69cc6e9c1c51a046ee92f6ee7ac2afe1919b359
6
+ metadata.gz: 40adb5c61122aab04ced114b0d380e052e0994ff6177d703bb34071763e83ac1bf7bdfcf41c803d6350e72d0085b1ce61a4377294925013189464142ff1b0ab1
7
+ data.tar.gz: e9b55be0ed1beef28548794c3d383209ce1fa100cccb70fe46c604209300156687647a1f4fb3436fa38773c0e0381277b03cc61ef00442009b18fae713e71717
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.5.6] - 2026-02-20
2
+
3
+ - Introduce an official Query concept
4
+
1
5
  # [0.5.5] - 2026-02-19
2
6
 
3
7
  - Fix bug where WeakObjectSet#delete could fail after deactivation
@@ -1,7 +1,7 @@
1
1
  module Foobara
2
2
  module CommandPatternImplementation
3
3
  module Concerns
4
- module Description
4
+ module CommandData
5
5
  include Concern
6
6
 
7
7
  module ClassMethods
@@ -16,6 +16,20 @@ module Foobara
16
16
  # :nocov:
17
17
  end
18
18
  end
19
+
20
+ def is_query
21
+ @is_query = true
22
+ end
23
+
24
+ # rubocop:disable Naming/MemoizedInstanceVariableName
25
+ def query?
26
+ return @is_query if defined?(@is_query)
27
+
28
+ @is_query = if superclass.respond_to?(:query?)
29
+ superclass.query?
30
+ end
31
+ end
32
+ # rubocop:enable Naming/MemoizedInstanceVariableName
19
33
  end
20
34
  end
21
35
  end
@@ -68,6 +68,10 @@ module Foobara
68
68
  ).declaration_data
69
69
  ).merge(description:)
70
70
 
71
+ if query?
72
+ h[:is_query] = true
73
+ end
74
+
71
75
  if result_type
72
76
  # TODO: find a way to represent literal types like "nil"
73
77
  h[:result_type] = result_type.reference_or_declaration_data_for_manifest
@@ -15,7 +15,7 @@ module Foobara
15
15
 
16
16
  include TruncatedInspect
17
17
 
18
- include CommandPatternImplementation::Concerns::Description
18
+ include CommandPatternImplementation::Concerns::CommandData
19
19
  include CommandPatternImplementation::Concerns::Namespace
20
20
 
21
21
  include CommandPatternImplementation::Concerns::InputsType
@@ -0,0 +1,7 @@
1
+ module Foobara
2
+ # TODO: we should probably include CommandPatternImplementation instead of inheriting from Foobara::Command
3
+ # but don't want to hunt down plumbing problems that might arise if Query isn't a Command
4
+ class Query < Foobara::Command
5
+ is_query
6
+ end
7
+ end
data/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Foobara
2
2
  module Version
3
- VERSION = "0.5.5".freeze
3
+ VERSION = "0.5.6".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.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -84,7 +84,7 @@ files:
84
84
  - projects/command/src/command.rb
85
85
  - projects/command/src/command_pattern_implementation.rb
86
86
  - projects/command/src/command_pattern_implementation/concerns/callbacks.rb
87
- - projects/command/src/command_pattern_implementation/concerns/description.rb
87
+ - projects/command/src/command_pattern_implementation/concerns/command_data.rb
88
88
  - projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb
89
89
  - projects/command/src/command_pattern_implementation/concerns/entities.rb
90
90
  - projects/command/src/command_pattern_implementation/concerns/errors.rb
@@ -102,6 +102,7 @@ files:
102
102
  - projects/command/src/extensions/domain/domain_module_extension.rb
103
103
  - projects/command/src/extensions/domain/domain_module_extension_extension.rb
104
104
  - projects/command/src/extensions/foobara.rb
105
+ - projects/command/src/query.rb
105
106
  - projects/command/src/state_machine.rb
106
107
  - projects/command_connectors/Guardfile
107
108
  - projects/command_connectors/lib/foobara/command_connectors.rb