ddis 1.0.0 → 1.0.1

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.
Files changed (4) hide show
  1. data/README.md +7 -0
  2. data/bin/ddis +9 -1
  3. data/lib/ddis.rb +4 -0
  4. metadata +1 -1
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ddis
2
2
  ==
3
3
 
4
+ Install
5
+ --
6
+
7
+ Gem is over at https://rubygems.org/gems/ddis so a simply `gem install ddis` will do the trick.
8
+
9
+ Else build it from source.
10
+
4
11
  Usage
5
12
  --
6
13
 
data/bin/ddis CHANGED
@@ -27,10 +27,18 @@ ip = ddis.iterator.ip
27
27
 
28
28
  (0..count).each do |run|
29
29
  until ip == nil
30
- puts "Testing #{ip}" if verbose
30
+ warn "Testing #{ip}" if verbose
31
31
  ddis.test_ip ip
32
32
  ip = ddis.iterator.iterate
33
33
  end
34
34
  warn "Sleeping for #{secs} seconds" if verbose
35
35
  sleep secs
36
36
  end
37
+
38
+ stored_ips = ddis.read_db
39
+
40
+ puts "IPs which are up and have a PTR matching pattern /#{unassign}/ ::"
41
+ stored_ips[ :up ].each {|ip| puts ip}
42
+
43
+ puts "IPs which are down yet *dont* match pattern /#{unassign}/ ::"
44
+ stored_ips[ :down ].each {|ip| puts ip}
@@ -49,4 +49,8 @@ class DDis
49
49
  end
50
50
  end
51
51
 
52
+ def read_db
53
+ @db.dump
54
+ end
55
+
52
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: