msgpack 0.5.11-java → 0.5.12-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/jruby/msgpack_spec.rb +10 -4
- data/spec/pack_spec.rb +26 -26
- data/spec/unpack_spec.rb +8 -8
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4298a20fb1f4ffb9b85b3c5a2c572bfe81538b5
|
4
|
+
data.tar.gz: 983b69036662b8e863b9243d8ec35597845e8e34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8704975e16c1e7f8ac3f85e048680d8f78daa9deaba983d48c2c3630802b211ae9bc0483c0b5befe4edbbe1ed37742912aaf3eddd6d9086a1821308e184a99c1
|
7
|
+
data.tar.gz: aff4ddfe43fa7e24ef400c9a84e9f963b86b9a46588292f4bd2fe79ecc82dd797121ae896526daa9c1b6bca04b1c2085dd8459d1b0671560f4a012d65140e920
|
data/lib/msgpack/msgpack.jar
CHANGED
Binary file
|
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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
@@ -122,6 +122,12 @@ describe MessagePack do
|
|
122
122
|
unpacked.should == {:hello => 'world', :nested => ['object', {:structure => true}]}
|
123
123
|
end
|
124
124
|
|
125
|
+
it 'does not symbolize keys even if other options are present' do
|
126
|
+
packed = MessagePack.pack({'hello' => 'world', 'nested' => ['object', {'structure' => true}]})
|
127
|
+
unpacked = MessagePack.unpack(packed, :other_option => false)
|
128
|
+
unpacked.should == {'hello' => 'world', 'nested' => ['object', {'structure' => true}]}
|
129
|
+
end
|
130
|
+
|
125
131
|
it 'can unpack strings with a specified encoding', :encodings do
|
126
132
|
packed = MessagePack.pack({utf8enc('hello') => utf8enc('world')})
|
127
133
|
unpacked = MessagePack.unpack(packed)
|
data/spec/pack_spec.rb
CHANGED
@@ -34,34 +34,34 @@ describe MessagePack do
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
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
|
-
|
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,14 +13,14 @@ describe MessagePack do
|
|
13
13
|
MessagePack.unpack(MessagePack.pack(symbolized_hash), :symbolize_keys => true).should == symbolized_hash
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
26
|
MessagePack.unpack([0xd9, 0x00].pack('C*')).should == ""
|
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.12
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,92 +9,92 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: bundler
|
16
|
-
version_requirements: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ~>
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '1.0'
|
21
15
|
requirement: !ruby/object:Gem::Requirement
|
22
16
|
requirements:
|
23
17
|
- - ~>
|
24
18
|
- !ruby/object:Gem::Version
|
25
19
|
version: '1.0'
|
20
|
+
name: bundler
|
26
21
|
prerelease: false
|
27
22
|
type: :development
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
30
23
|
version_requirements: !ruby/object:Gem::Requirement
|
31
24
|
requirements:
|
32
25
|
- - ~>
|
33
26
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0
|
27
|
+
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - ~>
|
38
32
|
- !ruby/object:Gem::Version
|
39
33
|
version: 0.9.2
|
34
|
+
name: rake
|
40
35
|
prerelease: false
|
41
36
|
type: :development
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: rake-compiler
|
44
37
|
version_requirements: !ruby/object:Gem::Requirement
|
45
38
|
requirements:
|
46
39
|
- - ~>
|
47
40
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
41
|
+
version: 0.9.2
|
42
|
+
- !ruby/object:Gem::Dependency
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.8.3
|
48
|
+
name: rake-compiler
|
54
49
|
prerelease: false
|
55
50
|
type: :development
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rspec
|
58
51
|
version_requirements: !ruby/object:Gem::Requirement
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
55
|
+
version: 0.8.3
|
56
|
+
- !ruby/object:Gem::Dependency
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - ~>
|
66
60
|
- !ruby/object:Gem::Version
|
67
61
|
version: '2.11'
|
62
|
+
name: rspec
|
68
63
|
prerelease: false
|
69
64
|
type: :development
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: json
|
72
65
|
version_requirements: !ruby/object:Gem::Requirement
|
73
66
|
requirements:
|
74
67
|
- - ~>
|
75
68
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
69
|
+
version: '2.11'
|
70
|
+
- !ruby/object:Gem::Dependency
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
73
|
- - ~>
|
80
74
|
- !ruby/object:Gem::Version
|
81
75
|
version: '1.7'
|
76
|
+
name: json
|
82
77
|
prerelease: false
|
83
78
|
type: :development
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: yard
|
86
79
|
version_requirements: !ruby/object:Gem::Requirement
|
87
80
|
requirements:
|
88
81
|
- - ~>
|
89
82
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
83
|
+
version: '1.7'
|
84
|
+
- !ruby/object:Gem::Dependency
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
87
|
- - ~>
|
94
88
|
- !ruby/object:Gem::Version
|
95
89
|
version: 0.8.2
|
90
|
+
name: yard
|
96
91
|
prerelease: false
|
97
92
|
type: :development
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 0.8.2
|
98
98
|
description: MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages like JSON. But unlike JSON, it is very fast and small.
|
99
99
|
email:
|
100
100
|
- frsyuki@gmail.com
|
@@ -104,8 +104,8 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
106
|
- lib/msgpack.rb
|
107
|
-
- lib/msgpack/version.rb
|
108
107
|
- lib/msgpack/msgpack.jar
|
108
|
+
- lib/msgpack/version.rb
|
109
109
|
- spec/cases.json
|
110
110
|
- spec/cases.msg
|
111
111
|
- spec/cases_compact.msg
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project: msgpack
|
148
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.4.6
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: MessagePack, a binary-based efficient data interchange format.
|