msgpack 0.7.2-java → 0.7.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/msgpack/msgpack.jar +0 -0
- data/lib/msgpack/version.rb +1 -1
- data/spec/packer_spec.rb +24 -0
- 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: 8f5d65b7af869bd2939df3d101222b608a5b601e
|
4
|
+
data.tar.gz: b41f4d06f3a84d90478d508f3a1efe3d612e5cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4709e1faf80cc6f2d58c9e40b1692c517279194efadef097c74be99f1ee8d7e3229a324e30901df0a583163e47ab6e42b99b7739786a568b01e17fb2d7b1a8e6
|
7
|
+
data.tar.gz: edd880415747d6c932deb76f1b69048a2c7eb2a885a2e03a8d05b61e72608be990173adcffa7ec29d66de61361e517273f63d7dd11c2f46d75bdc87b28fd8724
|
data/lib/msgpack/msgpack.jar
CHANGED
Binary file
|
data/lib/msgpack/version.rb
CHANGED
data/spec/packer_spec.rb
CHANGED
@@ -134,6 +134,30 @@ describe MessagePack::Packer do
|
|
134
134
|
packer.to_s.should == "\x81"
|
135
135
|
end
|
136
136
|
|
137
|
+
describe '#write_float32' do
|
138
|
+
tests = [
|
139
|
+
['small floats', 3.14, "\xCA\x40\x48\xF5\xC3"],
|
140
|
+
['big floats', Math::PI * 1_000_000_000_000_000_000, "\xCA\x5E\x2E\x64\xB7"],
|
141
|
+
['negative floats', -2.1, "\xCA\xC0\x06\x66\x66"],
|
142
|
+
['integer', 123, "\xCA\x42\xF6\x00\x00"],
|
143
|
+
]
|
144
|
+
|
145
|
+
tests.each do |ctx, numeric, packed|
|
146
|
+
context("with #{ctx}") do
|
147
|
+
it("encodes #{numeric} as float32") do
|
148
|
+
packer.write_float32(numeric)
|
149
|
+
packer.to_s.should == packed
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
context 'with non numeric' do
|
155
|
+
it 'raises argument error' do
|
156
|
+
expect { packer.write_float32('abc') }.to raise_error(ArgumentError)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
137
161
|
it 'flush' do
|
138
162
|
io = StringIO.new
|
139
163
|
pk = MessagePack::Packer.new(io)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-01-
|
13
|
+
date: 2016-01-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|