smart_params 2.4.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/smart_params/field.rb +3 -0
- data/lib/smart_params/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce343582ab9e6fc1f7ea46f83badfd4a76a5d7bdfea79171e417f1c77c94d6f0
|
4
|
+
data.tar.gz: 423cdab5d8b82c464366395ddcec6ff189771f47a1c1526f2adf1ddebafc27cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de30418c9ecc3fd98f81e07f3c0a8d8528ed931516e48b82c54554c711b12bfa328024a163a5ef27112c67ca6c3951fd61bc3acd921cfa150be12377b430e0e
|
7
|
+
data.tar.gz: 5f3ca4e6a7e9a8bf0f13f55bf1ae555629eb52ec99ad43b4db0772f2d97c3bb48698e3d3d8b6fccdf8466c0e22e11388db671b63c769f63f2f9f99f468d9d63f
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# smart_params
|
2
2
|
|
3
|
-
- [![Build](http://img.shields.io/travis-ci/krainboltgreene/smart_params.svg?style=flat-square)](https://travis-ci.org/krainboltgreene/smart_params)
|
3
|
+
- [![Build](http://img.shields.io/travis-ci/krainboltgreene/smart_params.svg?style=flat-square)](https://travis-ci.org/krainboltgreene/smart_params.rb)
|
4
4
|
- [![Downloads](http://img.shields.io/gem/dtv/smart_params.svg?style=flat-square)](https://rubygems.org/gems/smart_params)
|
5
5
|
- [![Version](http://img.shields.io/gem/v/smart_params.svg?style=flat-square)](https://rubygems.org/gems/smart_params)
|
6
6
|
|
data/lib/smart_params/field.rb
CHANGED
@@ -92,6 +92,9 @@ module SmartParams
|
|
92
92
|
end
|
93
93
|
|
94
94
|
private def field(key, type:, nullable: false, &subfield)
|
95
|
+
if nullable
|
96
|
+
type |= SmartParams::Strict::Nil
|
97
|
+
end
|
95
98
|
@subfields << self.class.new(keychain: [*keychain, key], type: type, nullable: nullable, &subfield)
|
96
99
|
end
|
97
100
|
|
data/lib/smart_params/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,14 +118,14 @@ dependencies:
|
|
118
118
|
requirements:
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: '0
|
121
|
+
version: '1.0'
|
122
122
|
type: :runtime
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0
|
128
|
+
version: '1.0'
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: recursive-open-struct
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|