attr_validator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +1 -9
- data/lib/attr_validator/i18n.rb +1 -1
- data/lib/attr_validator/locales/en.yml +23 -22
- data/lib/attr_validator/locales/ru.yml +24 -0
- data/lib/attr_validator/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +28 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ba52966cb5fd0bfcc1e8fd149d7634b3aa055475
|
4
|
+
data.tar.gz: 82a4906d605e799d253cc42c9081408c88915260
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60b1bf1f6f331730c98461390397b5213acc8150184e620a01856bd451e51d7b8809835aa009e39a4363728e54d629fb8fc5903d3ba090634daf15b80cfaaf5b
|
7
|
+
data.tar.gz: a0fab184d85cc12464a17d47109298db02c1527b0ac80e4255337bf0e4ff1454348cd9024c0a20eceeb2607466bfa41e24c9c4c27519f4ca8740edac1ab0c577
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,19 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
attr_validator (0.
|
4
|
+
attr_validator (0.2.0)
|
5
5
|
i18n
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
columnize (0.3.6)
|
11
|
-
debugger (1.6.5)
|
12
|
-
columnize (>= 0.3.1)
|
13
|
-
debugger-linecache (~> 1.2.0)
|
14
|
-
debugger-ruby_core_source (~> 1.3.1)
|
15
|
-
debugger-linecache (1.2.0)
|
16
|
-
debugger-ruby_core_source (1.3.1)
|
17
10
|
diff-lcs (1.2.5)
|
18
11
|
i18n (0.6.9)
|
19
12
|
rake (10.1.1)
|
@@ -32,6 +25,5 @@ PLATFORMS
|
|
32
25
|
DEPENDENCIES
|
33
26
|
attr_validator!
|
34
27
|
bundler (~> 1.3)
|
35
|
-
debugger
|
36
28
|
rake
|
37
29
|
rspec
|
data/lib/attr_validator/i18n.rb
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
en:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
2
|
+
attr_validator:
|
3
|
+
errors:
|
4
|
+
invalid_email: "invalid email"
|
5
|
+
can_not_be_email: "can't be email"
|
6
|
+
should_not_be_included_in_list: "should not be included in %{list}"
|
7
|
+
should_be_included_in_list: "should be included in %{list}"
|
8
|
+
can_not_be_less_than: "can not be less than %{length}"
|
9
|
+
can_not_be_more_than: "can not be more than %{length}"
|
10
|
+
should_be_equal_to: "should be equal to %{length}"
|
11
|
+
should_not_be_equal_to: "should not be equal to %{length}"
|
12
|
+
can_not_be_nil: "can not be nil"
|
13
|
+
should_be_nil: "should be nil"
|
14
|
+
should_be_greater_than: "should be greater than %{number}"
|
15
|
+
should_be_greater_than_or_equal_to: "should be greater than or equal to %{number}"
|
16
|
+
should_be_less_than: "should be less than %{number}"
|
17
|
+
should_be_less_than_or_equal_to: "should be less than or equal to %{number}"
|
18
|
+
should_be_even: "should be even number"
|
19
|
+
should_be_odd: "should be odd number"
|
20
|
+
can_not_be_blank: "can not be blank"
|
21
|
+
should_be_blank: "should be blank"
|
22
|
+
does_not_match: "does not match defined format"
|
23
|
+
invalid_url: "invalid url"
|
24
|
+
can_not_be_url: "can not be a url"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
ru:
|
2
|
+
attr_validator:
|
3
|
+
errors:
|
4
|
+
invalid_email: "невалидный электронный адрес"
|
5
|
+
can_not_be_email: "не может быть адресом элекронной почты"
|
6
|
+
should_not_be_included_in_list: "не должен быть включен в список %{list}"
|
7
|
+
should_be_included_in_list: "должен быть включен в список %{list}"
|
8
|
+
can_not_be_less_than: "не может быть меньше чем %{length}"
|
9
|
+
can_not_be_more_than: "не может быть болше чем %{length}"
|
10
|
+
should_be_equal_to: "должен быть равен %{length}"
|
11
|
+
should_not_be_equal_to: "не должен быть равен %{length}"
|
12
|
+
can_not_be_nil: "не может быть пустым"
|
13
|
+
should_be_nil: "должен быть пустым"
|
14
|
+
should_be_greater_than: "должен быть больше чем %{number}"
|
15
|
+
should_be_greater_than_or_equal_to: "должен быть больше либо равен %{number}"
|
16
|
+
should_be_less_than: "должен быть меньше чем %{number}"
|
17
|
+
should_be_less_than_or_equal_to: "должен быть меньше либо равен %{number}"
|
18
|
+
should_be_even: "должен быть четным числом"
|
19
|
+
should_be_odd: "должен быть нечетным числом"
|
20
|
+
can_not_be_blank: "не может быть пустым"
|
21
|
+
should_be_blank: "должен быть пустым"
|
22
|
+
does_not_match: "неверный формат"
|
23
|
+
invalid_url: "невалидный адресс"
|
24
|
+
can_not_be_url: "не может быть адресом"
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,64 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.1.0
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Albert Gazizov
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
prerelease: false
|
16
14
|
name: i18n
|
17
|
-
|
18
|
-
version_requirements: !ruby/object:Gem::Requirement
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
19
16
|
requirements:
|
20
|
-
- -
|
17
|
+
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '0'
|
23
|
-
|
24
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
23
|
requirements:
|
26
|
-
- -
|
24
|
+
- - ">="
|
27
25
|
- !ruby/object:Gem::Version
|
28
26
|
version: '0'
|
29
|
-
none: false
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
prerelease: false
|
32
28
|
name: bundler
|
33
|
-
|
34
|
-
version_requirements: !ruby/object:Gem::Requirement
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
35
30
|
requirements:
|
36
|
-
- - ~>
|
31
|
+
- - "~>"
|
37
32
|
- !ruby/object:Gem::Version
|
38
33
|
version: '1.3'
|
39
|
-
|
40
|
-
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
37
|
requirements:
|
42
|
-
- - ~>
|
38
|
+
- - "~>"
|
43
39
|
- !ruby/object:Gem::Version
|
44
40
|
version: '1.3'
|
45
|
-
none: false
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
prerelease: false
|
48
42
|
name: rake
|
49
|
-
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
51
44
|
requirements:
|
52
|
-
- -
|
45
|
+
- - ">="
|
53
46
|
- !ruby/object:Gem::Version
|
54
47
|
version: '0'
|
55
|
-
|
56
|
-
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
|
-
- -
|
52
|
+
- - ">="
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: '0'
|
61
|
-
none: false
|
62
55
|
description: Object validation library
|
63
56
|
email:
|
64
57
|
- deeper4k@gmail.com
|
@@ -66,8 +59,8 @@ executables: []
|
|
66
59
|
extensions: []
|
67
60
|
extra_rdoc_files: []
|
68
61
|
files:
|
69
|
-
- .gitignore
|
70
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
71
64
|
- Gemfile
|
72
65
|
- Gemfile.lock
|
73
66
|
- LICENSE.txt
|
@@ -81,6 +74,7 @@ files:
|
|
81
74
|
- lib/attr_validator/errors.rb
|
82
75
|
- lib/attr_validator/i18n.rb
|
83
76
|
- lib/attr_validator/locales/en.yml
|
77
|
+
- lib/attr_validator/locales/ru.yml
|
84
78
|
- lib/attr_validator/validation_errors.rb
|
85
79
|
- lib/attr_validator/validator.rb
|
86
80
|
- lib/attr_validator/validators.rb
|
@@ -108,33 +102,26 @@ files:
|
|
108
102
|
homepage: http://github.com/AlbertGazizov/attr_validator
|
109
103
|
licenses:
|
110
104
|
- MIT
|
105
|
+
metadata: {}
|
111
106
|
post_install_message:
|
112
107
|
rdoc_options: []
|
113
108
|
require_paths:
|
114
109
|
- lib
|
115
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
116
111
|
requirements:
|
117
|
-
- -
|
112
|
+
- - ">="
|
118
113
|
- !ruby/object:Gem::Version
|
119
|
-
segments:
|
120
|
-
- 0
|
121
|
-
hash: -4524151488610427739
|
122
114
|
version: '0'
|
123
|
-
none: false
|
124
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
116
|
requirements:
|
126
|
-
- -
|
117
|
+
- - ">="
|
127
118
|
- !ruby/object:Gem::Version
|
128
|
-
segments:
|
129
|
-
- 0
|
130
|
-
hash: -4524151488610427739
|
131
119
|
version: '0'
|
132
|
-
none: false
|
133
120
|
requirements: []
|
134
121
|
rubyforge_project:
|
135
|
-
rubygems_version:
|
122
|
+
rubygems_version: 2.2.0
|
136
123
|
signing_key:
|
137
|
-
specification_version:
|
124
|
+
specification_version: 4
|
138
125
|
summary: Moves validation logic to validators
|
139
126
|
test_files:
|
140
127
|
- spec/attr_validator/validator_spec.rb
|