domain_name_validator 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- domain_name_validator (0.4.3)
4
+ domain_name_validator (0.4.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
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 DevIgnition conferences. He speaks often at technical
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|
@@ -1,3 +1,3 @@
1
1
  class DomainNameValidator
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
@@ -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.3
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: &29350572 !ruby/object:Gem::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: *29350572
24
+ version_requirements: *30451500
25
25
  description: Checks the validity of domain names.
26
26
  email:
27
27
  - dkeener@keenertech.com