rexpro 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/lib/rexpro/message.rb +1 -2
- data/lib/rexpro/version.rb +1 -1
- data/spec/message_spec.rb +20 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c285c8ba0eff69cc073538af4ec13e778e4bd446
|
4
|
+
data.tar.gz: 6222bc5d0537fc9b5a7930b6cb2e5675fe99838b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44e8e198fc74b2178c377e3261a950a06dec30712d39f3a1e51d118e17b2be597b7b730269c2c7c5ddd225bc3c348f53d6a491eaf83c2b83eab22c95a74dc23f
|
7
|
+
data.tar.gz: 794291c0201aaf38028a08147ae5c114b80dfe0350a6d21bada272ac4ea16783e4923895d2ec198ab5c5f5854fef9cbb2ade41f85d63a954a6bd8bff56bc9ca0
|
data/lib/rexpro/message.rb
CHANGED
data/lib/rexpro/version.rb
CHANGED
data/spec/message_spec.rb
CHANGED
@@ -50,8 +50,8 @@ describe Rexpro::Message::SessionRequest do
|
|
50
50
|
it 'correctly writes to the io object' do
|
51
51
|
subject.session_uuid = 'abcdefghijklmnop'
|
52
52
|
subject.write_to(io)
|
53
|
-
io.string.must_equal "\x01\x00\x00\x00\x00\x00\x01\x00\x00\x00&\x95\
|
54
|
-
"\xB01234567812345678\x80\xA0\xA0"
|
53
|
+
io.string.must_equal "\x01\x00\x00\x00\x00\x00\x01\x00\x00\x00&\x95\xB0" +
|
54
|
+
"abcdefghijklmnop\xB01234567812345678\x80\xA0\xA0"
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'is symmetrical with .read_from' do
|
@@ -61,5 +61,23 @@ describe Rexpro::Message::SessionRequest do
|
|
61
61
|
msg.must_be_instance_of Rexpro::Message::SessionRequest
|
62
62
|
msg.request_uuid.must_equal subject.request_uuid
|
63
63
|
end
|
64
|
+
|
65
|
+
describe 'write count' do
|
66
|
+
class WriteCounter
|
67
|
+
attr_accessor :write_count
|
68
|
+
|
69
|
+
def write(*)
|
70
|
+
@write_count ||= 0
|
71
|
+
@write_count += 1
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
let(:io) { WriteCounter.new }
|
76
|
+
|
77
|
+
it 'makes only one .write call' do
|
78
|
+
subject.write_to(io)
|
79
|
+
io.write_count.must_equal 1
|
80
|
+
end
|
81
|
+
end
|
64
82
|
end
|
65
83
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexpro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lann Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|