domain_name_validator 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/domain_name_validator/validator.rb +1 -1
- data/lib/domain_name_validator/version.rb +1 -1
- data/spec/domain_name_validator_spec.rb +5 -0
- metadata +3 -3
data/ChangeLog.md
CHANGED
@@ -27,6 +27,9 @@
|
|
27
27
|
* (0.4.3 - 2013-08-01) Added the "license" attribute to the gemspec. This is
|
28
28
|
in response to an issue that was opened on GitHub.
|
29
29
|
|
30
|
+
* (0.4.4 - 2013-08-28) Fixed bug involving proper handling of domain names with
|
31
|
+
capital letters. Reported by a user.
|
32
|
+
|
30
33
|
0.3 (2013-06-28)
|
31
34
|
----------------
|
32
35
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -143,7 +143,7 @@ David Keener
|
|
143
143
|
|
144
144
|
He's a long-time Rubyist, with extensive experience both in the Internet
|
145
145
|
startup world and government contracting. He is one of the founders of the
|
146
|
-
RubyNation and
|
146
|
+
RubyNation, DevIgnition and NationJS conferences. He speaks often at technical
|
147
147
|
conferences, and blogs regularly on Internet-related subjects at
|
148
148
|
KeenerTech.com.
|
149
149
|
|
@@ -54,7 +54,7 @@ class DomainNameValidator
|
|
54
54
|
|
55
55
|
if errs.size == 0
|
56
56
|
errs << ERRS[:max_domain_size] if dn.size > MAX_DOMAIN_LENGTH
|
57
|
-
parts = dn.split('.')
|
57
|
+
parts = dn.downcase.split('.')
|
58
58
|
errs << ERRS[:max_level_size] if parts.size > MAX_LEVELS
|
59
59
|
errs << ERRS[:min_level_size] if parts.size < MIN_LEVELS
|
60
60
|
parts.each do |p|
|
@@ -13,6 +13,11 @@ describe DomainNameValidator do
|
|
13
13
|
response.should be == true
|
14
14
|
end
|
15
15
|
|
16
|
+
it 'should pass a valid domain name with uppercase letters' do
|
17
|
+
response = @validator.validate('KeenerTech.COM')
|
18
|
+
response.should be == true
|
19
|
+
end
|
20
|
+
|
16
21
|
it 'should fail when it finds nil instead of a domain name' do
|
17
22
|
response = @validator.validate(nil)
|
18
23
|
response.should be == false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domain_name_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-08-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &30451500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *30451500
|
25
25
|
description: Checks the validity of domain names.
|
26
26
|
email:
|
27
27
|
- dkeener@keenertech.com
|