makwa 1.0.1 → 1.0.3
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 +11 -0
- data/lib/makwa/interaction.rb +5 -2
- data/lib/makwa/returning_interaction.rb +5 -2
- data/lib/makwa/version.rb +1 -1
- data/makwa.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39c2e632adb09e11750166bd946d28514bbc0f5affc9abd20cf5d5c6428236eb
|
|
4
|
+
data.tar.gz: 38add41a243b3f8d896f5ad84276a71fd3b2c351317d2bf01a3741695fe29a92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db33162dd28e5e3f5a4fda88164e0bde18457bdf29fd71ecc25dc8ca2418dc3004af0b1484754b7d798549fdc856ddbc7b0cd750179ba0a6ed1bb616ad4b08b5
|
|
7
|
+
data.tar.gz: a0f01c2c9d86822aabd899a0db77d25120737fb156d494a678a73786fa0ce2e6fd8d44ce5ce93aee813d492654171ef90f0eb200637426fb7148dc05725bc378
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.0.3] - 2026-01-14
|
|
4
|
+
|
|
5
|
+
- Removes debug entries from the `Interaction#calling_interactions` call stack.
|
|
6
|
+
- Handles ReturningInteraction input filters that are not an attribute of the returned record when encountering validation errors.
|
|
7
|
+
|
|
8
|
+
## [1.0.2] - 2025-01-05
|
|
9
|
+
|
|
10
|
+
- Updates #return_if_errors! to not include errors in exception object. This addresses an issue where errors
|
|
11
|
+
are duplicated under the base key.
|
|
12
|
+
- Adds tests for failing composed interactions.
|
|
13
|
+
|
|
3
14
|
## [1.0.1] - 2022-12-01
|
|
4
15
|
|
|
5
16
|
- Fixes reference to nested class (symbol -> string)
|
data/lib/makwa/interaction.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Makwa
|
|
|
20
20
|
|
|
21
21
|
# Exits early if there are any errors.
|
|
22
22
|
def return_if_errors!
|
|
23
|
-
raise(Interrupt,
|
|
23
|
+
raise(Interrupt, ActiveInteraction::Errors.new(self)) if errors_any?
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
#
|
|
@@ -51,7 +51,10 @@ module Makwa
|
|
|
51
51
|
# @return [Array<String>] the callstack containing interactions only, starting with the immediate caller.
|
|
52
52
|
def calling_interactions
|
|
53
53
|
@calling_interactions ||= caller.find_all { |e|
|
|
54
|
-
e.index("/app/interactions/")
|
|
54
|
+
e.index("/app/interactions/") \
|
|
55
|
+
&& !e.index(__FILE__) \
|
|
56
|
+
&& !e.index("/returning_interaction.rb") \
|
|
57
|
+
&& !e.index("`debug'")
|
|
55
58
|
}
|
|
56
59
|
end
|
|
57
60
|
|
|
@@ -50,7 +50,10 @@ module Makwa
|
|
|
50
50
|
# Add errors and values to the result object (so that the form can render them) and return the result object
|
|
51
51
|
return result
|
|
52
52
|
.tap { |r| r.errors.merge!(errors) }
|
|
53
|
-
.tap { |r|
|
|
53
|
+
.tap { |r|
|
|
54
|
+
valid_attrs = inputs.except(return_filter).select { |key, _| r.respond_to?("#{key}=") }
|
|
55
|
+
r.assign_attributes(valid_attrs)
|
|
56
|
+
}
|
|
54
57
|
end
|
|
55
58
|
|
|
56
59
|
# Otherwise run the body of the interaction (along with any callbacks) ...
|
|
@@ -88,7 +91,7 @@ module Makwa
|
|
|
88
91
|
|
|
89
92
|
@_interaction_result
|
|
90
93
|
rescue NotImplementedError
|
|
91
|
-
super
|
|
94
|
+
super
|
|
92
95
|
end
|
|
93
96
|
end
|
|
94
97
|
end
|
data/lib/makwa/version.rb
CHANGED
data/makwa.gemspec
CHANGED
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
end
|
|
29
29
|
spec.require_paths = ["lib"]
|
|
30
30
|
|
|
31
|
-
spec.add_dependency "active_interaction", "~> 5.
|
|
31
|
+
spec.add_dependency "active_interaction", "~> 5.4.0"
|
|
32
32
|
|
|
33
33
|
spec.add_development_dependency "standard"
|
|
34
34
|
spec.add_development_dependency "byebug"
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: makwa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jo Hund
|
|
8
8
|
- Fabio Papa
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-01-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: active_interaction
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 5.
|
|
20
|
+
version: 5.4.0
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 5.
|
|
27
|
+
version: 5.4.0
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: standard
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- - ">="
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
55
|
version: '0'
|
|
56
|
-
description:
|
|
56
|
+
description:
|
|
57
57
|
email:
|
|
58
58
|
- jo@animikii.com
|
|
59
59
|
- fabio.papa@animikii.com
|
|
@@ -85,7 +85,7 @@ metadata:
|
|
|
85
85
|
homepage_uri: https://github.com/animikii/makwa
|
|
86
86
|
source_code_uri: https://github.com/animikii/makwa
|
|
87
87
|
changelog_uri: https://github.com/animikii/makwa/CHANGELOG.md
|
|
88
|
-
post_install_message:
|
|
88
|
+
post_install_message:
|
|
89
89
|
rdoc_options: []
|
|
90
90
|
require_paths:
|
|
91
91
|
- lib
|
|
@@ -100,8 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
100
100
|
- !ruby/object:Gem::Version
|
|
101
101
|
version: '0'
|
|
102
102
|
requirements: []
|
|
103
|
-
rubygems_version: 3.
|
|
104
|
-
signing_key:
|
|
103
|
+
rubygems_version: 3.4.20
|
|
104
|
+
signing_key:
|
|
105
105
|
specification_version: 4
|
|
106
106
|
summary: Interactions for Ruby on Rails apps.
|
|
107
107
|
test_files: []
|