msgpack 1.0.0-java → 1.0.1-java
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/msgpack/version.rb +1 -1
- data/spec/packer_spec.rb +26 -0
- data/spec/unpacker_spec.rb +11 -0
- metadata +2 -3
- data/lib/msgpack/msgpack.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a2761aaff139656fb065a7ded97971d7dd0de4f
|
4
|
+
data.tar.gz: 6572ca9152ada740eacb073a74f7393da221b982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a01d7edbfaf2cfdc273e0caf9d5ed7862bb77c6c893a68bc0f6a97d3d8ce8e55fb1258eb950a412fc23fb1d0d75ab0e592426ce6dea6e334fbb431bcc0ab70
|
7
|
+
data.tar.gz: f6ad4afc7b20380ae61e71d6f2939f19d90d39a7b7799f9a088c6a49c86e97f785fa2ebfe685eac4ba6d5f00974b1c0fbe85c800666315932d3d82901ce3dac9
|
data/lib/msgpack/version.rb
CHANGED
data/spec/packer_spec.rb
CHANGED
@@ -324,6 +324,32 @@ describe MessagePack::Packer do
|
|
324
324
|
expect(two[:packer]).to eq(:to_msgpack_ext)
|
325
325
|
end
|
326
326
|
|
327
|
+
context 'when it has no ext type but a super class has' do
|
328
|
+
before { stub_const('Value', Class.new) }
|
329
|
+
before do
|
330
|
+
Value.class_eval do
|
331
|
+
def to_msgpack_ext
|
332
|
+
'value_msgpacked'
|
333
|
+
end
|
334
|
+
end
|
335
|
+
end
|
336
|
+
before { packer.register_type(0x01, Value, :to_msgpack_ext) }
|
337
|
+
|
338
|
+
context "when it is a child class" do
|
339
|
+
before { stub_const('InheritedValue', Class.new(Value)) }
|
340
|
+
subject { packer.pack(InheritedValue.new).to_s }
|
341
|
+
|
342
|
+
it { is_expected.to eq "\xC7\x0F\x01value_msgpacked" }
|
343
|
+
|
344
|
+
context "when it is a grandchild class" do
|
345
|
+
before { stub_const('InheritedTwiceValue', Class.new(InheritedValue)) }
|
346
|
+
subject { packer.pack(InheritedTwiceValue.new).to_s }
|
347
|
+
|
348
|
+
it { is_expected.to eq "\xC7\x0F\x01value_msgpacked" }
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
327
353
|
context 'when registering a type for symbols' do
|
328
354
|
before { packer.register_type(0x00, ::Symbol, :to_msgpack_ext) }
|
329
355
|
|
data/spec/unpacker_spec.rb
CHANGED
@@ -564,6 +564,17 @@ describe MessagePack::Unpacker do
|
|
564
564
|
objects.should == [{'foo' => 'bar'}, {'hello' => {'world' => [1, 2, 3]}}, {'x' => 'y'}]
|
565
565
|
end
|
566
566
|
end
|
567
|
+
|
568
|
+
context 'with a stream and symbolize_keys passed to the constructor' do
|
569
|
+
it 'yields each object in the stream, with symbolized keys' do
|
570
|
+
objects = []
|
571
|
+
unpacker = described_class.new(StringIO.new(buffer1 + buffer2 + buffer3), symbolize_keys: true)
|
572
|
+
unpacker.each do |obj|
|
573
|
+
objects << obj
|
574
|
+
end
|
575
|
+
objects.should == [{:foo => 'bar'}, {:hello => {:world => [1, 2, 3]}}, {:x => 'y'}]
|
576
|
+
end
|
577
|
+
end
|
567
578
|
end
|
568
579
|
|
569
580
|
describe '#feed_each' do
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
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-
|
13
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,6 @@ extra_rdoc_files: []
|
|
107
107
|
files:
|
108
108
|
- lib/msgpack.rb
|
109
109
|
- lib/msgpack/factory.rb
|
110
|
-
- lib/msgpack/msgpack.jar
|
111
110
|
- lib/msgpack/packer.rb
|
112
111
|
- lib/msgpack/symbol.rb
|
113
112
|
- lib/msgpack/unpacker.rb
|
data/lib/msgpack/msgpack.jar
DELETED
Binary file
|