active_interaction 4.0.5 → 4.0.6
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: 8ea0d31fc8d2cf65540edb64cc51b1b3a31205a5f4a179fd56ecdb1606d84c9f
|
4
|
+
data.tar.gz: fd79ef266a8357bad053b282068b0fe5bfb3cf677f778b97ebe373b7c9c9a216
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4070194c1bcf654043c65e340abf6a1be0977282c214636511cb5188cace08a81a34ef811f9d3a369b7dc10a8ce8fcdda6a563c69fe34435fef6618c67dc5b7
|
7
|
+
data.tar.gz: 446e6ccc7f28132c70808817b3db99b5852486f1c097212aea861db4235da1df676c1cd3751019425a34f84b6590b9c06e954b31ae3c8dc32cf0843ea3c7d326
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [4.0.6][] (2021-10-13)
|
2
|
+
|
3
|
+
## Fix
|
4
|
+
|
5
|
+
- [#515][] - Filters nested in arrays should accept default values as indicated in the documentation.
|
6
|
+
|
1
7
|
# [4.0.5][] (2021-07-11)
|
2
8
|
|
3
9
|
## Fix
|
@@ -964,6 +970,7 @@ Example.run
|
|
964
970
|
|
965
971
|
- Initial release.
|
966
972
|
|
973
|
+
[4.0.6]: https://github.com/AaronLasseigne/active_interaction/compare/v4.0.5...v4.0.6
|
967
974
|
[4.0.5]: https://github.com/AaronLasseigne/active_interaction/compare/v4.0.4...v4.0.5
|
968
975
|
[4.0.4]: https://github.com/AaronLasseigne/active_interaction/compare/v4.0.3...v4.0.4
|
969
976
|
[4.0.3]: https://github.com/AaronLasseigne/active_interaction/compare/v4.0.2...v4.0.3
|
@@ -1182,3 +1189,4 @@ Example.run
|
|
1182
1189
|
[#511]: https://github.com/AaronLasseigne/active_interaction/issues/511
|
1183
1190
|
[#412]: https://github.com/AaronLasseigne/active_interaction/issues/412
|
1184
1191
|
[#480]: https://github.com/AaronLasseigne/active_interaction/issues/480
|
1192
|
+
[#515]: https://github.com/AaronLasseigne/active_interaction/issues/515
|
@@ -91,7 +91,7 @@ module ActiveInteraction
|
|
91
91
|
|
92
92
|
filters[filters.size.to_s.to_sym] = filter
|
93
93
|
|
94
|
-
validate!(
|
94
|
+
validate!(names)
|
95
95
|
end
|
96
96
|
end
|
97
97
|
# rubocop:enable Style/MissingRespondToMissing
|
@@ -100,13 +100,11 @@ module ActiveInteraction
|
|
100
100
|
# @param names [Array<Symbol>]
|
101
101
|
#
|
102
102
|
# @raise [InvalidFilterError]
|
103
|
-
def validate!(
|
103
|
+
def validate!(names)
|
104
104
|
raise InvalidFilterError, 'multiple filters in array block' if filters.size > 1
|
105
105
|
|
106
106
|
raise InvalidFilterError, 'attribute names in array block' unless names.empty?
|
107
107
|
|
108
|
-
raise InvalidDefaultError, 'default values in array block' if filter.default?
|
109
|
-
|
110
108
|
nil
|
111
109
|
end
|
112
110
|
end
|
@@ -25,14 +25,6 @@ describe ActiveInteraction::ArrayFilter, :filter do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
context 'with a nested default' do
|
29
|
-
let(:block) { proc { array default: nil } }
|
30
|
-
|
31
|
-
it 'raises an error' do
|
32
|
-
expect { filter }.to raise_error ActiveInteraction::InvalidDefaultError
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
28
|
describe '#cast' do
|
37
29
|
let(:result) { filter.send(:cast, value, nil) }
|
38
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_interaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lasseigne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
324
|
- !ruby/object:Gem::Version
|
325
325
|
version: '0'
|
326
326
|
requirements: []
|
327
|
-
rubygems_version: 3.2.
|
327
|
+
rubygems_version: 3.2.15
|
328
328
|
signing_key:
|
329
329
|
specification_version: 4
|
330
330
|
summary: Manage application specific business logic.
|