reversed 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/Rakefile +1 -0
- data/lib/reversed.rb +1 -8
- data/lib/reversed/version.rb +1 -1
- data/reversed.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f68b9bdb55dc7644951970c62f8deaec3438e73
|
4
|
+
data.tar.gz: 42a3eca12663b9822ff74be891f2a00cf0b96fa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c95592f062bd35a0f28e82e11788884f82b25442c933e9d4a9e3068581a03c877aa66601d7ad3c861ce7ddb7cf5d474a49d06f276deb78be07fd60975caaa755
|
7
|
+
data.tar.gz: 60a48b1e7c38581c78394cecd379f0c331ddd54626a3d3ae49320dc64cc4064da34cd2070c61709ef24632df9337d1afc081504aaea428c61b044920891ded6f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/reversed.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "reversed/version"
|
2
2
|
require "net/dns"
|
3
|
-
require "public_suffix"
|
4
3
|
|
5
4
|
module Reversed
|
6
5
|
def self.lookup(ip)
|
@@ -8,13 +7,7 @@ module Reversed
|
|
8
7
|
unless ip.empty?
|
9
8
|
resolver = Net::DNS::Resolver.new(retry: 3).search(ip)
|
10
9
|
answer = resolver.answer.first || resolver.authority.first
|
11
|
-
if answer
|
12
|
-
hostname = answer.value.split(" ").first[0..-2]
|
13
|
-
{
|
14
|
-
domain: PublicSuffix.domain(hostname, ignore_private: true),
|
15
|
-
hostname: hostname
|
16
|
-
}
|
17
|
-
end
|
10
|
+
answer.value.split(" ").first[0..-2] if answer
|
18
11
|
end
|
19
12
|
end
|
20
13
|
end
|
data/lib/reversed/version.rb
CHANGED
data/reversed.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reversed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-dns
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: public_suffix
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
100
|
version: '0'
|
115
101
|
requirements: []
|
116
102
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.6.8
|
118
104
|
signing_key:
|
119
105
|
specification_version: 4
|
120
106
|
summary: Reverse DNS / IP Lookup for Ruby
|