active_interaction 5.1.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1205bfc3c95589bd74fdb6395e09573c01210a95bf5d6644b70fef11cacea914
4
- data.tar.gz: 2494a61529d645f6dcfaef940e4d54e404bda94eb78eabbac605dcc14221e422
3
+ metadata.gz: b90b2dc28188b224ed0aa986afb739056dbd2407061da2dfee81b825c5674ca9
4
+ data.tar.gz: 755707a0f9554cee89a08567245f3d78d597a8b7ae7ec671c3eb572f4dd5a881
5
5
  SHA512:
6
- metadata.gz: 6037171bd7f2ddc2af0204e2af5fdf0140725678698e7c4fa27875f16446c7c8be0b69aa83da30626bf9fe96ae00a5f76ffc92274cfd9654abad355e611df7ed
7
- data.tar.gz: fac17df5266c5a72809fbc32ab3e84d840b35fe59cb2d483511b27c46beaec197b5a5e669d740ef023bf064df82a8ac8d5cbcd94bba60b3c5e0ba72969b385c2
6
+ metadata.gz: d24433ef35282b38531e2e18c1e426f69f9cc71692fdb2d96e21f3c420b56a6bb42c3f473b255890b457ab3d1764d6b132ec7f30260437d732ced70b083d217a
7
+ data.tar.gz: dd2ce32a0c59afa9f5fe1a8134aa82e98404b1e0d5a3a3801b8dd7a726f75f28d16de46c72687c3e5f807db0576936e0a34abe3b26201dd2c58c90c798df10d5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [5.2.0][] (2022-10-22)
2
+
3
+ ## Added
4
+
5
+ - Added translation for Spanish. Thanks @matiasasis!
6
+
7
+ ## Fixed
8
+
9
+ - [#545][] - Arrays passed in are no longer modified. Thanks @jonkgrimes!
10
+
11
+ ## Added
12
+
1
13
  # [5.1.1][] (2022-09-01)
2
14
 
3
15
  ## Fixed
@@ -1118,6 +1130,7 @@ Example.run
1118
1130
 
1119
1131
  - Initial release.
1120
1132
 
1133
+ [5.2.0]: https://github.com/AaronLasseigne/active_interaction/compare/v5.1.1...v5.2.0
1121
1134
  [5.1.1]: https://github.com/AaronLasseigne/active_interaction/compare/v5.1.0...v5.1.1
1122
1135
  [5.1.0]: https://github.com/AaronLasseigne/active_interaction/compare/v5.0.0...v5.1.0
1123
1136
  [5.0.0]: https://github.com/AaronLasseigne/active_interaction/compare/v4.1.0...v5.0.0
@@ -1347,3 +1360,4 @@ Example.run
1347
1360
  [#536]: https://github.com/AaronLasseigne/active_interaction/issues/536
1348
1361
  [#537]: https://github.com/AaronLasseigne/active_interaction/issues/537
1349
1362
  [#539]: https://github.com/AaronLasseigne/active_interaction/issues/539
1363
+ [#545]: https://github.com/AaronLasseigne/active_interaction/issues/545
data/README.md CHANGED
@@ -65,13 +65,13 @@ handles your verbs.
65
65
  Add it to your Gemfile:
66
66
 
67
67
  ``` rb
68
- gem 'active_interaction', '~> 5.1'
68
+ gem 'active_interaction', '~> 5.2'
69
69
  ```
70
70
 
71
71
  Or install it manually:
72
72
 
73
73
  ``` sh
74
- $ gem install active_interaction --version '~> 5.1'
74
+ $ gem install active_interaction --version '~> 5.2'
75
75
  ```
76
76
 
77
77
  This project uses [Semantic Versioning][]. Check out [GitHub releases][] for a
@@ -49,7 +49,7 @@ module ActiveInteraction
49
49
  children = []
50
50
 
51
51
  unless filters.empty?
52
- value.map! do |item|
52
+ value = value.map do |item|
53
53
  result = filters[:'0'].process(item, context)
54
54
  children.push(result)
55
55
  result.value
@@ -0,0 +1,23 @@
1
+ es:
2
+ active_interaction:
3
+ errors:
4
+ messages:
5
+ invalid: es inválido
6
+ invalid_type: no es un %{type} válido
7
+ missing: es requerido
8
+ types:
9
+ array: array
10
+ boolean: boolean
11
+ date: date
12
+ date_time: date time
13
+ decimal: decimal
14
+ file: file
15
+ float: float
16
+ hash: hash
17
+ integer: integer
18
+ interface: interface
19
+ object: object
20
+ record: record
21
+ string: string
22
+ symbol: symbol
23
+ time: time
@@ -4,5 +4,5 @@ module ActiveInteraction
4
4
  # The version number.
5
5
  #
6
6
  # @return [Gem::Version]
7
- VERSION = Gem::Version.new('5.1.1')
7
+ VERSION = Gem::Version.new('5.2.0')
8
8
  end
@@ -74,6 +74,11 @@ describe ActiveInteraction::ArrayFilter, :filter do
74
74
  it 'returns the transformed value' do
75
75
  expect(result.value).to eql [:test]
76
76
  end
77
+
78
+ it 'does not modify the original value' do
79
+ expect(result.value.object_id).to_not eql value.object_id
80
+ expect(value).to eql ['test']
81
+ end
77
82
  end
78
83
 
79
84
  context 'with a nested filter' do
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: 5.1.1
4
+ version: 5.2.0
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: 2022-09-01 00:00:00.000000000 Z
12
+ date: 2022-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -242,6 +242,7 @@ files:
242
242
  - lib/active_interaction/input.rb
243
243
  - lib/active_interaction/inputs.rb
244
244
  - lib/active_interaction/locale/en.yml
245
+ - lib/active_interaction/locale/es.yml
245
246
  - lib/active_interaction/locale/fr.yml
246
247
  - lib/active_interaction/locale/it.yml
247
248
  - lib/active_interaction/locale/ja.yml