attr_validator 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Gemfile.lock +1 -1
- data/README.md +4 -1
- data/lib/attr_validator/validators/url_validator.rb +1 -1
- data/lib/attr_validator/version.rb +1 -1
- data/spec/attr_validator/validators/url_validator_spec.rb +1 -1
- metadata +22 -22
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MjY2MTllNDdiNDMxNGU4ZDMzZmM3ZjlmODIwODc1YTI4MTZlMDI0ZQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d6a97ab32f377ee72a999cfc8b4e7b03970707b7
|
4
|
+
data.tar.gz: 95fa54f118539c8fb9359dda28df574b1c82d082
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
YTg0ODUzMjJkMzdkNjI3OWRhMWI2MTI3NjYyOTE2NTk2MGIyMDExNjMzMWMz
|
11
|
-
YjQ4NGE2NDk4ZjUzZTRlZWVjNTI4YzlkNjkzOGE1MDE3NjA1NGU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZTU2NjlmMGEzMWQ4OTZiNTJkNmRhMmEzZDliNTRkOWI3YzJmNWZkMjYwOTRm
|
14
|
-
NDFhOWE2ZTQ0MzdiNWNlMTk4ZjEwOTQzZTg4ODg0N2Y0YzBlNDZhNzQzYjBl
|
15
|
-
NDViZTE3M2FmODFjYjZjZjUyNjM4YjUyOWQxMmVjNTg0ZTYyYzk=
|
6
|
+
metadata.gz: 45f6194a4c1951088facc84f4c3d415fdeefdd4b5f671cb6a28b1df41474c0d2d7e79b3db179ac1437c0f18fe14b5c6072b831c06ffb4a785a8d77a31ea70fa5
|
7
|
+
data.tar.gz: d92eb67a33db7240e2df6535f0da7a314cfef1007325416525d7b055505d7275c69073583be17f7c0e2586fa59742a5917bc36b4ddbabfadc60b5b0087ca0c50
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class AttrValidator::Validators::UrlValidator
|
2
|
-
URL_REGEXP = /^(https?:\/\/)?([\w
|
2
|
+
URL_REGEXP = /^(https?:\/\/)?([\w\.-]+)\.([a-z]{2,6}\.?)(\/[\w\.]*)*\/?$/
|
3
3
|
|
4
4
|
# Validates that string is a valid url
|
5
5
|
# @param value [String] string to validate
|
@@ -4,7 +4,7 @@ require 'attr_validator'
|
|
4
4
|
describe AttrValidator::Validators::UrlValidator do
|
5
5
|
describe ".validate" do
|
6
6
|
it "should return empty errors if email is valid" do
|
7
|
-
errors = AttrValidator::Validators::UrlValidator.validate('example.com', true)
|
7
|
+
errors = AttrValidator::Validators::UrlValidator.validate('example-asdf.com', true)
|
8
8
|
errors.should be_empty
|
9
9
|
end
|
10
10
|
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Gazizov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
name: i18n
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
21
22
|
version_requirements: !ruby/object:Gem::Requirement
|
22
23
|
requirements:
|
23
|
-
- -
|
24
|
+
- - ">="
|
24
25
|
- !ruby/object:Gem::Version
|
25
26
|
version: '0'
|
26
|
-
prerelease: false
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
|
-
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
|
-
- - ~>
|
38
|
+
- - "~>"
|
38
39
|
- !ruby/object:Gem::Version
|
39
40
|
version: '1.3'
|
40
|
-
prerelease: false
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
49
50
|
version_requirements: !ruby/object:Gem::Requirement
|
50
51
|
requirements:
|
51
|
-
- -
|
52
|
+
- - ">="
|
52
53
|
- !ruby/object:Gem::Version
|
53
54
|
version: '0'
|
54
|
-
prerelease: false
|
55
55
|
description: Object validation library
|
56
56
|
email:
|
57
57
|
- deeper4k@gmail.com
|
@@ -59,8 +59,8 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
63
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
64
64
|
- Gemfile
|
65
65
|
- Gemfile.lock
|
66
66
|
- LICENSE.txt
|
@@ -109,17 +109,17 @@ require_paths:
|
|
109
109
|
- lib
|
110
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.2.2
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Moves validation logic to validators
|