be_valid 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f3ccfb2cfe9cffb46673c90f34143c228c14e6548b006a3ed7c4283d14874f4
4
- data.tar.gz: '084a34d678a15b3ecd4a4d2d4cc9925c2c3a75dbd96c688ab09503e2257927d9'
3
+ metadata.gz: 1af31198fde2c10ff48568009787b6c80f2126f9f5d7e9343150a346463a8d03
4
+ data.tar.gz: 877267b1036e66ee7814aa873088a2dee55b41aa48c6cfae3dc542681377e02e
5
5
  SHA512:
6
- metadata.gz: fb03dfe7046c594597816b020693dd84b5439b2257eb9a17390f5cc9342c6747c9492b65759049fa1cc42f1455a7008d6e34a8b30033deef1679b13825927ad1
7
- data.tar.gz: c8319f9221b87948857ddaf1a5cdd78e2b290364553749a5a0f49a3bbba84cfacc14bdb270d5cbc25937d2d4d80f4f8cf125fd4234498e3351e67c1f627b3201
6
+ metadata.gz: 4b1b58fb7f4ebe23cfab6d7e1363c0ee5f802618e0a1a5571c247eb216f40d6997766319820f6bd7a97a9e5cf33b953b719443b303b7757d79befd8fb3ff0f7a
7
+ data.tar.gz: e20340187fa52199db26c76e6b21427e16b9752c863c91e119aed44fce5648740a5596564ba2e0defc3b5858ff51aa7b450928ddd44555d1c85dd4ccc867b18b
data/lib/be_valid.rb CHANGED
@@ -4,6 +4,6 @@ begin
4
4
  require 'validators/date_validator'
5
5
  require 'validators/must_be_validator'
6
6
  rescue
7
- 'unable to loan be_valid validator'
7
+ 'unable to load be_valid validator'
8
8
  nil
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module BeValid
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -30,7 +30,7 @@ module ActiveModel
30
30
  return if options[:present] && value.present?
31
31
  message << " present" if options[:present]
32
32
 
33
- return if options[:one_of] && options[:one_of].include?(value)
33
+ return if options[:one_of] && Array(options[:one_of]).flatten.include?(value)
34
34
  message = ": '#{value}' is not a valid value" if options[:one_of]
35
35
 
36
36
  return if options[:not_any_of] && !(options[:not_any_of].include?(value))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: be_valid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Stewart (johnsinco)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-19 00:00:00.000000000 Z
11
+ date: 2021-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler