valhammer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/valhammer/validations.rb +1 -1
- data/lib/valhammer/version.rb +1 -1
- data/spec/lib/valhammer/validations_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9465d328d445632ab2a2607b8cac901393548f32
|
4
|
+
data.tar.gz: d55c0bd7a8175139e6ad219a11ee8deacb04a92e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d957f2d9ffbd8bb863de67b61fdd4e169c96e879c0e1439d0ddb6566f9a3806ba11a35b6419bbaeb2c9a255310670f2da3738fa18e4483e895d0da119711d51
|
7
|
+
data.tar.gz: 8073eb0f3aa152003e81b1f76d5fdd19f6eba9d5d1c9b4e48967bce9175287750769c3a30b91e1be94c6c5ffee0034a6efdcb479bdcf01c8ae04997461c7d6f2
|
@@ -56,7 +56,7 @@ module Valhammer
|
|
56
56
|
def valhammer_inclusion(validations, column, opts)
|
57
57
|
return unless opts[:inclusion] && column.type == :boolean
|
58
58
|
|
59
|
-
validations[:inclusion] = { in: [false, true], allow_nil:
|
59
|
+
validations[:inclusion] = { in: [false, true], allow_nil: column.null }
|
60
60
|
end
|
61
61
|
|
62
62
|
def valhammer_unique(validations, column, opts)
|
data/lib/valhammer/version.rb
CHANGED
@@ -38,7 +38,7 @@ RSpec.describe Valhammer::Validations do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
context 'with a non-nullable boolean' do
|
41
|
-
let(:opts) { { in: [false, true], allow_nil:
|
41
|
+
let(:opts) { { in: [false, true], allow_nil: false } }
|
42
42
|
|
43
43
|
it { is_expected.to include(a_validator_for(:injected, :inclusion, opts)) }
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valhammer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun Mangelsdorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: '0'
|
219
219
|
requirements: []
|
220
220
|
rubyforge_project:
|
221
|
-
rubygems_version: 2.
|
221
|
+
rubygems_version: 2.4.5
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Automatically validate ActiveRecord models based on the database schema.
|