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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dee376c52b0335bfc7ae84b37b2fc1e10575b216ad11e131fbf858621fa7431f
4
- data.tar.gz: cfa443e6596f128bc313a83d8e744ca586c52891eecab9011edb330cbf365d40
3
+ metadata.gz: ce343582ab9e6fc1f7ea46f83badfd4a76a5d7bdfea79171e417f1c77c94d6f0
4
+ data.tar.gz: 423cdab5d8b82c464366395ddcec6ff189771f47a1c1526f2adf1ddebafc27cc
5
5
  SHA512:
6
- metadata.gz: b2ab41e38e0ad3411de6703a3f37e3c1f1fa3cdef75de1404729d329727883c269da29119667bcdf5ceb9f7528e60802b708567e1f2dacc72eed8dd99824f7b7
7
- data.tar.gz: 0213e4c1bb2854ba43fd6ac7c8300726e882e486d94c9032f7964929239854fb9780f84dc81c7f45200ebc2e0113afb64a856cd6711aee9544f6d275d71603c0
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
 
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module SmartParams
2
- VERSION = "2.4.0"
2
+ VERSION = "3.0.0"
3
3
  end
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: 2.4.0
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-06-02 00:00:00.000000000 Z
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: '1.16'
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: '1.16'
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.12'
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.12'
128
+ version: '1.0'
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: recursive-open-struct
131
131
  requirement: !ruby/object:Gem::Requirement