Skip to content

Commit 7595659

Browse files
committed
Update to new bundler based gem distribution.
1 parent 38c1449 commit 7595659

File tree

9 files changed

+86
-88
lines changed

9 files changed

+86
-88
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
Gemfile.lock
7+
InstalledFiles
8+
_yardoc
9+
coverage
10+
doc/
11+
lib/bundler/man
12+
pkg
13+
rdoc
14+
spec/reports
15+
test/tmp
16+
test/version_tmp
17+
tmp

Gemfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# A sample Gemfile
2-
source "https://rubygems.org"
3-
4-
gem "rexec", "~> 1.5.1"
5-
gem "rake"
6-
gem "eventmachine"
1+
source 'https://rubygems.org'
72

3+
# Specify your gem's dependencies in rubydns.gemspec
4+
gemspec

README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
# RubyDNS
22

3-
RubyDNS is a simple programmatic DSL (domain specific language) for configuring and running a DNS server. RubyDNS provides a daemon that runs a DNS server which can process DNS requests depending on specific policy. Rule selection is based on pattern matching, and results can be hard-coded, computed, fetched from a remote DNS server, fetched from a local cache, etc.
3+
RubyDNS is a high-performance DNS server which can be easily integrated into other projects or used as a stand-alone daemon (via RExec). By default it uses rule-based pattern matching. Results can be hard-coded, computed, fetched from a remote DNS server or fetched from a local cache, depending on requirements.
44

5-
RubyDNS provides a full daemon server using RExec. You can either use the built in daemon, customize it to your needs, or specify a full daemon implementation.
5+
In addition, RubyDNS includes a high-performance asynchronous DNS resolver built on top of EventMachine. This module can be used by itself in client applications without using the full RubyDNS server stack.
66

7-
RubyDNS is not designed to be high-performance and uses a thread-per-request model. This is designed to make it as easy as possible to achieve concurrent performance. This is also due to the fact that many other APIs work best this way (unfortunately).
7+
For examples and documentation please see the main [project page][1].
8+
9+
[1]: http://www.oriontransfer.co.nz/gems/rubydns
810

911
[![Build Status](https://secure.travis-ci.org/ioquatix/rubydns.png)](http://travis-ci.org/ioquatix/rubydns)
1012

11-
## Basic Example
13+
## Installation
14+
15+
Add this line to your application's Gemfile:
16+
17+
gem 'rubydns'
18+
19+
And then execute:
20+
21+
$ bundle
22+
23+
Or install it yourself as:
24+
25+
$ gem install rubydns
26+
27+
## Usage
1228

1329
This is copied from `test/examples/test-dns-2.rb`. It has been simplified slightly.
1430

@@ -40,10 +56,6 @@ After starting this server you can test it using dig:
4056
dig @localhost dev.mydomain.org
4157
dig @localhost google.com
4258

43-
For examples and documentation please see the main [project page][1].
44-
45-
[1]: http://www.oriontransfer.co.nz/gems/rubydns
46-
4759
## Compatibility
4860

4961
### Migrating from RubyDNS 0.3.x to 0.4.x ###
@@ -114,7 +126,15 @@ Once you call this, the transaction won't complete until you call either `transa
114126

115127
You can see a complete example in `test/test_slow_server.rb`.
116128

117-
## Future
129+
## Contributing
130+
131+
1. Fork it
132+
2. Create your feature branch (`git checkout -b my-new-feature`)
133+
3. Commit your changes (`git commit -am 'Add some feature'`)
134+
4. Push to the branch (`git push origin my-new-feature`)
135+
5. Create new Pull Request
136+
137+
### Desired Features
118138

119139
* Support for more features of DNS such as zone transfer.
120140
* Support reverse records more easily.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
2-
require 'rake/testtask'
1+
require "bundler/gem_tasks"
2+
require "rake/testtask"
33

44
Rake::TestTask.new do |t|
55
t.libs << 'test'
66
end
77

88
desc "Run tests"
99
task :default => :test
10-

build/gemspec.rb

Lines changed: 0 additions & 24 deletions
This file was deleted.

build/rakefile.rb

Lines changed: 0 additions & 37 deletions
This file was deleted.

lib/rubydns.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module RubyDNS
6666
#
6767
def self.run_server (options = {}, &block)
6868
server = RubyDNS::Server.new(&block)
69-
server.logger.info "Starting RubyDNS server (v#{RubyDNS::VERSION::STRING})..."
69+
server.logger.info "Starting RubyDNS server (v#{RubyDNS::VERSION})..."
7070

7171
options[:listen] ||= [[:udp, "0.0.0.0", 53], [:tcp, "0.0.0.0", 53]]
7272

@@ -89,4 +89,3 @@ def self.run_server (options = {}, &block)
8989
server.fire(:stop)
9090
end
9191
end
92-

lib/rubydns/version.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,5 @@
1919
# THE SOFTWARE.
2020

2121
module RubyDNS
22-
module VERSION #:nodoc:
23-
MAJOR = 0
24-
MINOR = 5
25-
TINY = 3
26-
27-
STRING = [MAJOR, MINOR, TINY].join('.')
28-
end
22+
VERSION = "0.5.3"
2923
end

rubydns.gemspec

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- encoding: utf-8 -*-
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'rubydns/version'
5+
6+
Gem::Specification.new do |gem|
7+
gem.name = "rubydns"
8+
gem.version = RubyDNS::VERSION
9+
gem.authors = ["Samuel Williams"]
10+
gem.email = ["samuel.williams@oriontransfer.co.nz"]
11+
gem.description = <<-EOF
12+
RubyDNS is a high-performance DNS server which can be easily integrated into
13+
other projects or used as a stand-alone daemon (via RExec). By default it uses
14+
rule-based pattern matching. Results can be hard-coded, computed, fetched from
15+
a remote DNS server or fetched from a local cache, depending on requirements.
16+
17+
In addition, RubyDNS includes a high-performance asynchronous DNS resolver
18+
built on top of EventMachine. This module can be used by itself in client
19+
applications without using the full RubyDNS server stack.
20+
EOF
21+
gem.summary = "An easy to use DNS server and resolver for Ruby."
22+
gem.homepage = "https://github.com/ioquatix/rubydns"
23+
24+
gem.files = `git ls-files`.split($/)
25+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
26+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
27+
gem.require_paths = ["lib"]
28+
29+
gem.add_dependency("rexec", "~> 1.5.1")
30+
gem.add_dependency("eventmachine", "~> 1.0.0")
31+
32+
gem.has_rdoc = "yard"
33+
end

0 commit comments

Comments
 (0)