foobara 0.0.107 → 0.0.108

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: a8a5a11223a3bc2f8aebf691c6bc8f0d0bdb05930286f9c1e16f2f1ac8f82756
4
- data.tar.gz: 07f8edc98723f2297413d12065483d0a80f1b641ca0088fab99434c59cba4d4c
3
+ metadata.gz: a6229c57edc14afe9facb9e97af267fcd15e451ee8bf2acef8570eb6c5ec10e4
4
+ data.tar.gz: 2a7df403a2735b6c6f539bfad23c95d211e90d40c01bead9390060655a1c7f1b
5
5
  SHA512:
6
- metadata.gz: 4a75a392d55df8390b3d483b8a1d670d0b466783921fe2808961c18d4587644e82f515734cf49fac1ae9d42c8ed19a084d3562131e70ec9259ea5cdfaee945f1
7
- data.tar.gz: 939caca7112b46752613e9427471c1c0dc0d422fd24d571d379973bae3a169f71816cbbffb0df2ff939a213c7bc16ae104c6416d3c0f3003ce96be5a748aca52
6
+ metadata.gz: 79936bf327a870ac068df58619239b36e79ef48bf75263feba30a67c16e01202757d0d7428851cfb0c8234cc60ed8454f4a41ce61da8f027bd49a5236c6bf4d4
7
+ data.tar.gz: 624175000edf49d2188a15a8b418d3927b757660c6637fe8916a6a87a6d3793aef5db2ae0985f7892327910eae872c0ecfed55bde53caaf416b0f490de11d6f0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.0.108] - 2025-04-22
2
+
3
+ - Fix bug in CommandConnector::NotFoundError constructor
4
+
1
5
  # [0.0.107] - 2025-04-22
2
6
 
3
7
  - Make sure various Foobara::Error subclasses have consistent interfaces
@@ -3,9 +3,27 @@ require_relative "command_connector_error"
3
3
  module Foobara
4
4
  class CommandConnector
5
5
  class NotFoundError < CommandConnectorError
6
+ class << self
7
+ def for(not_found)
8
+ if not_found
9
+ new(context: { not_found: }, message: "Not found: #{not_found}")
10
+ else
11
+ new
12
+ end
13
+ end
14
+ end
15
+
6
16
  context not_found: :string
7
17
 
8
- def initialize(message: "Not found: #{context[:not_found]}", **)
18
+ def initialize(message: nil, context: nil, **)
19
+ if context
20
+ not_found = context[:not_found]
21
+ message ||= "Not found: #{not_found}"
22
+ else
23
+ context = {}
24
+ message ||= "Not found"
25
+ end
26
+
9
27
  super
10
28
  end
11
29
  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.0.107
4
+ version: 0.0.108
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi