foobara 0.0.12 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/projects/builtin_types/src/duck/supported_validators/one_of.rb +12 -0
- data/projects/command/src/concerns/errors.rb +1 -1
- data/projects/command/src/concerns/runtime.rb +3 -0
- data/projects/foobara/lib/foobara.rb +4 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38b777d54529187c23d8a7f67337c5cb6f841d06ca01efe3635c003359f38b47
|
4
|
+
data.tar.gz: 91bbdf579b22f6c2978180142846d8d5f14a7751840cc89b6b06d70248247f33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f06ee9edaf6d45318abe7ad05b1a9932895443eb72a42d8fe25baa0ad5c2b666f1bacc38a14ea1d390bb75f5283ec64ccf77e2f0a3be1cc05b67e95422220371
|
7
|
+
data.tar.gz: 1facc5ea85dfab04ec0f97d96090c512c75cb676cdebde0ebbed0c981d01d4cc8780d1c2533fb2f74b8322e0c62db0caa81a838ab8d09619458d943985dee065
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.0.14] - 2024-11-15
|
2
|
+
|
3
|
+
- Provide a default execute because why not...
|
4
|
+
- Allow require "foobara" instead of require "foobara/all"
|
5
|
+
|
6
|
+
## [0.0.13] - 2024-11-13
|
7
|
+
|
8
|
+
- Do not fail :one_of if it is nil and :allows_nil
|
9
|
+
|
1
10
|
## [0.0.12] - 2024-10-30
|
2
11
|
|
3
12
|
- Support delayed command connection
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ run `foob generate ruby-project --name your-org/your-new-project-name`
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
-
|
17
|
+
You can find a code demo video and an overview video of what Foobara is at https://foobara.com
|
18
18
|
|
19
19
|
## Contributing
|
20
20
|
|
@@ -3,6 +3,12 @@ module Foobara
|
|
3
3
|
module Duck
|
4
4
|
module SupportedValidators
|
5
5
|
class OneOf < TypeDeclarations::Validator
|
6
|
+
class << self
|
7
|
+
def requires_parent_declaration_data?
|
8
|
+
true
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class ValueNotValidError < Foobara::Value::DataError
|
7
13
|
class << self
|
8
14
|
def context_type_declaration
|
@@ -18,6 +24,12 @@ module Foobara
|
|
18
24
|
declaration_data
|
19
25
|
end
|
20
26
|
|
27
|
+
def applicable?(value)
|
28
|
+
# Might there be some way this validator could be marked not-applicable that doesn't require coupling
|
29
|
+
# this processor to allow_nil? (or vice-versa)
|
30
|
+
!value.nil? || !parent_declaration_data[:allow_nil]
|
31
|
+
end
|
32
|
+
|
21
33
|
def validation_errors(value)
|
22
34
|
unless valid_values.include?(value)
|
23
35
|
build_error(value)
|
@@ -90,7 +90,7 @@ module Foobara
|
|
90
90
|
end
|
91
91
|
|
92
92
|
error_class = self.class.lookup_input_error_class(symbol, path)
|
93
|
-
error_class.new(**error_args
|
93
|
+
error_class.new(**error_args, path:)
|
94
94
|
elsif args.size == 2 || args.size == 3
|
95
95
|
input, symbol, message = args
|
96
96
|
context = opts
|
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.
|
4
|
+
version: 0.0.14
|
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-
|
11
|
+
date: 2024-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foobara-util
|
@@ -214,6 +214,7 @@ files:
|
|
214
214
|
- projects/enumerated/lib/foobara/enumerated.rb
|
215
215
|
- projects/enumerated/src/accessors.rb
|
216
216
|
- projects/enumerated/src/values.rb
|
217
|
+
- projects/foobara/lib/foobara.rb
|
217
218
|
- projects/foobara/lib/foobara/all.rb
|
218
219
|
- projects/in_memory_crud_driver/lib/foobara/in_memory_crud_driver.rb
|
219
220
|
- projects/in_memory_crud_driver/src/in_memory.rb
|
@@ -399,7 +400,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
400
|
- !ruby/object:Gem::Version
|
400
401
|
version: '0'
|
401
402
|
requirements: []
|
402
|
-
rubygems_version: 3.5.
|
403
|
+
rubygems_version: 3.5.23
|
403
404
|
signing_key:
|
404
405
|
specification_version: 4
|
405
406
|
summary: Implements command pattern for encapsulating and managing domain complexity
|