foobara 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53375c9393cbdf5594959c3233650f0cd08b78fc2bf3a07863debcdf12c4f2d9
4
- data.tar.gz: 388d748e47be7c602bd79661f1265ecb276b290f067e7c8114231d8a8cb5319f
3
+ metadata.gz: 0526c0ae0c3728d7286fc90703fbf82192784b3b0b80379aafa5dfe142e48d36
4
+ data.tar.gz: 6d1b3840a0a1f94a763e844a0230d90715e4aa0f3fffb16abce6bc9837e08e18
5
5
  SHA512:
6
- metadata.gz: 7ce8fdd0b10b5ab7935c8f41dd461be81bbcd9805ead1c81619abafb4f169bf8e38c592818da7f0a0969fde1da214ba7f718e78d70e042b3279facf4224d8c30
7
- data.tar.gz: 72beca35aa357bb745d2fdf61b910d8aeba8f51d7fd897e1f94cba02191a41cdacf1c08ff38085da8f094d6e8bf56629bd4a607fc7a1b49ff38d162c6a7c0a5f
6
+ metadata.gz: 2bff7c76cfa36de8d054ef114f9b80f7bde028f7195fb496f793e374f7455e7adcb8e715f6b02f0f2aea047b8e9c1524975017a1fefbead0c59dcad7dc1c3206
7
+ data.tar.gz: b63d6ec995d9139e7ab86209f9f05d527609ab0f95e0d951dac753cfb9a50f35eac48b17c171e3880d50448ec2dcb0979b9c352a66162bfb8295ae99fe6f561d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
- ## [0.0.24] - 2024-12-03
1
+ ## [0.0.25] - 2024-12-03
2
2
 
3
+ - Make sure errors created via Command.possible_*error are namespaced to that command
3
4
  - Allow passing all Error subclass parameters into possible_*error calls
4
5
  - Allow creating entity types from declaration without model_module
5
6
  - Make model classes with an mutable of false have instances that default to immutable
@@ -44,6 +44,7 @@ module Foobara
44
44
  symbol, subclass_parameters, data = args
45
45
 
46
46
  error_class = Foobara::RuntimeError.subclass(
47
+ mod: self,
47
48
  **subclass_parameters,
48
49
  symbol:
49
50
  )
@@ -68,7 +69,9 @@ module Foobara
68
69
  symbol_or_error_class
69
70
  else
70
71
  Foobara::DataError.subclass(
71
- **error_class_or_subclass_parameters, symbol: symbol_or_error_class
72
+ mod: self,
73
+ **error_class_or_subclass_parameters,
74
+ symbol: symbol_or_error_class
72
75
  )
73
76
  end
74
77
 
@@ -98,11 +98,12 @@ module Foobara
98
98
  symbol: nil,
99
99
  message: nil,
100
100
  base_error: self,
101
+ mod: base_error,
101
102
  category: base_error.category,
102
103
  is_fatal: false,
103
104
  abstract: false
104
105
  )
105
- name ||= "#{base_error.name}::#{Util.classify(symbol)}Error"
106
+ name ||= [*mod.name, "#{Util.classify(symbol)}Error"].join("::")
106
107
 
107
108
  klass = Util.make_class_p(name, base_error) do
108
109
  singleton_class.define_method :category do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-03 00:00:00.000000000 Z
11
+ date: 2024-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foobara-util