attr_permit 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/attr_permit.rb +1 -1
- data/lib/attr_permit/version.rb +1 -1
- data/spec/attr_permit_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0635e65bf5caef54303d9020566c69196f533e46
|
4
|
+
data.tar.gz: 0b3e4132aa19cbefc1fd5945a7c0791064e6a485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f21fb52b2a6f401fb75980b5a8a2e1ba71325c7690b4f7969dbe2f4e5621874a7cb38d666bbb5ca9ae9afe74e7564c7aaed1f4b9b679638b7fd6007b2c6a7b7
|
7
|
+
data.tar.gz: d80ec9296178eedefcde72e949ffa6130646591e337a78566c846e468cffc207093ff049ba1e5ab3d4185d49842a805c902271ae152abff0883a0141760ea636
|
data/lib/attr_permit.rb
CHANGED
data/lib/attr_permit/version.rb
CHANGED
data/spec/attr_permit_spec.rb
CHANGED
@@ -214,10 +214,10 @@ RSpec.describe AttrPermit, unit: true do
|
|
214
214
|
|
215
215
|
it 'will call proc from map' do
|
216
216
|
class MapAttributeTwo < AttrPermit
|
217
|
-
map_attribute :my_attr, -> {
|
217
|
+
map_attribute :my_attr, -> { item.thing }
|
218
218
|
end
|
219
219
|
|
220
|
-
expect(MapAttributeTwo.new(OpenStruct.new(item: 'My Item')).my_attr).to eq 'My Item'
|
220
|
+
expect(MapAttributeTwo.new(OpenStruct.new(item: OpenStruct.new(thing: 'My Item'))).my_attr).to eq 'My Item'
|
221
221
|
end
|
222
222
|
|
223
223
|
end
|
@@ -256,7 +256,7 @@ RSpec.describe AttrPermit, unit: true do
|
|
256
256
|
|
257
257
|
it 'will call proc from map' do
|
258
258
|
class MapAttributeTwo < AttrPermit
|
259
|
-
map_attributes :my_attr => -> {
|
259
|
+
map_attributes :my_attr => -> { item }
|
260
260
|
end
|
261
261
|
|
262
262
|
expect(MapAttributeTwo.new(OpenStruct.new(item: 'My Item')).my_attr).to eq 'My Item'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_permit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|