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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 594ca1e774b4031668eafd22a336b2a2fe99d720
4
- data.tar.gz: 0c674d09beac0f3a2ce58e3a40bc9f993e7adcce
3
+ metadata.gz: 7f68b9bdb55dc7644951970c62f8deaec3438e73
4
+ data.tar.gz: 42a3eca12663b9822ff74be891f2a00cf0b96fa4
5
5
  SHA512:
6
- metadata.gz: f99f3e6092404105f77b339b9f476cb9c1f61be0c2b5924020481ef6013f1cf405d205231744ea68205ed3206b5fa65e27e1fc4168a8b096405ac9317cd730fb
7
- data.tar.gz: 16f02b99f2e39c218f01fbc2af67e126b7f699744fb9b4a82bc4ecdf25fc7c8d45462797db3069079c73d3500b4f0ea15347311efeddefb77d65e7ac3b2d5360
6
+ metadata.gz: c95592f062bd35a0f28e82e11788884f82b25442c933e9d4a9e3068581a03c877aa66601d7ad3c861ce7ddb7cf5d474a49d06f276deb78be07fd60975caaa755
7
+ data.tar.gz: 60a48b1e7c38581c78394cecd379f0c331ddd54626a3d3ae49320dc64cc4064da34cd2070c61709ef24632df9337d1afc081504aaea428c61b044920891ded6f
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ - Removed unnecessary dependency
4
+
1
5
  ## 0.1.1
2
6
 
3
7
  - Use machine nameservers
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```ruby
6
6
  Reversed.lookup("8.8.4.4")
7
- # {:domain=>"google.com", :hostname=>"google-public-dns-b.google.com"}
7
+ # "google-public-dns-b.google.com"
8
8
  ```
9
9
 
10
10
  Works with IPv4 and IPv6
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ Rake::TestTask.new(:test) do |t|
5
5
  t.libs << "test"
6
6
  t.libs << "lib"
7
7
  t.test_files = FileList["test/**/*_test.rb"]
8
+ t.warning = false
8
9
  end
9
10
 
10
11
  task default: :test
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Reversed
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ["lib"]
18
18
 
19
19
  spec.add_dependency "net-dns"
20
- spec.add_dependency "public_suffix"
21
20
 
22
21
  spec.add_development_dependency "bundler"
23
22
  spec.add_development_dependency "rake"
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.1.1
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: 2016-11-15 00:00:00.000000000 Z
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.5.1
103
+ rubygems_version: 2.6.8
118
104
  signing_key:
119
105
  specification_version: 4
120
106
  summary: Reverse DNS / IP Lookup for Ruby