foobara 0.0.139 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8006a38d251e55d5412171c8b420ef424bc93bf6ec6a9bc40b4dac34c6d71fe
4
- data.tar.gz: ed9d0a5a764be0a8c51f4a88f311207c18be2186721c0bea5476e3f87b51fd21
3
+ metadata.gz: e9ef91ca57cf88a6ce345e68697517ec5459bfbfda3be8958d2194cc1d46bc75
4
+ data.tar.gz: f77080a972b301496787bc4c1c0108e5721ab8364c1c3e818f2541498a4b131a
5
5
  SHA512:
6
- metadata.gz: 79d0287f4d63260543b050bf6122ed66f339b981726aae6917731e19467364c3e4a2542546d574e591cac6e464a14379dbaa729dababf0bb9a67eac1488a51be
7
- data.tar.gz: 2deb90d284941caddbdab98a9adf48273d84d9d56ac791ef98907ab8ddaaa6072712f66425387e66e09d4a1ad330179a57ebaa0ac5c73a263af2cbb48d4b0385
6
+ metadata.gz: 1b3c6ff758814d7706ccdaa3e3da6921929b8b0d2ac9d9404e2033d408af3654ffe96c66448b57c8394a2d144c95979092e1b75e6bd130d9363596fd1a9daae0
7
+ data.tar.gz: 7e4eb5c7411d3d02e1b65deca964a82bf0a495936c40613a1820afdada14a031be882d2f28aba5d2a3c43cad54381ed81888b77aa0c52c32c8582a44b9108a27
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
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
+
1
6
  # [0.0.139] - 2025-07-23
2
7
 
3
8
  - Add back an ErrorCollection method that some external projects depend on
@@ -46,7 +46,7 @@ module Foobara
46
46
  attr_accessor :_method_missing_disabled
47
47
 
48
48
  def _to_declaration(&)
49
- instance_eval(&)
49
+ instance_exec(&)
50
50
  _type_declaration
51
51
  end
52
52
 
@@ -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
- unless args.empty?
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.139
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: 1980-01-02 00:00:00.000000000 Z
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.9
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