msgpack 0.5.10-java → 0.5.11-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/version.rb +1 -1
- data/spec/jruby/msgpack_spec.rb +4 -4
- data/spec/pack_spec.rb +26 -26
- data/spec/unpack_spec.rb +8 -20
- 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: 6a2c9ba0a6296551a50811971cf943e6c9713b96
|
4
|
+
data.tar.gz: fea5438fb06f3b6b9a7172a384255cdc6963d50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ef72d1c2339cef2c371029de8cf69228272e8ecb7de0d1020b40ed4206afb226639df8c54a27ccb7ba284cac534230de29316ab45b6adccca79450d8ca60e71
|
7
|
+
data.tar.gz: 9d89bf589924f5a9e517d1ebefcca337d3c7292e7ae76271d9f6e7816aa4191ed27f16aa41cf3c8b671a3f0ce9e32a6664c9c0d50370e24a7d31819a4475ec34
|
data/lib/msgpack/version.rb
CHANGED
data/spec/jruby/msgpack_spec.rb
CHANGED
@@ -109,10 +109,10 @@ describe MessagePack do
|
|
109
109
|
expect { MessagePack.pack(self) }.to raise_error(ArgumentError, /^Cannot pack type:/)
|
110
110
|
end
|
111
111
|
|
112
|
-
it 'rasies an error on #unpack with garbage' do
|
113
|
-
|
114
|
-
|
115
|
-
end
|
112
|
+
#it 'rasies an error on #unpack with garbage' do
|
113
|
+
# skip "???"
|
114
|
+
# expect { MessagePack.unpack('asdka;sd') }.to raise_error(MessagePack::UnpackError)
|
115
|
+
#end
|
116
116
|
end
|
117
117
|
|
118
118
|
context 'extensions' do
|
data/spec/pack_spec.rb
CHANGED
@@ -34,34 +34,34 @@ describe MessagePack do
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
it 'calls custom to_msgpack method' do
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
end
|
37
|
+
#it 'calls custom to_msgpack method' do
|
38
|
+
# if /java/ =~ RUBY_PLATFORM
|
39
|
+
# skip "custom to_msgpack fallback is not supported yet in JRuby implementation"
|
40
|
+
# end
|
41
|
+
# MessagePack.pack(CustomPack01.new).should == [1,2].to_msgpack
|
42
|
+
# MessagePack.pack(CustomPack02.new).should == [1,2].to_msgpack
|
43
|
+
# CustomPack01.new.to_msgpack.should == [1,2].to_msgpack
|
44
|
+
# CustomPack02.new.to_msgpack.should == [1,2].to_msgpack
|
45
|
+
#end
|
46
46
|
|
47
|
-
it 'calls custom to_msgpack method with io' do
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
47
|
+
#it 'calls custom to_msgpack method with io' do
|
48
|
+
# if /java/ =~ RUBY_PLATFORM
|
49
|
+
# skip "custom to_msgpack fallback with io is not supported yet in JRuby implementation"
|
50
|
+
# end
|
51
|
+
# s01 = StringIO.new
|
52
|
+
# MessagePack.pack(CustomPack01.new, s01)
|
53
|
+
# s01.string.should == [1,2].to_msgpack
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
# s02 = StringIO.new
|
56
|
+
# MessagePack.pack(CustomPack02.new, s02)
|
57
|
+
# s02.string.should == [1,2].to_msgpack
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
# s03 = StringIO.new
|
60
|
+
# CustomPack01.new.to_msgpack(s03)
|
61
|
+
# s03.string.should == [1,2].to_msgpack
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
63
|
+
# s04 = StringIO.new
|
64
|
+
# CustomPack02.new.to_msgpack(s04)
|
65
|
+
# s04.string.should == [1,2].to_msgpack
|
66
|
+
#end
|
67
67
|
end
|
data/spec/unpack_spec.rb
CHANGED
@@ -13,19 +13,16 @@ describe MessagePack do
|
|
13
13
|
MessagePack.unpack(MessagePack.pack(symbolized_hash), :symbolize_keys => true).should == symbolized_hash
|
14
14
|
end
|
15
15
|
|
16
|
-
it 'Unpacker#unpack symbolize_keys' do
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
16
|
+
#it 'Unpacker#unpack symbolize_keys' do
|
17
|
+
# if /java/ =~ RUBY_PLATFORM
|
18
|
+
# skip "Unpacker#unpack returns nil in JRuby (incompatible)"
|
19
|
+
# end
|
20
|
+
# unpacker = MessagePack::Unpacker.new(:symbolize_keys => true)
|
21
|
+
# symbolized_hash = {:a => 'b', :c => 'd'}
|
22
|
+
# unpacker.feed(MessagePack.pack(symbolized_hash)).read.should == symbolized_hash
|
23
|
+
#end
|
24
24
|
|
25
25
|
it "msgpack str 8 type" do
|
26
|
-
if /java/ =~ RUBY_PLATFORM
|
27
|
-
skip "str 8 type is not supported in JRuby (incompatibility)"
|
28
|
-
end
|
29
26
|
MessagePack.unpack([0xd9, 0x00].pack('C*')).should == ""
|
30
27
|
MessagePack.unpack([0xd9, 0x01].pack('C*') + 'a').should == "a"
|
31
28
|
MessagePack.unpack([0xd9, 0x02].pack('C*') + 'aa').should == "aa"
|
@@ -44,27 +41,18 @@ describe MessagePack do
|
|
44
41
|
end
|
45
42
|
|
46
43
|
it "msgpack bin 8 type" do
|
47
|
-
if /java/ =~ RUBY_PLATFORM
|
48
|
-
skip "bin 8 type is not supported in JRuby (incompatibility)"
|
49
|
-
end
|
50
44
|
MessagePack.unpack([0xc4, 0x00].pack('C*')).should == ""
|
51
45
|
MessagePack.unpack([0xc4, 0x01].pack('C*') + 'a').should == "a"
|
52
46
|
MessagePack.unpack([0xc4, 0x02].pack('C*') + 'aa').should == "aa"
|
53
47
|
end
|
54
48
|
|
55
49
|
it "msgpack bin 16 type" do
|
56
|
-
if /java/ =~ RUBY_PLATFORM
|
57
|
-
skip "bin 16 type is not supported in JRuby (incompatibility)"
|
58
|
-
end
|
59
50
|
MessagePack.unpack([0xc5, 0x00, 0x00].pack('C*')).should == ""
|
60
51
|
MessagePack.unpack([0xc5, 0x00, 0x01].pack('C*') + 'a').should == "a"
|
61
52
|
MessagePack.unpack([0xc5, 0x00, 0x02].pack('C*') + 'aa').should == "aa"
|
62
53
|
end
|
63
54
|
|
64
55
|
it "msgpack bin 32 type" do
|
65
|
-
if /java/ =~ RUBY_PLATFORM
|
66
|
-
skip "bin 32 type is not supported in JRuby (incompatibility)"
|
67
|
-
end
|
68
56
|
MessagePack.unpack([0xc6, 0x00, 0x00, 0x00, 0x00].pack('C*')).should == ""
|
69
57
|
MessagePack.unpack([0xc6, 0x00, 0x00, 0x00, 0x01].pack('C*') + 'a').should == "a"
|
70
58
|
MessagePack.unpack([0xc6, 0x00, 0x00, 0x00, 0x02].pack('C*') + 'aa').should == "aa"
|
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.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|