foobara 0.0.64 → 0.0.66

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: 57076f6987a22c895a9ce9b024b2a7e05ffcaa5d96719dedc168cb029404a185
4
- data.tar.gz: b1616575b7778d1ff2597a4c208fda89e544dbe77f3bf0a1ee724c6d5e753aae
3
+ metadata.gz: ea460482cfe0fec3758456921fa35e5fa513f20af9e46bd498c5f9e6045c688f
4
+ data.tar.gz: 6ec6b3e1d1f4bad99ff10acb327030b591ff5351af3406d1de649a6aefe86e8a
5
5
  SHA512:
6
- metadata.gz: bfb5adcce767f972f766372d23a473ca5598eb281809b5ee64a62e4a08265326e8aae3c6a6698be9cb3a1dedf87f8e32e33bd75a416181fcca7c2cdce2c0d05a
7
- data.tar.gz: b2654dadfc19dda6fa4019715ede5b7ad0bc06e17232dff595cdeeff6ddfdd0da2bbf5e7df42b2f63d66a5ba56eed4d38d6c4e6dffcf2823ca001ac7ddd8a0dc
6
+ metadata.gz: 5479c10f06fa14c5889deda44e978a11921814939280353d62709aaf780be5560c845e94333ca6e3df223696f390f409df6c11996b0e7ccde7a86491db687015
7
+ data.tar.gz: 216208e16f0238c567081e3b6e3f51ef83a5f24df14fb99d37e9a4a0d0fb0494b30b3b681e6f7295aee297f29cd581a3a852f595cc58c572a45cbee7c546e33f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.0.66] - 2025-02-26
2
+
3
+ - Make sure methods like Command::Manifest#inputs_types_depended_on return [] instead of nil when missing
4
+
5
+ ## [0.0.65] - 2025-02-26
6
+
7
+ - Fix a problem when looking up domain mappers with a symbol value that doesn't represent a type
8
+
1
9
  ## [0.0.64] - 2025-02-25
2
10
 
3
11
  - Fix bug where DomainMappers created after commands have ran wouldn't be detected
@@ -58,7 +58,7 @@ module Foobara
58
58
 
59
59
  type = object_to_type(type_indicator)
60
60
 
61
- return 1 if type.nil?
61
+ return 0 if type.nil?
62
62
  return 9 if type == value
63
63
 
64
64
  return 5 if type.applicable?(value) && type.process_value(value).success?
@@ -104,7 +104,7 @@ module Foobara
104
104
  when Types::Type
105
105
  object
106
106
  when ::Symbol
107
- domain.foobara_lookup_type!(object)
107
+ domain.foobara_lookup_type(object)
108
108
  end
109
109
  end
110
110
  end
@@ -32,27 +32,27 @@ module Foobara
32
32
  end
33
33
 
34
34
  def types_depended_on
35
- @types_depended_on ||= self[:types_depended_on].map do |type_reference|
35
+ @types_depended_on ||= self[:types_depended_on]&.map do |type_reference|
36
36
  Type.new(root_manifest, [:type, type_reference])
37
- end
37
+ end || []
38
38
  end
39
39
 
40
40
  def inputs_types_depended_on
41
- @inputs_types_depended_on ||= self[:inputs_types_depended_on].map do |type_reference|
41
+ @inputs_types_depended_on ||= self[:inputs_types_depended_on]&.map do |type_reference|
42
42
  Type.new(root_manifest, [:type, type_reference])
43
- end
43
+ end || []
44
44
  end
45
45
 
46
46
  def result_types_depended_on
47
- @result_types_depended_on ||= self[:result_types_depended_on].to_set do |type_reference|
47
+ @result_types_depended_on ||= self[:result_types_depended_on]&.to_set do |type_reference|
48
48
  Type.new(root_manifest, [:type, type_reference])
49
- end
49
+ end || Set.new
50
50
  end
51
51
 
52
52
  def errors_types_depended_on
53
- @errors_types_depended_on ||= self[:errors_types_depended_on].to_set do |type_reference|
53
+ @errors_types_depended_on ||= self[:errors_types_depended_on]&.to_set do |type_reference|
54
54
  Type.new(root_manifest, [:type, type_reference])
55
- end
55
+ end || Set.new
56
56
  end
57
57
  end
58
58
  end
@@ -154,6 +154,10 @@ module Foobara
154
154
  def target_class
155
155
  if target_classes.empty?
156
156
  # :nocov:
157
+ # TODO: We really need a better error message when we hit this point in the code path.
158
+ # One thing that can cause this is if you create a custom type called :model but it isn't loaded
159
+ # yet and we accidentally are referring to the builtin :model type. This error message doesn't reveal
160
+ # that you need to require the custom :model.
157
161
  raise "No target classes"
158
162
  # :nocov:
159
163
  elsif target_classes.size > 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.64
4
+ version: 0.0.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-25 00:00:00.000000000 Z
10
+ date: 2025-02-26 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal