msgpack 0.7.0dev1-x86-mingw32 → 0.7.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msgpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0dev1
4
+ version: 0.7.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  - Theo Hultberg
9
+ - Satoshi Tagomori
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-09-05 00:00:00.000000000 Z
13
+ date: 2015-10-24 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: bundler
@@ -115,6 +116,7 @@ description: MessagePack is a binary-based efficient object serialization librar
115
116
  email:
116
117
  - frsyuki@gmail.com
117
118
  - theo@iconara.net
119
+ - tagomoris@gmail.com
118
120
  executables: []
119
121
  extensions: []
120
122
  extra_rdoc_files: []
@@ -147,7 +149,9 @@ files:
147
149
  - ext/java/org/msgpack/jruby/Buffer.java
148
150
  - ext/java/org/msgpack/jruby/Decoder.java
149
151
  - ext/java/org/msgpack/jruby/Encoder.java
152
+ - ext/java/org/msgpack/jruby/ExtensionRegistry.java
150
153
  - ext/java/org/msgpack/jruby/ExtensionValue.java
154
+ - ext/java/org/msgpack/jruby/Factory.java
151
155
  - ext/java/org/msgpack/jruby/MessagePackLibrary.java
152
156
  - ext/java/org/msgpack/jruby/Packer.java
153
157
  - ext/java/org/msgpack/jruby/Types.java
@@ -201,7 +205,6 @@ files:
201
205
  - spec/cruby/buffer_packer.rb
202
206
  - spec/cruby/buffer_spec.rb
203
207
  - spec/cruby/buffer_unpacker.rb
204
- - spec/cruby/packer_spec.rb
205
208
  - spec/cruby/unpacker_spec.rb
206
209
  - spec/ext_value_spec.rb
207
210
  - spec/exttypes.rb
@@ -209,7 +212,7 @@ files:
209
212
  - spec/format_spec.rb
210
213
  - spec/jruby/benchmarks/shootout_bm.rb
211
214
  - spec/jruby/benchmarks/symbolize_keys_bm.rb
212
- - spec/jruby/msgpack/unpacker_spec.rb
215
+ - spec/jruby/unpacker_spec.rb
213
216
  - spec/msgpack_spec.rb
214
217
  - spec/pack_spec.rb
215
218
  - spec/packer_spec.rb
@@ -232,9 +235,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
235
  version: '0'
233
236
  required_rubygems_version: !ruby/object:Gem::Requirement
234
237
  requirements:
235
- - - ">"
238
+ - - ">="
236
239
  - !ruby/object:Gem::Version
237
- version: 1.3.1
240
+ version: '0'
238
241
  requirements: []
239
242
  rubyforge_project: msgpack
240
243
  rubygems_version: 2.4.8
@@ -1,138 +0,0 @@
1
- # encoding: ascii-8bit
2
- require 'spec_helper'
3
-
4
- require 'stringio'
5
- if defined?(Encoding)
6
- Encoding.default_external = 'ASCII-8BIT'
7
- end
8
-
9
- describe Packer do
10
- let :packer do
11
- Packer.new
12
- end
13
-
14
- it 'initialize' do
15
- Packer.new
16
- Packer.new(nil)
17
- Packer.new(StringIO.new)
18
- Packer.new({})
19
- Packer.new(StringIO.new, {})
20
- end
21
-
22
- #it 'Packer' do
23
- # Packer(packer).object_id.should == packer.object_id
24
- # Packer(nil).class.should == Packer
25
- # Packer('').class.should == Packer
26
- # Packer('initbuf').to_s.should == 'initbuf'
27
- #end
28
-
29
- it 'write' do
30
- packer.write([])
31
- packer.to_s.should == "\x90"
32
- end
33
-
34
- it 'write_nil' do
35
- packer.write_nil
36
- packer.to_s.should == "\xc0"
37
- end
38
-
39
- it 'write_array_header 0' do
40
- packer.write_array_header(0)
41
- packer.to_s.should == "\x90"
42
- end
43
-
44
- it 'write_array_header 1' do
45
- packer.write_array_header(1)
46
- packer.to_s.should == "\x91"
47
- end
48
-
49
- it 'write_map_header 0' do
50
- packer.write_map_header(0)
51
- packer.to_s.should == "\x80"
52
- end
53
-
54
- it 'write_map_header 1' do
55
- packer.write_map_header(1)
56
- packer.to_s.should == "\x81"
57
- end
58
-
59
- it 'flush' do
60
- io = StringIO.new
61
- pk = Packer.new(io)
62
- pk.write_nil
63
- pk.flush
64
- pk.to_s.should == ''
65
- io.string.should == "\xc0"
66
- end
67
-
68
- it 'to_msgpack returns String' do
69
- nil.to_msgpack.class.should == String
70
- true.to_msgpack.class.should == String
71
- false.to_msgpack.class.should == String
72
- 1.to_msgpack.class.should == String
73
- 1.0.to_msgpack.class.should == String
74
- "".to_msgpack.class.should == String
75
- Hash.new.to_msgpack.class.should == String
76
- Array.new.to_msgpack.class.should == String
77
- end
78
-
79
- class CustomPack01
80
- def to_msgpack(pk=nil)
81
- return MessagePack.pack(self, pk) unless pk.class == MessagePack::Packer
82
- pk.write_array_header(2)
83
- pk.write(1)
84
- pk.write(2)
85
- return pk
86
- end
87
- end
88
-
89
- class CustomPack02
90
- def to_msgpack(pk=nil)
91
- [1,2].to_msgpack(pk)
92
- end
93
- end
94
-
95
- it 'calls custom to_msgpack method' do
96
- MessagePack.pack(CustomPack01.new).should == [1,2].to_msgpack
97
- MessagePack.pack(CustomPack02.new).should == [1,2].to_msgpack
98
- CustomPack01.new.to_msgpack.should == [1,2].to_msgpack
99
- CustomPack02.new.to_msgpack.should == [1,2].to_msgpack
100
- end
101
-
102
- it 'calls custom to_msgpack method with io' do
103
- s01 = StringIO.new
104
- MessagePack.pack(CustomPack01.new, s01)
105
- s01.string.should == [1,2].to_msgpack
106
-
107
- s02 = StringIO.new
108
- MessagePack.pack(CustomPack02.new, s02)
109
- s02.string.should == [1,2].to_msgpack
110
-
111
- s03 = StringIO.new
112
- CustomPack01.new.to_msgpack(s03)
113
- s03.string.should == [1,2].to_msgpack
114
-
115
- s04 = StringIO.new
116
- CustomPack02.new.to_msgpack(s04)
117
- s04.string.should == [1,2].to_msgpack
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
137
- end
138
-