simple_validate 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_validate/validates_numericality_of.rb +1 -2
- data/lib/simple_validate/version.rb +1 -1
- data/lib/simple_validate.rb +2 -7
- data/simple_validate.gemspec +5 -4
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b66b60f0a9d476fb86881e5b17ee72f0e1e9066
|
4
|
+
data.tar.gz: 52e6993234ccd0e4fae8afcd81e0276557236ba0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aac062013d71ec0e0bf6774b53a7844b7d6921cc26fbb2d1c078859cbaf219d73781adf6941fa30254f055838c81c44197087ba414f43a9e5d21b487c07d542b
|
7
|
+
data.tar.gz: 8cef015dc626644815c1c5c7b28b31ab3b765fb0411c0814fce80576821a85eea95b85fade43f051e2390f8bac143bb9867dfb31050382f9c68541826fb0563f
|
data/lib/simple_validate.rb
CHANGED
@@ -26,13 +26,8 @@ module SimpleValidate
|
|
26
26
|
|
27
27
|
module ClassMethods
|
28
28
|
def method_missing(method, *args, &block)
|
29
|
-
if
|
30
|
-
|
31
|
-
presence|
|
32
|
-
numericality|
|
33
|
-
length)_of)
|
34
|
-
/x
|
35
|
-
add_validations(args, const_get($1.classify))
|
29
|
+
if respond_to_missing?(method)
|
30
|
+
add_validations(args, const_get("#{method}".classify))
|
36
31
|
else
|
37
32
|
super
|
38
33
|
end
|
data/simple_validate.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['Nick Palaniuk']
|
10
10
|
spec.email = ['npalaniuk@gmail.com']
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
12
|
+
spec.summary = 'Validations for any plain old ruby object'
|
13
|
+
spec.description = 'Validations for any ruby object'
|
14
14
|
spec.homepage = 'https://github.com/nikkypx/simple_validate'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
@@ -19,7 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.add_dependency 'activesupport', '~> 4.2'
|
22
23
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
23
|
-
spec.add_development_dependency 'rake',
|
24
|
-
spec.add_development_dependency 'rspec',
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
25
26
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_validate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
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-05-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|