redns 0.1.3 → 0.1.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/VERSION +1 -1
- data/lib/redns/buffer.rb +3 -0
- data/redns.gemspec +2 -2
- data/test/test_redns_buffer.rb +15 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/redns/buffer.rb
CHANGED
data/redns.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{redns}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["tadman"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-17}
|
13
13
|
s.description = %q{ReDNS is a pure Ruby DNS library with drivers for reactor-model engines such as EventMachine}
|
14
14
|
s.email = %q{github@tadman.ca}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/test_redns_buffer.rb
CHANGED
@@ -136,6 +136,21 @@ class TestReDNSBuffer < Test::Unit::TestCase
|
|
136
136
|
assert_equal [ (127 << 24 | 255) ], buffer.unpack('N')
|
137
137
|
end
|
138
138
|
|
139
|
+
def test_unpack_exhausted_buffer
|
140
|
+
buffer = ReDNS::Buffer.new([ 127, 0, 0 ].pack('CCC'))
|
141
|
+
|
142
|
+
assert_equal [ ], buffer.unpack('CCCC')
|
143
|
+
|
144
|
+
assert_equal [ 127, 0, 0 ], buffer.unpack('CCC')
|
145
|
+
|
146
|
+
assert_equal 3, buffer.offset
|
147
|
+
assert_equal 0, buffer.length
|
148
|
+
|
149
|
+
buffer.rewind
|
150
|
+
|
151
|
+
assert_equal [ ], buffer.unpack('N')
|
152
|
+
end
|
153
|
+
|
139
154
|
def test_pack
|
140
155
|
buffer = ReDNS::Buffer.new
|
141
156
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- tadman
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-17 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|