validate_specific_value 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -1
- data/README.md +1 -1
- data/lib/validate_specific_value/model.rb +3 -2
- data/lib/validate_specific_value/version.rb +1 -1
- data/validate_specific_value.gemspec +3 -0
- metadata +43 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8cd053a31d1d618cc93d261a32b8c05502903f6cb61c8d71a5aa3288bcfbe9
|
4
|
+
data.tar.gz: cfe3cea8ed7e9f8ce06006de38795ad16f9a51ce61431d13c80b479bc5047eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f67678e4cb89f96858c2261a84b48da12453bc1bbba434730758838bc57721835630f3dedd3c507be50c20d5ab5eb0a4d9ab245609888075b86baa22802dd44
|
7
|
+
data.tar.gz: 366fa4e698d17db7b77d5ae3f8233b3ab035ff935c022a2e52531702f13c566ba50fd82e42c1e998482acbc055e2434b954a472785f9c343e13dffc8613286ec
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,30 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
validate_specific_value (0.
|
4
|
+
validate_specific_value (0.2.0)
|
5
5
|
activesupport
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
+
activemodel (5.2.2)
|
11
|
+
activesupport (= 5.2.2)
|
12
|
+
activerecord (5.2.2)
|
13
|
+
activemodel (= 5.2.2)
|
14
|
+
activesupport (= 5.2.2)
|
15
|
+
arel (>= 9.0)
|
10
16
|
activesupport (5.2.2)
|
11
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
18
|
i18n (>= 0.7, < 2)
|
13
19
|
minitest (~> 5.1)
|
14
20
|
tzinfo (~> 1.1)
|
21
|
+
arel (9.0.0)
|
15
22
|
concurrent-ruby (1.1.4)
|
16
23
|
i18n (1.2.0)
|
17
24
|
concurrent-ruby (~> 1.0)
|
18
25
|
minitest (5.11.3)
|
19
26
|
rake (12.3.2)
|
27
|
+
sqlite3 (1.3.13)
|
20
28
|
thread_safe (0.3.6)
|
21
29
|
tzinfo (1.2.5)
|
22
30
|
thread_safe (~> 0.1)
|
@@ -25,8 +33,11 @@ PLATFORMS
|
|
25
33
|
ruby
|
26
34
|
|
27
35
|
DEPENDENCIES
|
36
|
+
activerecord
|
28
37
|
bundler
|
38
|
+
minitest
|
29
39
|
rake
|
40
|
+
sqlite3
|
30
41
|
validate_specific_value!
|
31
42
|
|
32
43
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -21,12 +21,13 @@ module ValidateSpecificValue
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
define_singleton_method method_name do |value|
|
24
|
+
define_singleton_method method_name do |value, errors = {}|
|
25
25
|
instance = self.new
|
26
26
|
validators_on(column).each do |validator|
|
27
27
|
validator.validate_each(instance, column, value)
|
28
28
|
end
|
29
|
-
instance.errors[column]
|
29
|
+
errors[column] = instance.errors[column]
|
30
|
+
errors[column].empty?
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -35,4 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.add_development_dependency "bundler"
|
37
37
|
spec.add_development_dependency "rake"
|
38
|
+
spec.add_development_dependency "minitest"
|
39
|
+
spec.add_development_dependency "activerecord"
|
40
|
+
spec.add_development_dependency "sqlite3"
|
38
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validate_specific_value
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ts-3156
|
@@ -52,6 +52,48 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: activerecord
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sqlite3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
55
97
|
description:
|
56
98
|
email:
|
57
99
|
- ts_3156@yahoo.co.jp
|