foobara 0.0.50 → 0.0.51

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: 046fdc3bab52559499e744edbde0ef847e26c4e6107423779351a26acc654619
4
- data.tar.gz: 56174a565dafcdf3cd03a66e791be3d5a6074bd426c203371b6d7f41fa3a7e12
3
+ metadata.gz: e82271074f7658b6b54239b1ba4e79c944baca14bc63af1fd48e7b5d5c418043
4
+ data.tar.gz: f5f0dcd5bcd9e553dbcdbab70f4e9388ab98c99b4359aca8bfaf4d32fad89e7a
5
5
  SHA512:
6
- metadata.gz: ca08c711d53d11eb7ee073d040163df8bfe23c69b4b8e4c4f9647c6d216578755388b009b6d67e2cf988cc4e043413bfbe8f4f78ecb7690f713191cf00474255
7
- data.tar.gz: a3b1e726a7295d1a0e4d22ef8f7a8130b39d57a1576f07f3f36bb20347ffce4bde07d6205c9c2853b392f47542ef7c696de57ab02c7c11d463484e3f5eebc779
6
+ metadata.gz: 33ce048fb57a1c12811756a5d1b9238b0b79587993d6f45323f65294cca6bcd46d33bc281e9021070c21e6f5852e9066927cb8e78a7f2f62c29b3e705ab95e4c
7
+ data.tar.gz: 59cde8f01b6c5e74e69b78e951ea74cb4f85eecb9f41b1f7a1c79cd6f9f5ce4e492109c8b860aefcfd73f832355e0a912796d10b0e3a67d456921b06a7da62ed
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.51] - 2025-01-26
2
+
3
+ - Add a Type#remove_processor_by_symbol method to help with certain situations when defining custom types
4
+
1
5
  ## [0.0.50] - 2025-01-22
2
6
 
3
7
  - Fill out more foobara_ model attribute helper methods to further support the ActiveRecordType gem
@@ -4,7 +4,6 @@ module Foobara
4
4
  module CommandConnectors
5
5
  module Serializers
6
6
  class SuccessSerializer < Serializer
7
- # TODO: always_applicable? instead?
8
7
  def always_applicable?
9
8
  request.outcome.success?
10
9
  end
@@ -101,6 +101,21 @@ module Foobara
101
101
  end
102
102
  end
103
103
 
104
+ def remove_processor_by_symbol(symbol)
105
+ [
106
+ casters,
107
+ element_processors,
108
+ processor_classes_requiring_type,
109
+ processors,
110
+ transformers,
111
+ validators
112
+ ].each do |processor_collection|
113
+ processor_collection&.delete_if { |p| p.symbol == symbol }
114
+ end
115
+ supported_processor_classes&.each { |processor_hash| processor_hash.delete(symbol) }
116
+ processor_classes_requiring_type&.delete_if { |p| p.symbol == symbol }
117
+ end
118
+
104
119
  def each_processor_class_requiring_type(&block)
105
120
  base_type&.each_processor_class_requiring_type(&block)
106
121
 
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.50
4
+ version: 0.0.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-22 00:00:00.000000000 Z
10
+ date: 2025-01-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal