adns-ruby 0.3 → 0.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 +5 -0
- data/README.rdoc +33 -0
- data/TODO +5 -0
- data/examples/a.rb +0 -1
- data/examples/cname.rb +0 -1
- data/examples/mx.rb +0 -1
- data/examples/ns.rb +0 -1
- data/examples/ptr.rb +0 -1
- data/examples/soa.rb +0 -1
- data/examples/srv.rb +0 -1
- data/examples/txt.rb +0 -1
- data/ext/adns/mod_adns.c +0 -2
- data/lib/adns.rb +0 -1
- metadata +6 -5
- data/README +0 -35
data/CHANGELOG
CHANGED
@@ -1,2 +1,7 @@
|
|
1
1
|
Fri Oct 25 16:53:30 NPT 2013 Purushottam Tuladhar <purshottam.tuladhar@gmail.com>
|
2
2
|
* Initial public release (adns-ruby-beta-0.3)
|
3
|
+
|
4
|
+
Thu Oct 31 09:17:31 NPT 2013 Purushottam Tuladhar <purshottam.tuladhar@gmail.com>
|
5
|
+
* Changed to version 0.4
|
6
|
+
* Updated README.rdoc, removed obsolete rubygems require statement.
|
7
|
+
* Updated TODO list.
|
data/README.rdoc
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
== Description
|
2
|
+
This module allows Ruby programs to interface with the GNU adns library (http://gnu.org/software/adns/). You must have the GNU adns library version >= 1.2 installed in order to build this module.
|
3
|
+
|
4
|
+
== Installation
|
5
|
+
gem install adns-ruby
|
6
|
+
|
7
|
+
== Usage
|
8
|
+
require 'adns'
|
9
|
+
require 'pp'
|
10
|
+
|
11
|
+
adns= ADNS::State.new
|
12
|
+
domain= "rubygems.org"
|
13
|
+
|
14
|
+
query_list= Hash.new
|
15
|
+
query_list[adns.submit(domain, ADNS::RR::MX)]= 'MX'
|
16
|
+
query_list[adns.submit(domain, ADNS::RR::A)]= 'A'
|
17
|
+
query_list[adns.submit(domain, ADNS::RR::NS)]= 'NS'
|
18
|
+
query_list[adns.submit(domain, ADNS::RR::SOA)]= 'SOA'
|
19
|
+
|
20
|
+
for (query, rr) in query_list
|
21
|
+
puts rr.center(20, "*")
|
22
|
+
pp query.wait
|
23
|
+
end
|
24
|
+
|
25
|
+
== Examples
|
26
|
+
More adns-ruby examples are avaiable in examples/ directory in adns-ruby gem installation path or you can visit github repository (http://github.com/tuladhar/adns-ruby) and checkout the examples/ directory.
|
27
|
+
|
28
|
+
== Source Code
|
29
|
+
The source code is available via git:
|
30
|
+
git clone git://github.com/tuladhar/adns-ruby
|
31
|
+
|
32
|
+
== License
|
33
|
+
GNU General Public License.
|
data/TODO
ADDED
data/examples/a.rb
CHANGED
data/examples/cname.rb
CHANGED
data/examples/mx.rb
CHANGED
data/examples/ns.rb
CHANGED
data/examples/ptr.rb
CHANGED
data/examples/soa.rb
CHANGED
data/examples/srv.rb
CHANGED
data/examples/txt.rb
CHANGED
data/ext/adns/mod_adns.c
CHANGED
@@ -24,7 +24,6 @@
|
|
24
24
|
#include <sys/select.h>
|
25
25
|
#include <netinet/in.h>
|
26
26
|
|
27
|
-
#define VERSION "0.3"
|
28
27
|
#define CSTR2STR(cstr) ((cstr) ? rb_str_new2(cstr) : rb_str_new2(""))
|
29
28
|
#define CSTR2SYM(cstr) (rb_str_intern(CSTR2STR(cstr)))
|
30
29
|
#define CHECK_TYPE(v,t) (Check_Type(v, t))
|
@@ -849,7 +848,6 @@ void Init_adns(void)
|
|
849
848
|
mADNS = rb_define_module("ADNS");
|
850
849
|
rb_define_module_function(mADNS, "status_to_s", mADNS__status_to_s, 1);
|
851
850
|
rb_define_module_function(mADNS, "status_to_ss", mADNS__status_to_ss, 1);
|
852
|
-
rb_define_const(mADNS, "VERSION", CSTR2STR(VERSION));
|
853
851
|
|
854
852
|
/*
|
855
853
|
* Document-class: ADNS::State
|
data/lib/adns.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adns-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 4
|
9
|
+
version: "0.4"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Purushottam Tuladhar
|
@@ -17,7 +17,7 @@ cert_chain: []
|
|
17
17
|
date: 2013-10-25 00:00:00 Z
|
18
18
|
dependencies: []
|
19
19
|
|
20
|
-
description: Ruby interface to GNU adns asynchronous-capable DNS client library (http://gnu.org/software/adns/).
|
20
|
+
description: Ruby interface to GNU adns asynchronous-capable DNS client library (http://gnu.org/software/adns/). You must have the GNU adns library installed in order to build this module.
|
21
21
|
email: purshottam.tuladhar@gmail.com
|
22
22
|
executables: []
|
23
23
|
|
@@ -37,8 +37,9 @@ files:
|
|
37
37
|
- examples/txt.rb
|
38
38
|
- examples/srv.rb
|
39
39
|
- COPYING
|
40
|
-
- README
|
40
|
+
- README.rdoc
|
41
41
|
- CHANGELOG
|
42
|
+
- TODO
|
42
43
|
- ext/adns/extconf.rb
|
43
44
|
homepage: https://github.com/tuladhar/adns-ruby
|
44
45
|
licenses:
|
data/README
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
Introduction
|
2
|
-
============
|
3
|
-
Ruby interface to GNU adns asynchronous-capable DNS client library (http://gnu.org/software/adns/).
|
4
|
-
|
5
|
-
Install
|
6
|
-
=======
|
7
|
-
$ sudo gem install adns-ruby
|
8
|
-
Note: You must have GNU adns library installed with working c compiler, in other to build this module.
|
9
|
-
|
10
|
-
Documentation and Examples
|
11
|
-
==========================
|
12
|
-
Examples are inside examples directory.
|
13
|
-
Note: You must `cd' into adns-ruby-0.3 directory and browse doc/index.html using your favorite browser.
|
14
|
-
$ rdoc
|
15
|
-
|
16
|
-
|
17
|
-
Usage
|
18
|
-
=====
|
19
|
-
require 'rubygems' # <-- FOR RUBY VERSION 1.8.x
|
20
|
-
require 'adns'
|
21
|
-
require 'pp'
|
22
|
-
|
23
|
-
adns= ADNS::State.new
|
24
|
-
domain= "rubygems.org"
|
25
|
-
|
26
|
-
qlist= {}
|
27
|
-
qlist[adns.submit(domain, ADNS::RR::MX)] = 'MX'
|
28
|
-
qlist[adns.submit(domain, ADNS::RR::A)] = 'A'
|
29
|
-
qlist[adns.submit(domain, ADNS::RR::NS)] = 'NS'
|
30
|
-
qlist[adns.submit(domain, ADNS::RR::SOA)] = 'SOA'
|
31
|
-
|
32
|
-
for q, type in qlist
|
33
|
-
puts type.center(20, "*")
|
34
|
-
pp q.wait
|
35
|
-
end
|