mx_record 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -5,12 +5,12 @@ A mail exchanger record (MX record) is a type of resource record in the Domain N
5
5
  # Usage
6
6
 
7
7
  ```ruby
8
- MXRecord::get_server('google.com')
8
+ MXRecord::primary_server('google.com')
9
9
  #=> aspmx.l.google.com
10
10
  ```
11
11
 
12
12
  ```ruby
13
- MXRecord::get_server('rangers.co.uk')
13
+ MXRecord::primary_server('rangers.co.uk')
14
14
  #=> mail.rangers.co.uk
15
15
  ```
16
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/lib/mx_record.rb CHANGED
@@ -24,6 +24,8 @@ module MXRecord
24
24
  def self.primary_server(domain)
25
25
  servers = mail_servers(domain)
26
26
 
27
+ return nil if servers.empty?
28
+
27
29
  primary_server = servers.first
28
30
 
29
31
  servers.each do |server|
data/mx_record.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "mx_record"
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lee Reilly"]
12
- s.date = "2013-01-22"
12
+ s.date = "2013-01-23"
13
13
  s.description = "Find MX records for a given domain name"
14
14
  s.email = "lee@leereilly.net"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mx_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: 3310371868219206114
109
+ hash: 548665974555498934
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements: