adns-ruby 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
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.
@@ -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
@@ -0,0 +1,5 @@
1
+ PRIORITY=Low
2
+ - adns-ruby needs documentation. If you are willing to contribute, email me <purshottam.tuladhar@gmail.com>.
3
+
4
+ PRIORITY=High
5
+ - Finding bugs.
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  # This file is part of adns-ruby library
3
3
 
4
- require 'rubygems'
5
4
  require 'adns'
6
5
  require 'pp'
7
6
 
@@ -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
@@ -1,6 +1,5 @@
1
1
  #
2
2
  # This file is part of adns-ruby library.
3
3
  #
4
- require 'rubygems' # remove this if your ruby version if >= 1.9
5
4
  require 'adns/adns'
6
5
  include ADNS
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: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- version: "0.3"
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