simple_validate 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/Gemfile +1 -0
- data/README.md +3 -0
- data/lib/simple_validate/validates_length_of.rb +4 -4
- data/lib/simple_validate/version.rb +1 -1
- data/simple_validate.gemspec +0 -2
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4db1a522454d744858748c2a133394aa53445dc4
|
4
|
+
data.tar.gz: f2aefa1bdb0dfdaa75c3e09048a3528d447eddbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8199d16f338ed071e96058e1b5c3729f8f77b500729fd24fcfcf457aec63d5966052dd14c9427e0fda7131bcd669af6960371525f64e5445bf8b0cdc54a18db3
|
7
|
+
data.tar.gz: 009e75ade7581bbd0e31636558f66601f06e0eec28565e54231c475f0ce40a95d829672f33cafd43d7042c2d17ce46da391c650280164f55795379b374ec88da
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
|
1
2
|
# SimpleValidate
|
2
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/nikkypx/simple_validate.svg?branch=master)](https://travis-ci.org/nikkypx/simple_validate)
|
5
|
+
|
3
6
|
Borrowing ideas from [validatable](https://github.com/jnunemaker/validatable) and Rails validations, this is a library for validations for any ruby object.
|
4
7
|
|
5
8
|
## Installation
|
@@ -40,13 +40,13 @@ module SimpleValidate
|
|
40
40
|
validator_key, valid_length = @length_validator.entries.first
|
41
41
|
case validator_key
|
42
42
|
when :minimum
|
43
|
-
actual_length >= valid_length
|
43
|
+
actual_length >= valid_length
|
44
44
|
when :maximum
|
45
|
-
actual_length <= valid_length
|
45
|
+
actual_length <= valid_length
|
46
46
|
when :in
|
47
|
-
valid_length.member?(actual_length)
|
47
|
+
valid_length.member?(actual_length)
|
48
48
|
when :is
|
49
|
-
actual_length == valid_length
|
49
|
+
actual_length == valid_length
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
data/simple_validate.gemspec
CHANGED
@@ -20,7 +20,5 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency 'activesupport', '~> 4.2'
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.11'
|
24
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
25
23
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_validate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Palaniuk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,34 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.2'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.11'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.11'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '10.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '10.0'
|
55
27
|
- !ruby/object:Gem::Dependency
|
56
28
|
name: rspec
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|