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: cc966bbcee80b29757efdf5bf0b6b0357b8d24610dca49017f4a8cdca64bfaa3
4
- data.tar.gz: fe255f995b77c90c935fb14ae05660fcc973a3e7ef3e26209d5e1e187624ca21
3
+ metadata.gz: 8ea0d31fc8d2cf65540edb64cc51b1b3a31205a5f4a179fd56ecdb1606d84c9f
4
+ data.tar.gz: fd79ef266a8357bad053b282068b0fe5bfb3cf677f778b97ebe373b7c9c9a216
5
5
  SHA512:
6
- metadata.gz: 233b8b4334a5f4d34d12607c054a47aa4839f9c734cd251b682f30173aaa5115e0d8292c0074efd21137a966831b635d2a4e4f3c55f6cb282bb78ed6f795450e
7
- data.tar.gz: a5fef4055b48c4c72f3f297f52260f0fe4055a2299961d0fd70ebfd7fcfadc2814628a01cec947259e4b99620fc9a2ee313baaa373449aadeba62829eea7be00
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!(filter, names)
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!(filter, names)
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
@@ -4,5 +4,5 @@ module ActiveInteraction
4
4
  # The version number.
5
5
  #
6
6
  # @return [Gem::Version]
7
- VERSION = Gem::Version.new('4.0.5')
7
+ VERSION = Gem::Version.new('4.0.6')
8
8
  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.5
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-07-11 00:00:00.000000000 Z
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.3
327
+ rubygems_version: 3.2.15
328
328
  signing_key:
329
329
  specification_version: 4
330
330
  summary: Manage application specific business logic.