msgpack 0.6.0pre1-java → 0.6.1-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/cruby/packer_spec.rb +18 -0
- data/spec/jruby/msgpack_spec.rb +21 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c456325198969a4aa40e771a0bf1feef897207e
|
4
|
+
data.tar.gz: c11dbb9c8d964d5432ad94cd40ded34ef3e39511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a938d0d68d31ca20f1ddbd26713f0be5334ff3443a71d1795603780d028700025c9a010e8cb11881c4eac5db5a41cdd156c75365b490e5e576ca8c11f4c1235
|
7
|
+
data.tar.gz: 38b7605a963eb86d8c736532c85bab45a956a4db056471d910616d336caac9b3f1a7b179d8a62a783840596d94d9e7d686ea01887160c5cb92b8927a4e5c9bef
|
data/lib/msgpack/msgpack.jar
CHANGED
Binary file
|
data/lib/msgpack/version.rb
CHANGED
data/spec/cruby/packer_spec.rb
CHANGED
@@ -116,5 +116,23 @@ describe Packer do
|
|
116
116
|
CustomPack02.new.to_msgpack(s04)
|
117
117
|
s04.string.should == [1,2].to_msgpack
|
118
118
|
end
|
119
|
+
|
120
|
+
context 'in compatibility mode' do
|
121
|
+
it 'does not use the bin types' do
|
122
|
+
packed = MessagePack.pack('hello'.force_encoding(Encoding::BINARY), compatibility_mode: true)
|
123
|
+
packed.should eq("\xA5hello")
|
124
|
+
packed = MessagePack.pack(('hello' * 100).force_encoding(Encoding::BINARY), compatibility_mode: true)
|
125
|
+
packed.should start_with("\xDA\x01\xF4")
|
126
|
+
|
127
|
+
packer = MessagePack::Packer.new(compatibility_mode: 1)
|
128
|
+
packed = packer.pack(('hello' * 100).force_encoding(Encoding::BINARY))
|
129
|
+
packed.to_str.should start_with("\xDA\x01\xF4")
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'does not use the str8 type' do
|
133
|
+
packed = MessagePack.pack('x' * 32, compatibility_mode: true)
|
134
|
+
packed.should start_with("\xDA\x00\x20")
|
135
|
+
end
|
136
|
+
end
|
119
137
|
end
|
120
138
|
|
data/spec/jruby/msgpack_spec.rb
CHANGED
@@ -36,9 +36,15 @@ describe MessagePack do
|
|
36
36
|
['negative floats', -2.1, "\xCB\xC0\x00\xCC\xCC\xCC\xCC\xCC\xCD"]
|
37
37
|
],
|
38
38
|
'strings' => [
|
39
|
-
['strings', utf8enc('hello world'), "\xABhello world"],
|
39
|
+
['tiny strings', utf8enc('hello world'), "\xABhello world"],
|
40
|
+
['short strings', utf8enc('hello' * 5), "\xB9hellohellohellohellohello"],
|
40
41
|
['empty strings', utf8enc(''), "\xA0"]
|
41
42
|
],
|
43
|
+
'binary strings' => [
|
44
|
+
['tiny strings', asciienc('hello world'), "\xC4\vhello world"],
|
45
|
+
['short strings', asciienc('hello' * 5), "\xC4\x19hellohellohellohellohello"],
|
46
|
+
['empty strings', asciienc(''), "\xC4\x00"]
|
47
|
+
],
|
42
48
|
'arrays' => [
|
43
49
|
['empty arrays', [], "\x90"],
|
44
50
|
['arrays with strings', [utf8enc("hello"), utf8enc("world")], "\x92\xA5hello\xA5world"],
|
@@ -139,4 +145,18 @@ describe MessagePack do
|
|
139
145
|
packed.index("w\xC3\xA5rld").should_not be_nil
|
140
146
|
end
|
141
147
|
end
|
148
|
+
|
149
|
+
context 'in compatibility mode' do
|
150
|
+
it 'does not use the bin types' do
|
151
|
+
packed = MessagePack.pack('hello'.force_encoding(Encoding::BINARY), compatibility_mode: true)
|
152
|
+
packed.should eq("\xA5hello")
|
153
|
+
packed = MessagePack.pack(('hello' * 100).force_encoding(Encoding::BINARY), compatibility_mode: true)
|
154
|
+
packed.should start_with("\xDA\x01\xF4")
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'does not use the str8 type' do
|
158
|
+
packed = MessagePack.pack('x' * 32, compatibility_mode: true)
|
159
|
+
packed.should start_with("\xDA\x00\x20")
|
160
|
+
end
|
161
|
+
end
|
142
162
|
end
|
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.6.
|
4
|
+
version: 0.6.1
|
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-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,9 +140,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - '
|
143
|
+
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project: msgpack
|
148
148
|
rubygems_version: 2.4.6
|