foobara 0.0.138 → 0.0.140
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/projects/common/src/error_collection.rb +7 -0
- data/projects/type_declarations/lib/foobara/type_declarations.rb +6 -3
- data/projects/type_declarations/src/dsl/attributes.rb +1 -1
- data/projects/type_declarations/src/type_builder.rb +6 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9ef91ca57cf88a6ce345e68697517ec5459bfbfda3be8958d2194cc1d46bc75
|
4
|
+
data.tar.gz: f77080a972b301496787bc4c1c0108e5721ab8364c1c3e818f2541498a4b131a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b3c6ff758814d7706ccdaa3e3da6921929b8b0d2ac9d9404e2033d408af3654ffe96c66448b57c8394a2d144c95979092e1b75e6bd130d9363596fd1a9daae0
|
7
|
+
data.tar.gz: 7e4eb5c7411d3d02e1b65deca964a82bf0a495936c40613a1820afdada14a031be882d2f28aba5d2a3c43cad54381ed81888b77aa0c52c32c8582a44b9108a27
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# [0.0.140] - 2025-07-25
|
2
|
+
|
3
|
+
- Support result :array, &block style for declaring result type
|
4
|
+
- Fix bug preventing using lambdas in attributes DSL
|
5
|
+
|
6
|
+
# [0.0.139] - 2025-07-23
|
7
|
+
|
8
|
+
- Add back an ErrorCollection method that some external projects depend on
|
9
|
+
- Allow reset_all to be called when it's part of install!'s implementation
|
10
|
+
|
1
11
|
# [0.0.138] - 2025-07-23
|
2
12
|
|
3
13
|
- Allow #foobara_unregister by symbol, string, or array path
|
@@ -25,6 +25,13 @@ module Foobara
|
|
25
25
|
# :nocov:
|
26
26
|
end
|
27
27
|
|
28
|
+
def error_array
|
29
|
+
# :nocov:
|
30
|
+
warn "DEPRECATED: Do not call ErrorCollection#errors instead just use the collection directly."
|
31
|
+
self
|
32
|
+
# :nocov:
|
33
|
+
end
|
34
|
+
|
28
35
|
def each_error(&)
|
29
36
|
# :nocov:
|
30
37
|
warn "DEPRECATED: This method will be deprecated in the coming version"
|
@@ -1,8 +1,11 @@
|
|
1
1
|
module Foobara
|
2
2
|
module TypeDeclarations
|
3
3
|
class << self
|
4
|
-
def reset_all
|
5
|
-
|
4
|
+
def reset_all(skip_check: nil)
|
5
|
+
unless skip_check
|
6
|
+
Foobara.raise_if_production!("reset_all")
|
7
|
+
end
|
8
|
+
|
6
9
|
# TODO: this doesn't really belong here. I think we need to maybe call reset in reverse order?
|
7
10
|
Foobara::Domain::DomainModuleExtension.all.each do |domain|
|
8
11
|
var = "@foobara_type_builder"
|
@@ -82,7 +85,7 @@ module Foobara
|
|
82
85
|
def install!
|
83
86
|
capture_current_namespaces
|
84
87
|
|
85
|
-
reset_all
|
88
|
+
reset_all(skip_check: true)
|
86
89
|
|
87
90
|
Foobara::Error.include(ErrorExtension)
|
88
91
|
|
@@ -6,13 +6,15 @@ module Foobara
|
|
6
6
|
# TODO: relocate these to a different file
|
7
7
|
def args_to_type_declaration(*args, &block)
|
8
8
|
if block
|
9
|
-
|
9
|
+
if args.empty? || args == [:attributes]
|
10
|
+
block
|
11
|
+
elsif args == [:array]
|
12
|
+
{ type: :array, element_type_declaration: block }
|
13
|
+
else
|
10
14
|
# :nocov:
|
11
|
-
raise ArgumentError, "Cannot provide both block and declaration"
|
15
|
+
raise ArgumentError, "Cannot provide both block and declaration of #{args}"
|
12
16
|
# :nocov:
|
13
17
|
end
|
14
|
-
|
15
|
-
block
|
16
18
|
else
|
17
19
|
case args.size
|
18
20
|
when 0
|
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.
|
4
|
+
version: 0.0.140
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-07-25 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|
@@ -535,7 +535,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
535
535
|
- !ruby/object:Gem::Version
|
536
536
|
version: '0'
|
537
537
|
requirements: []
|
538
|
-
rubygems_version: 3.6.
|
538
|
+
rubygems_version: 3.6.2
|
539
539
|
specification_version: 4
|
540
540
|
summary: A command-centric and discoverable software framework with a focus on domain
|
541
541
|
concepts and abstracting away integration code
|