foobara 0.0.127 → 0.0.129
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b1706d7c689286e46b908cf33a5cbb73150f3c74111b9b5b7ebb18ca44bc64
|
4
|
+
data.tar.gz: b28594fe6a5e374f3c2b857b5f90c3af65b7f5e6e2b7f2ebaef806bf2c39fa39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fdd98642fe183f25a31d680c0362828d7cd8d68a9f0e02d80235991a3bf67a7c4e8671fc9552da3ed50e991bca009912e8de6fa688c8039eef61a4d752b52f6
|
7
|
+
data.tar.gz: 63ad9eadd3b77791cc6a04f63831cacfd11cc06b04691d93bba68ab309a506326c44dcccd664bc14d57914e7c4bca1425c8a99ea36e93e3259f0e173f681779e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [0.0.129] - 2025-05-30
|
2
|
+
|
3
|
+
- Store the raw, unprocessed, command result for debugging/introspection
|
4
|
+
|
5
|
+
# [0.0.128] - 2025-05-29
|
6
|
+
|
7
|
+
- Add StateMachine.for convenience method
|
8
|
+
|
1
9
|
# [0.0.127] - 2025-05-25
|
2
10
|
|
3
11
|
- Add better support for using ruby classes as types
|
@@ -18,6 +18,7 @@ module Foobara
|
|
18
18
|
end
|
19
19
|
|
20
20
|
attr_reader :outcome, :exception
|
21
|
+
attr_accessor :raw_result
|
21
22
|
|
22
23
|
def run!
|
23
24
|
run.result!
|
@@ -67,7 +68,7 @@ module Foobara
|
|
67
68
|
end
|
68
69
|
|
69
70
|
def run_execute
|
70
|
-
raw_result = execute
|
71
|
+
self.raw_result = execute
|
71
72
|
result = process_result_using_result_type(raw_result)
|
72
73
|
@outcome = Outcome.success(result)
|
73
74
|
end
|
@@ -3,6 +3,8 @@ module Foobara
|
|
3
3
|
require_project_file("state_machine", "callbacks")
|
4
4
|
require_project_file("state_machine", "validations")
|
5
5
|
|
6
|
+
# TODO: allow quick creation of a statemachine either through better options to #initialize or a
|
7
|
+
# .for method.
|
6
8
|
class StateMachine
|
7
9
|
include Sugar
|
8
10
|
include Callbacks
|
@@ -32,6 +34,13 @@ module Foobara
|
|
32
34
|
create_can_methods
|
33
35
|
create_register_callback_methods
|
34
36
|
end
|
37
|
+
|
38
|
+
def for(transition_map)
|
39
|
+
klass = Class.new(self)
|
40
|
+
|
41
|
+
klass.set_transition_map(transition_map)
|
42
|
+
klass
|
43
|
+
end
|
35
44
|
end
|
36
45
|
|
37
46
|
attr_accessor :target_attribute, :owner
|
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.129
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|
@@ -529,7 +529,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
529
529
|
- !ruby/object:Gem::Version
|
530
530
|
version: '0'
|
531
531
|
requirements: []
|
532
|
-
rubygems_version: 3.6.
|
532
|
+
rubygems_version: 3.6.7
|
533
533
|
specification_version: 4
|
534
534
|
summary: A command-centric and discoverable software framework with a focus on domain
|
535
535
|
concepts and abstracting away integration code
|