msgpack 1.5.6 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +14 -0
- data/ext/java/org/msgpack/jruby/ExtensionRegistry.java +4 -9
- data/ext/msgpack/buffer.c +51 -38
- data/ext/msgpack/buffer.h +5 -9
- data/ext/msgpack/buffer_class.c +62 -32
- data/ext/msgpack/extconf.rb +3 -5
- data/ext/msgpack/factory_class.c +49 -26
- data/ext/msgpack/packer.c +3 -4
- data/ext/msgpack/packer.h +2 -2
- data/ext/msgpack/packer_class.c +58 -63
- data/ext/msgpack/packer_class.h +11 -0
- data/ext/msgpack/packer_ext_registry.c +2 -2
- data/ext/msgpack/packer_ext_registry.h +2 -2
- data/ext/msgpack/rbinit.c +1 -1
- data/ext/msgpack/sysdep.h +5 -2
- data/ext/msgpack/unpacker.c +6 -9
- data/ext/msgpack/unpacker.h +4 -3
- data/ext/msgpack/unpacker_class.c +55 -37
- data/ext/msgpack/unpacker_class.h +11 -0
- data/ext/msgpack/unpacker_ext_registry.c +2 -2
- data/ext/msgpack/unpacker_ext_registry.h +2 -2
- data/lib/msgpack/buffer.rb +9 -0
- data/lib/msgpack/packer.rb +4 -0
- data/lib/msgpack/unpacker.rb +4 -0
- data/lib/msgpack/version.rb +1 -1
- data/lib/msgpack.rb +1 -0
- data/msgpack.gemspec +5 -2
- metadata +18 -46
- data/.github/workflows/ci.yaml +0 -57
- data/.gitignore +0 -23
- data/.rubocop.yml +0 -36
- data/Gemfile +0 -9
- data/Rakefile +0 -70
- data/appveyor.yml +0 -18
- data/bench/bench.rb +0 -78
- data/doclib/msgpack/buffer.rb +0 -193
- data/doclib/msgpack/core_ext.rb +0 -101
- data/doclib/msgpack/error.rb +0 -19
- data/doclib/msgpack/extension_value.rb +0 -9
- data/doclib/msgpack/factory.rb +0 -145
- data/doclib/msgpack/packer.rb +0 -209
- data/doclib/msgpack/time.rb +0 -22
- data/doclib/msgpack/timestamp.rb +0 -44
- data/doclib/msgpack/unpacker.rb +0 -183
- data/doclib/msgpack.rb +0 -87
- data/msgpack.org.md +0 -46
- data/spec/bigint_spec.rb +0 -26
- data/spec/cases.json +0 -1
- data/spec/cases.msg +0 -0
- data/spec/cases_compact.msg +0 -0
- data/spec/cases_spec.rb +0 -39
- data/spec/cruby/buffer_io_spec.rb +0 -255
- data/spec/cruby/buffer_packer.rb +0 -29
- data/spec/cruby/buffer_spec.rb +0 -575
- data/spec/cruby/buffer_unpacker.rb +0 -19
- data/spec/cruby/unpacker_spec.rb +0 -70
- data/spec/ext_value_spec.rb +0 -99
- data/spec/exttypes.rb +0 -51
- data/spec/factory_spec.rb +0 -688
- data/spec/format_spec.rb +0 -301
- data/spec/jruby/benchmarks/shootout_bm.rb +0 -73
- data/spec/jruby/benchmarks/symbolize_keys_bm.rb +0 -25
- data/spec/jruby/unpacker_spec.rb +0 -186
- data/spec/msgpack_spec.rb +0 -214
- data/spec/pack_spec.rb +0 -61
- data/spec/packer_spec.rb +0 -575
- data/spec/random_compat.rb +0 -24
- data/spec/spec_helper.rb +0 -71
- data/spec/timestamp_spec.rb +0 -159
- data/spec/unpack_spec.rb +0 -57
- data/spec/unpacker_spec.rb +0 -859
@@ -37,15 +37,9 @@ static VALUE sym_symbolize_keys;
|
|
37
37
|
static VALUE sym_freeze;
|
38
38
|
static VALUE sym_allow_unknown_ext;
|
39
39
|
|
40
|
-
|
41
|
-
msgpack_unpacker_t *name = NULL; \
|
42
|
-
Data_Get_Struct(from, msgpack_unpacker_t, name); \
|
43
|
-
if(name == NULL) { \
|
44
|
-
rb_raise(rb_eArgError, "NULL found for " # name " when shouldn't be."); \
|
45
|
-
}
|
46
|
-
|
47
|
-
static void Unpacker_free(msgpack_unpacker_t* uk)
|
40
|
+
static void Unpacker_free(void *ptr)
|
48
41
|
{
|
42
|
+
msgpack_unpacker_t* uk = ptr;
|
49
43
|
if(uk == NULL) {
|
50
44
|
return;
|
51
45
|
}
|
@@ -54,17 +48,44 @@ static void Unpacker_free(msgpack_unpacker_t* uk)
|
|
54
48
|
xfree(uk);
|
55
49
|
}
|
56
50
|
|
57
|
-
static void Unpacker_mark(
|
51
|
+
static void Unpacker_mark(void *ptr)
|
58
52
|
{
|
53
|
+
msgpack_unpacker_t* uk = ptr;
|
54
|
+
msgpack_buffer_mark(uk);
|
59
55
|
msgpack_unpacker_mark(uk);
|
60
56
|
msgpack_unpacker_ext_registry_mark(uk->ext_registry);
|
61
57
|
}
|
62
58
|
|
63
|
-
|
59
|
+
static size_t Unpacker_memsize(const void *ptr)
|
64
60
|
{
|
65
|
-
|
61
|
+
size_t total_size = sizeof(msgpack_unpacker_t);
|
62
|
+
|
63
|
+
const msgpack_unpacker_t* uk = ptr;
|
64
|
+
if (uk->ext_registry) {
|
65
|
+
total_size += sizeof(msgpack_unpacker_ext_registry_t) / (uk->ext_registry->borrow_count + 1);
|
66
|
+
}
|
67
|
+
|
68
|
+
total_size += (uk->stack->depth + 1) * sizeof(msgpack_unpacker_stack_t);
|
66
69
|
|
67
|
-
|
70
|
+
return total_size + msgpack_buffer_memsize(&uk->buffer);
|
71
|
+
}
|
72
|
+
|
73
|
+
const rb_data_type_t unpacker_data_type = {
|
74
|
+
.wrap_struct_name = "msgpack:unpacker",
|
75
|
+
.function = {
|
76
|
+
.dmark = Unpacker_mark,
|
77
|
+
.dfree = Unpacker_free,
|
78
|
+
.dsize = Unpacker_memsize,
|
79
|
+
},
|
80
|
+
.flags = RUBY_TYPED_FREE_IMMEDIATELY
|
81
|
+
};
|
82
|
+
|
83
|
+
VALUE MessagePack_Unpacker_alloc(VALUE klass)
|
84
|
+
{
|
85
|
+
msgpack_unpacker_t* uk;
|
86
|
+
VALUE self = TypedData_Make_Struct(klass, msgpack_unpacker_t, &unpacker_data_type, uk);
|
87
|
+
_msgpack_unpacker_init(uk);
|
88
|
+
uk->self = self;
|
68
89
|
return self;
|
69
90
|
}
|
70
91
|
|
@@ -95,9 +116,9 @@ VALUE MessagePack_Unpacker_initialize(int argc, VALUE* argv, VALUE self)
|
|
95
116
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0..2)", argc);
|
96
117
|
}
|
97
118
|
|
98
|
-
|
119
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
99
120
|
|
100
|
-
uk->buffer_ref =
|
121
|
+
uk->buffer_ref = Qnil;
|
101
122
|
|
102
123
|
MessagePack_Buffer_set_options(UNPACKER_BUFFER_(uk), io, options);
|
103
124
|
|
@@ -119,19 +140,19 @@ VALUE MessagePack_Unpacker_initialize(int argc, VALUE* argv, VALUE self)
|
|
119
140
|
|
120
141
|
static VALUE Unpacker_symbolized_keys_p(VALUE self)
|
121
142
|
{
|
122
|
-
|
143
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
123
144
|
return uk->symbolize_keys ? Qtrue : Qfalse;
|
124
145
|
}
|
125
146
|
|
126
147
|
static VALUE Unpacker_freeze_p(VALUE self)
|
127
148
|
{
|
128
|
-
|
149
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
129
150
|
return uk->freeze ? Qtrue : Qfalse;
|
130
151
|
}
|
131
152
|
|
132
153
|
static VALUE Unpacker_allow_unknown_ext_p(VALUE self)
|
133
154
|
{
|
134
|
-
|
155
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
135
156
|
return uk->allow_unknown_ext ? Qtrue : Qfalse;
|
136
157
|
}
|
137
158
|
|
@@ -156,13 +177,16 @@ NORETURN(static void raise_unpacker_error(int r))
|
|
156
177
|
|
157
178
|
static VALUE Unpacker_buffer(VALUE self)
|
158
179
|
{
|
159
|
-
|
180
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
181
|
+
if (!RTEST(uk->buffer_ref)) {
|
182
|
+
uk->buffer_ref = MessagePack_Buffer_wrap(UNPACKER_BUFFER_(uk), self);
|
183
|
+
}
|
160
184
|
return uk->buffer_ref;
|
161
185
|
}
|
162
186
|
|
163
187
|
static VALUE Unpacker_read(VALUE self)
|
164
188
|
{
|
165
|
-
|
189
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
166
190
|
|
167
191
|
int r = msgpack_unpacker_read(uk, 0);
|
168
192
|
if(r < 0) {
|
@@ -174,7 +198,7 @@ static VALUE Unpacker_read(VALUE self)
|
|
174
198
|
|
175
199
|
static VALUE Unpacker_skip(VALUE self)
|
176
200
|
{
|
177
|
-
|
201
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
178
202
|
|
179
203
|
int r = msgpack_unpacker_skip(uk, 0);
|
180
204
|
if(r < 0) {
|
@@ -186,7 +210,7 @@ static VALUE Unpacker_skip(VALUE self)
|
|
186
210
|
|
187
211
|
static VALUE Unpacker_skip_nil(VALUE self)
|
188
212
|
{
|
189
|
-
|
213
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
190
214
|
|
191
215
|
int r = msgpack_unpacker_skip_nil(uk);
|
192
216
|
if(r < 0) {
|
@@ -201,7 +225,7 @@ static VALUE Unpacker_skip_nil(VALUE self)
|
|
201
225
|
|
202
226
|
static VALUE Unpacker_read_array_header(VALUE self)
|
203
227
|
{
|
204
|
-
|
228
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
205
229
|
|
206
230
|
uint32_t size;
|
207
231
|
int r = msgpack_unpacker_read_array_header(uk, &size);
|
@@ -214,7 +238,7 @@ static VALUE Unpacker_read_array_header(VALUE self)
|
|
214
238
|
|
215
239
|
static VALUE Unpacker_read_map_header(VALUE self)
|
216
240
|
{
|
217
|
-
|
241
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
218
242
|
|
219
243
|
uint32_t size;
|
220
244
|
int r = msgpack_unpacker_read_map_header(uk, &size);
|
@@ -228,7 +252,7 @@ static VALUE Unpacker_read_map_header(VALUE self)
|
|
228
252
|
|
229
253
|
static VALUE Unpacker_feed(VALUE self, VALUE data)
|
230
254
|
{
|
231
|
-
|
255
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
232
256
|
|
233
257
|
StringValue(data);
|
234
258
|
|
@@ -239,7 +263,7 @@ static VALUE Unpacker_feed(VALUE self, VALUE data)
|
|
239
263
|
|
240
264
|
static VALUE Unpacker_feed_reference(VALUE self, VALUE data)
|
241
265
|
{
|
242
|
-
|
266
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
243
267
|
|
244
268
|
StringValue(data);
|
245
269
|
|
@@ -250,7 +274,7 @@ static VALUE Unpacker_feed_reference(VALUE self, VALUE data)
|
|
250
274
|
|
251
275
|
static VALUE Unpacker_each_impl(VALUE self)
|
252
276
|
{
|
253
|
-
|
277
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
254
278
|
|
255
279
|
while(true) {
|
256
280
|
int r = msgpack_unpacker_read(uk, 0);
|
@@ -280,7 +304,7 @@ static VALUE Unpacker_rescue_EOFError(VALUE args, VALUE error)
|
|
280
304
|
|
281
305
|
static VALUE Unpacker_each(VALUE self)
|
282
306
|
{
|
283
|
-
|
307
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
284
308
|
|
285
309
|
#ifdef RETURN_ENUMERATOR
|
286
310
|
RETURN_ENUMERATOR(self, 0, 0);
|
@@ -311,7 +335,7 @@ static VALUE Unpacker_feed_each(VALUE self, VALUE data)
|
|
311
335
|
|
312
336
|
static VALUE Unpacker_reset(VALUE self)
|
313
337
|
{
|
314
|
-
|
338
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
315
339
|
|
316
340
|
_msgpack_unpacker_reset(uk);
|
317
341
|
|
@@ -320,7 +344,7 @@ static VALUE Unpacker_reset(VALUE self)
|
|
320
344
|
|
321
345
|
static VALUE Unpacker_registered_types_internal(VALUE self)
|
322
346
|
{
|
323
|
-
|
347
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
324
348
|
|
325
349
|
VALUE mapping = rb_hash_new();
|
326
350
|
if (uk->ext_registry) {
|
@@ -336,7 +360,7 @@ static VALUE Unpacker_registered_types_internal(VALUE self)
|
|
336
360
|
|
337
361
|
static VALUE Unpacker_register_type(int argc, VALUE* argv, VALUE self)
|
338
362
|
{
|
339
|
-
|
363
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
340
364
|
|
341
365
|
int ext_type;
|
342
366
|
VALUE proc;
|
@@ -373,7 +397,7 @@ static VALUE Unpacker_register_type(int argc, VALUE* argv, VALUE self)
|
|
373
397
|
|
374
398
|
static VALUE Unpacker_full_unpack(VALUE self)
|
375
399
|
{
|
376
|
-
|
400
|
+
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
377
401
|
|
378
402
|
int r = msgpack_unpacker_read(uk, 0);
|
379
403
|
if(r < 0) {
|
@@ -442,11 +466,5 @@ void MessagePack_Unpacker_module_init(VALUE mMessagePack)
|
|
442
466
|
rb_define_private_method(cMessagePack_Unpacker, "registered_types_internal", Unpacker_registered_types_internal, 0);
|
443
467
|
rb_define_method(cMessagePack_Unpacker, "register_type", Unpacker_register_type, -1);
|
444
468
|
|
445
|
-
//s_unpacker_value = MessagePack_Unpacker_alloc(cMessagePack_Unpacker);
|
446
|
-
//rb_gc_register_address(&s_unpacker_value);
|
447
|
-
//Data_Get_Struct(s_unpacker_value, msgpack_unpacker_t, s_unpacker);
|
448
|
-
/* prefer reference than copying */
|
449
|
-
//msgpack_buffer_set_write_reference_threshold(UNPACKER_BUFFER_(s_unpacker), 0);
|
450
|
-
|
451
469
|
rb_define_method(cMessagePack_Unpacker, "full_unpack", Unpacker_full_unpack, 0);
|
452
470
|
}
|
@@ -20,6 +20,17 @@
|
|
20
20
|
|
21
21
|
#include "unpacker.h"
|
22
22
|
|
23
|
+
extern const rb_data_type_t unpacker_data_type;
|
24
|
+
|
25
|
+
static inline msgpack_unpacker_t *MessagePack_Unpacker_get(VALUE object) {
|
26
|
+
msgpack_unpacker_t *unpacker;
|
27
|
+
TypedData_Get_Struct(object, msgpack_unpacker_t, &unpacker_data_type, unpacker);
|
28
|
+
if (!unpacker) {
|
29
|
+
rb_raise(rb_eArgError, "Uninitialized Unpacker object");
|
30
|
+
}
|
31
|
+
return unpacker;
|
32
|
+
}
|
33
|
+
|
23
34
|
extern VALUE cMessagePack_Unpacker;
|
24
35
|
|
25
36
|
void MessagePack_Unpacker_module_init(VALUE mMessagePack);
|
@@ -21,14 +21,14 @@
|
|
21
21
|
static ID s_call;
|
22
22
|
static ID s_dup;
|
23
23
|
|
24
|
-
void msgpack_unpacker_ext_registry_static_init()
|
24
|
+
void msgpack_unpacker_ext_registry_static_init(void)
|
25
25
|
{
|
26
26
|
s_call = rb_intern("call");
|
27
27
|
s_dup = rb_intern("dup");
|
28
28
|
}
|
29
29
|
|
30
30
|
|
31
|
-
void msgpack_unpacker_ext_registry_static_destroy()
|
31
|
+
void msgpack_unpacker_ext_registry_static_destroy(void)
|
32
32
|
{ }
|
33
33
|
|
34
34
|
void msgpack_unpacker_ext_registry_mark(msgpack_unpacker_ext_registry_t* ukrg)
|
@@ -31,9 +31,9 @@ struct msgpack_unpacker_ext_registry_t {
|
|
31
31
|
VALUE array[256];
|
32
32
|
};
|
33
33
|
|
34
|
-
void msgpack_unpacker_ext_registry_static_init();
|
34
|
+
void msgpack_unpacker_ext_registry_static_init(void);
|
35
35
|
|
36
|
-
void msgpack_unpacker_ext_registry_static_destroy();
|
36
|
+
void msgpack_unpacker_ext_registry_static_destroy(void);
|
37
37
|
|
38
38
|
void msgpack_unpacker_ext_registry_release(msgpack_unpacker_ext_registry_t* ukrg);
|
39
39
|
|
data/lib/msgpack/packer.rb
CHANGED
data/lib/msgpack/unpacker.rb
CHANGED
data/lib/msgpack/version.rb
CHANGED
data/lib/msgpack.rb
CHANGED
data/msgpack.gemspec
CHANGED
@@ -12,10 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = "http://msgpack.org/"
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
if /java/ =~ RUBY_PLATFORM
|
15
|
-
s.files = Dir['lib/**/*.rb', 'lib/**/*.jar']
|
15
|
+
s.files = Dir['lib/**/*.rb', 'lib/**/*.jar', 'LICENSE']
|
16
16
|
s.platform = Gem::Platform.new('java')
|
17
17
|
else
|
18
|
-
s.files = `git ls-files`.split("\
|
18
|
+
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|bench|doclib|msgpack.org.md|Gemfile|Rakefile)|\.(?:git|circleci|rubocop)|appveyor)})
|
20
|
+
end
|
19
21
|
s.extensions = ["ext/msgpack/extconf.rb"]
|
20
22
|
end
|
21
23
|
|
@@ -25,6 +27,7 @@ Gem::Specification.new do |s|
|
|
25
27
|
s.add_development_dependency 'rake'
|
26
28
|
s.add_development_dependency 'rake-compiler', ['>= 1.1.9']
|
27
29
|
s.add_development_dependency 'rspec', ['~> 3.3']
|
30
|
+
s.add_development_dependency 'ruby_memcheck'
|
28
31
|
s.add_development_dependency 'yard'
|
29
32
|
s.add_development_dependency 'json'
|
30
33
|
s.add_development_dependency 'benchmark-ips', ['~> 2.10.0']
|
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.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
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:
|
13
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '3.3'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: ruby_memcheck
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
71
85
|
- !ruby/object:Gem::Dependency
|
72
86
|
name: yard
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,26 +136,9 @@ extensions:
|
|
122
136
|
- ext/msgpack/extconf.rb
|
123
137
|
extra_rdoc_files: []
|
124
138
|
files:
|
125
|
-
- ".github/workflows/ci.yaml"
|
126
|
-
- ".gitignore"
|
127
|
-
- ".rubocop.yml"
|
128
139
|
- ChangeLog
|
129
|
-
- Gemfile
|
130
140
|
- LICENSE
|
131
141
|
- README.md
|
132
|
-
- Rakefile
|
133
|
-
- appveyor.yml
|
134
|
-
- bench/bench.rb
|
135
|
-
- doclib/msgpack.rb
|
136
|
-
- doclib/msgpack/buffer.rb
|
137
|
-
- doclib/msgpack/core_ext.rb
|
138
|
-
- doclib/msgpack/error.rb
|
139
|
-
- doclib/msgpack/extension_value.rb
|
140
|
-
- doclib/msgpack/factory.rb
|
141
|
-
- doclib/msgpack/packer.rb
|
142
|
-
- doclib/msgpack/time.rb
|
143
|
-
- doclib/msgpack/timestamp.rb
|
144
|
-
- doclib/msgpack/unpacker.rb
|
145
142
|
- ext/java/org/msgpack/jruby/Buffer.java
|
146
143
|
- ext/java/org/msgpack/jruby/Decoder.java
|
147
144
|
- ext/java/org/msgpack/jruby/Encoder.java
|
@@ -182,6 +179,7 @@ files:
|
|
182
179
|
- ext/msgpack/unpacker_ext_registry.h
|
183
180
|
- lib/msgpack.rb
|
184
181
|
- lib/msgpack/bigint.rb
|
182
|
+
- lib/msgpack/buffer.rb
|
185
183
|
- lib/msgpack/core_ext.rb
|
186
184
|
- lib/msgpack/factory.rb
|
187
185
|
- lib/msgpack/packer.rb
|
@@ -191,32 +189,6 @@ files:
|
|
191
189
|
- lib/msgpack/unpacker.rb
|
192
190
|
- lib/msgpack/version.rb
|
193
191
|
- msgpack.gemspec
|
194
|
-
- msgpack.org.md
|
195
|
-
- spec/bigint_spec.rb
|
196
|
-
- spec/cases.json
|
197
|
-
- spec/cases.msg
|
198
|
-
- spec/cases_compact.msg
|
199
|
-
- spec/cases_spec.rb
|
200
|
-
- spec/cruby/buffer_io_spec.rb
|
201
|
-
- spec/cruby/buffer_packer.rb
|
202
|
-
- spec/cruby/buffer_spec.rb
|
203
|
-
- spec/cruby/buffer_unpacker.rb
|
204
|
-
- spec/cruby/unpacker_spec.rb
|
205
|
-
- spec/ext_value_spec.rb
|
206
|
-
- spec/exttypes.rb
|
207
|
-
- spec/factory_spec.rb
|
208
|
-
- spec/format_spec.rb
|
209
|
-
- spec/jruby/benchmarks/shootout_bm.rb
|
210
|
-
- spec/jruby/benchmarks/symbolize_keys_bm.rb
|
211
|
-
- spec/jruby/unpacker_spec.rb
|
212
|
-
- spec/msgpack_spec.rb
|
213
|
-
- spec/pack_spec.rb
|
214
|
-
- spec/packer_spec.rb
|
215
|
-
- spec/random_compat.rb
|
216
|
-
- spec/spec_helper.rb
|
217
|
-
- spec/timestamp_spec.rb
|
218
|
-
- spec/unpack_spec.rb
|
219
|
-
- spec/unpacker_spec.rb
|
220
192
|
homepage: http://msgpack.org/
|
221
193
|
licenses:
|
222
194
|
- Apache 2.0
|
@@ -236,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
208
|
- !ruby/object:Gem::Version
|
237
209
|
version: '0'
|
238
210
|
requirements: []
|
239
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.4.6
|
240
212
|
signing_key:
|
241
213
|
specification_version: 4
|
242
214
|
summary: MessagePack, a binary-based efficient data interchange format.
|
data/.github/workflows/ci.yaml
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
name: ci
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches: '*'
|
6
|
-
push:
|
7
|
-
branches:
|
8
|
-
- master
|
9
|
-
- main
|
10
|
-
- 'release-*'
|
11
|
-
|
12
|
-
jobs:
|
13
|
-
mri:
|
14
|
-
strategy:
|
15
|
-
fail-fast: false
|
16
|
-
matrix:
|
17
|
-
os: [ubuntu, macos, windows]
|
18
|
-
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1']
|
19
|
-
runs-on: ${{ matrix.os }}-latest
|
20
|
-
steps:
|
21
|
-
- uses: actions/checkout@v2
|
22
|
-
- uses: ruby/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
bundler-cache: true # 'bundle install' and cache
|
26
|
-
- run: bundle exec rake
|
27
|
-
|
28
|
-
other:
|
29
|
-
strategy:
|
30
|
-
fail-fast: false
|
31
|
-
matrix:
|
32
|
-
os: [ubuntu]
|
33
|
-
ruby: ['jruby-9.2.19.0', 'jruby-9.3.3.0', 'truffleruby']
|
34
|
-
runs-on: ${{ matrix.os }}-latest
|
35
|
-
steps:
|
36
|
-
- uses: actions/checkout@v2
|
37
|
-
- uses: ruby/setup-ruby@v1
|
38
|
-
with:
|
39
|
-
ruby-version: ${{ matrix.ruby }}
|
40
|
-
bundler-cache: true # 'bundle install' and cache
|
41
|
-
- run: bundle exec rake spec
|
42
|
-
|
43
|
-
head-versions:
|
44
|
-
continue-on-error: true
|
45
|
-
strategy:
|
46
|
-
fail-fast: false
|
47
|
-
matrix:
|
48
|
-
os: [ubuntu]
|
49
|
-
ruby: ['ruby-head', 'jruby-head']
|
50
|
-
runs-on: ${{ matrix.os }}-latest
|
51
|
-
steps:
|
52
|
-
- uses: actions/checkout@v2
|
53
|
-
- uses: ruby/setup-ruby@v1
|
54
|
-
with:
|
55
|
-
ruby-version: ${{ matrix.ruby }}
|
56
|
-
bundler-cache: true # 'bundle install' and cache
|
57
|
-
- run: bundle exec rake spec || echo "failed, but ignore it"
|
data/.gitignore
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
*.o
|
2
|
-
*.so
|
3
|
-
*.bundle
|
4
|
-
*.gem
|
5
|
-
*.class
|
6
|
-
*.jar
|
7
|
-
doc
|
8
|
-
.yardoc
|
9
|
-
.bundle
|
10
|
-
Gemfile*
|
11
|
-
pkg
|
12
|
-
test/debug.log
|
13
|
-
*~
|
14
|
-
*.swp
|
15
|
-
/rdoc
|
16
|
-
tmp
|
17
|
-
.classpath
|
18
|
-
.project
|
19
|
-
.settings
|
20
|
-
/nbproject/private/
|
21
|
-
coverage/
|
22
|
-
.idea/
|
23
|
-
.ruby-version
|
data/.rubocop.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-03-09 17:42:55 +0100 using RuboCop version 0.29.1.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
AllCops:
|
9
|
-
TargetRubyVersion: 2.4
|
10
|
-
|
11
|
-
# Offense count: 3
|
12
|
-
Lint/AmbiguousOperator:
|
13
|
-
Enabled: false
|
14
|
-
|
15
|
-
# Offense count: 1
|
16
|
-
# Configuration parameters: AllowSafeAssignment.
|
17
|
-
Lint/AssignmentInCondition:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
# Offense count: 1
|
21
|
-
Security/Eval:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# Offense count: 3
|
25
|
-
# Cop supports --auto-correct.
|
26
|
-
Lint/UnusedBlockArgument:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
# Offense count: 35
|
30
|
-
# Cop supports --auto-correct.
|
31
|
-
Lint/UnusedMethodArgument:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
# Offense count: 128
|
35
|
-
Lint/Void:
|
36
|
-
Enabled: false
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'bundler'
|
3
|
-
Bundler::GemHelper.install_tasks
|
4
|
-
|
5
|
-
require 'fileutils'
|
6
|
-
|
7
|
-
require 'rspec/core'
|
8
|
-
require 'rspec/core/rake_task'
|
9
|
-
require 'yard'
|
10
|
-
|
11
|
-
task :spec => :compile
|
12
|
-
|
13
|
-
desc 'Run RSpec code examples and measure coverage'
|
14
|
-
task :coverage do |t|
|
15
|
-
ENV['SIMPLE_COV'] = '1'
|
16
|
-
Rake::Task["spec"].invoke
|
17
|
-
end
|
18
|
-
|
19
|
-
desc 'Generate YARD document'
|
20
|
-
YARD::Rake::YardocTask.new(:doc) do |t|
|
21
|
-
t.files = ['lib/msgpack/version.rb','doclib/**/*.rb']
|
22
|
-
t.options = []
|
23
|
-
t.options << '--debug' << '--verbose' if $trace
|
24
|
-
end
|
25
|
-
|
26
|
-
spec = eval File.read("msgpack.gemspec")
|
27
|
-
|
28
|
-
if RUBY_PLATFORM =~ /java/
|
29
|
-
require 'rake/javaextensiontask'
|
30
|
-
|
31
|
-
Rake::JavaExtensionTask.new('msgpack', spec) do |ext|
|
32
|
-
ext.ext_dir = 'ext/java'
|
33
|
-
jruby_home = RbConfig::CONFIG['prefix']
|
34
|
-
jars = ["#{jruby_home}/lib/jruby.jar"]
|
35
|
-
ext.classpath = jars.map { |x| File.expand_path(x) }.join(':')
|
36
|
-
ext.lib_dir = File.join(*['lib', 'msgpack', ENV['FAT_DIR']].compact)
|
37
|
-
ext.release = '8'
|
38
|
-
end
|
39
|
-
else
|
40
|
-
require 'rake/extensiontask'
|
41
|
-
|
42
|
-
Rake::ExtensionTask.new('msgpack', spec) do |ext|
|
43
|
-
ext.ext_dir = 'ext/msgpack'
|
44
|
-
ext.cross_compile = true
|
45
|
-
ext.lib_dir = File.join(*['lib', 'msgpack', ENV['FAT_DIR']].compact)
|
46
|
-
# cross_platform names are of MRI's platform name
|
47
|
-
ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
test_pattern = case
|
52
|
-
when RUBY_PLATFORM =~ /java/ then 'spec/{,jruby/}*_spec.rb'
|
53
|
-
when RUBY_ENGINE =~ /rbx/ then 'spec/*_spec.rb'
|
54
|
-
else 'spec/{,cruby/}*_spec.rb' # MRI
|
55
|
-
end
|
56
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
57
|
-
t.rspec_opts = ["-c", "-f progress"]
|
58
|
-
t.rspec_opts << "-Ilib"
|
59
|
-
t.pattern = test_pattern
|
60
|
-
t.verbose = true
|
61
|
-
end
|
62
|
-
|
63
|
-
namespace :build do
|
64
|
-
desc 'Build gem for JRuby after cleaning'
|
65
|
-
task :java => [:clean, :spec, :build]
|
66
|
-
end
|
67
|
-
|
68
|
-
CLEAN.include('lib/msgpack/msgpack.*')
|
69
|
-
|
70
|
-
task :default => [:spec, :build, :doc]
|
data/appveyor.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
---
|
2
|
-
install:
|
3
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
4
|
-
- ruby --version
|
5
|
-
- gem --version
|
6
|
-
- bundle install
|
7
|
-
build: off
|
8
|
-
test_script:
|
9
|
-
- bundle exec rake -rdevkit
|
10
|
-
|
11
|
-
environment:
|
12
|
-
matrix:
|
13
|
-
- ruby_version: "200"
|
14
|
-
- ruby_version: "200-x64"
|
15
|
-
- ruby_version: "21"
|
16
|
-
- ruby_version: "21-x64"
|
17
|
-
- ruby_version: "22"
|
18
|
-
- ruby_version: "22-x64"
|