msgpack 1.6.0 → 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 +6 -0
- data/ext/java/org/msgpack/jruby/ExtensionRegistry.java +4 -9
- data/ext/msgpack/buffer_class.c +4 -4
- data/ext/msgpack/extconf.rb +3 -1
- data/ext/msgpack/packer.c +1 -0
- data/ext/msgpack/packer_class.c +5 -19
- data/ext/msgpack/rbinit.c +1 -1
- data/ext/msgpack/unpacker.c +1 -0
- data/ext/msgpack/unpacker_class.c +5 -7
- 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 -47
- 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/bin/console +0 -8
- 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 -592
- 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 -706
- 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 -72
- data/spec/timestamp_spec.rb +0 -159
- data/spec/unpack_spec.rb +0 -57
- data/spec/unpacker_spec.rb +0 -869
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3e9d5536bdf4c127f51b0c7837af3a3e076003f903aae018ba1332d1eecaa8e
|
4
|
+
data.tar.gz: c1f76401693a317b69bf37f8418e91f5a67dd77e74bd71668d321e0069b9ce7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d189bec1b83c1e9252acaa82c3830728575a8222db0fe33fe3c1aa940734d4ee2c8a1991f2c38cef14ceccdde005ae4111df4884a8b43e4f0737e254ea719d
|
7
|
+
data.tar.gz: 52a5080b4ec7e62309e60ce4a29d8daaf1e39c2b03c87e310236afe053d31c8f878f304eb029b10d89393af0c7646873b0745f51cb6fa88e1f5e421aaa64e7c5
|
data/ChangeLog
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
2023-03-03 1.6.1:
|
2
|
+
|
3
|
+
* Undefine `#clone` and `#dup` on `MessagePack::Buffer`, `MessagePack::Packer` and `MessagePack::Unpacker`.
|
4
|
+
These methods were never intended, and using them could cause leaks or crashes or worse.
|
5
|
+
* Fix a possible GC crash when GC trigger inside `MessagePack::Buffer.new` (#314).
|
6
|
+
|
1
7
|
2022-09-30 1.6.0:
|
2
8
|
|
3
9
|
* Fix a potential use-after-free bug in Buffer_free when accessing a packer or unpacker buffer.
|
@@ -18,22 +18,17 @@ public class ExtensionRegistry {
|
|
18
18
|
private final ExtensionEntry[] extensionsByTypeId;
|
19
19
|
|
20
20
|
public ExtensionRegistry() {
|
21
|
-
this(new HashMap<RubyModule, ExtensionEntry>());
|
21
|
+
this(new HashMap<RubyModule, ExtensionEntry>(), new ExtensionEntry[256]);
|
22
22
|
}
|
23
23
|
|
24
|
-
private ExtensionRegistry(Map<RubyModule, ExtensionEntry> extensionsByModule) {
|
24
|
+
private ExtensionRegistry(Map<RubyModule, ExtensionEntry> extensionsByModule, ExtensionEntry[] extensionsByTypeId) {
|
25
25
|
this.extensionsByModule = new HashMap<RubyModule, ExtensionEntry>(extensionsByModule);
|
26
26
|
this.extensionsByAncestor = new HashMap<RubyModule, ExtensionEntry>();
|
27
|
-
this.extensionsByTypeId =
|
28
|
-
for (ExtensionEntry entry : extensionsByModule.values()) {
|
29
|
-
if (entry.hasUnpacker()) {
|
30
|
-
extensionsByTypeId[entry.getTypeId() + 128] = entry;
|
31
|
-
}
|
32
|
-
}
|
27
|
+
this.extensionsByTypeId = extensionsByTypeId.clone();
|
33
28
|
}
|
34
29
|
|
35
30
|
public ExtensionRegistry dup() {
|
36
|
-
return new ExtensionRegistry(extensionsByModule);
|
31
|
+
return new ExtensionRegistry(extensionsByModule, extensionsByTypeId);
|
37
32
|
}
|
38
33
|
|
39
34
|
public IRubyObject toInternalPackerRegistry(ThreadContext ctx) {
|
data/ext/msgpack/buffer_class.c
CHANGED
@@ -56,7 +56,7 @@ static size_t Buffer_memsize(const void *data)
|
|
56
56
|
return sizeof(msgpack_buffer_t) + msgpack_buffer_memsize(data);
|
57
57
|
}
|
58
58
|
|
59
|
-
const rb_data_type_t buffer_data_type = {
|
59
|
+
static const rb_data_type_t buffer_data_type = {
|
60
60
|
.wrap_struct_name = "msgpack:buffer",
|
61
61
|
.function = {
|
62
62
|
.dmark = msgpack_buffer_mark,
|
@@ -66,10 +66,10 @@ const rb_data_type_t buffer_data_type = {
|
|
66
66
|
.flags = RUBY_TYPED_FREE_IMMEDIATELY
|
67
67
|
};
|
68
68
|
|
69
|
-
const rb_data_type_t buffer_view_data_type = {
|
69
|
+
static const rb_data_type_t buffer_view_data_type = {
|
70
70
|
.wrap_struct_name = "msgpack:buffer_view",
|
71
71
|
.function = {
|
72
|
-
.dmark =
|
72
|
+
.dmark = NULL,
|
73
73
|
.dfree = NULL,
|
74
74
|
.dsize = NULL,
|
75
75
|
},
|
@@ -91,8 +91,8 @@ static VALUE Buffer_alloc(VALUE klass)
|
|
91
91
|
{
|
92
92
|
msgpack_buffer_t* b;
|
93
93
|
VALUE buffer = TypedData_Make_Struct(klass, msgpack_buffer_t, &buffer_data_type, b);
|
94
|
-
rb_ivar_set(buffer, s_at_owner, Qnil);
|
95
94
|
msgpack_buffer_init(b);
|
95
|
+
rb_ivar_set(buffer, s_at_owner, Qnil);
|
96
96
|
return buffer;
|
97
97
|
}
|
98
98
|
|
data/ext/msgpack/extconf.rb
CHANGED
@@ -5,11 +5,13 @@ have_header("st.h")
|
|
5
5
|
have_func("rb_enc_interned_str", "ruby.h") # Ruby 3.0+
|
6
6
|
have_func("rb_hash_new_capa", "ruby.h") # Ruby 3.2+
|
7
7
|
|
8
|
+
$CFLAGS << " -fvisibility=hidden "
|
9
|
+
|
8
10
|
unless RUBY_PLATFORM.include? 'mswin'
|
9
11
|
$CFLAGS << %[ -I.. -Wall -O3 #{RbConfig::CONFIG["debugflags"]} -std=gnu99]
|
10
12
|
end
|
11
13
|
|
12
|
-
if RUBY_VERSION.start_with?('3.0.')
|
14
|
+
if RUBY_VERSION.start_with?('3.0.') && RUBY_VERSION <= '3.0.5'
|
13
15
|
# https://bugs.ruby-lang.org/issues/18772
|
14
16
|
$CFLAGS << ' -DRB_ENC_INTERNED_STR_NULL_CHECK=1 '
|
15
17
|
end
|
data/ext/msgpack/packer.c
CHANGED
data/ext/msgpack/packer_class.c
CHANGED
@@ -47,6 +47,7 @@ static void Packer_free(void *ptr)
|
|
47
47
|
static void Packer_mark(void *ptr)
|
48
48
|
{
|
49
49
|
msgpack_packer_t* pk = ptr;
|
50
|
+
msgpack_buffer_mark(pk);
|
50
51
|
msgpack_packer_mark(pk);
|
51
52
|
msgpack_packer_ext_registry_mark(&pk->ext_registry);
|
52
53
|
}
|
@@ -106,7 +107,7 @@ VALUE MessagePack_Packer_initialize(int argc, VALUE* argv, VALUE self)
|
|
106
107
|
msgpack_packer_t *pk = MessagePack_Packer_get(self);
|
107
108
|
|
108
109
|
msgpack_packer_ext_registry_init(&pk->ext_registry);
|
109
|
-
pk->buffer_ref =
|
110
|
+
pk->buffer_ref = Qnil;
|
110
111
|
|
111
112
|
MessagePack_Buffer_set_options(PACKER_BUFFER_(pk), io, options);
|
112
113
|
|
@@ -129,6 +130,9 @@ static VALUE Packer_compatibility_mode_p(VALUE self)
|
|
129
130
|
static VALUE Packer_buffer(VALUE self)
|
130
131
|
{
|
131
132
|
msgpack_packer_t *pk = MessagePack_Packer_get(self);
|
133
|
+
if (!RTEST(pk->buffer_ref)) {
|
134
|
+
pk->buffer_ref = MessagePack_Buffer_wrap(PACKER_BUFFER_(pk), self);
|
135
|
+
}
|
132
136
|
return pk->buffer_ref;
|
133
137
|
}
|
134
138
|
|
@@ -334,18 +338,6 @@ static VALUE Packer_write_to(VALUE self, VALUE io)
|
|
334
338
|
return SIZET2NUM(sz);
|
335
339
|
}
|
336
340
|
|
337
|
-
//static VALUE Packer_append(VALUE self, VALUE string_or_buffer)
|
338
|
-
//{
|
339
|
-
// msgpack_packer_t *pk = MessagePack_Packer_get(self);
|
340
|
-
//
|
341
|
-
// // TODO if string_or_buffer is a Buffer
|
342
|
-
// VALUE string = string_or_buffer;
|
343
|
-
//
|
344
|
-
// msgpack_buffer_append_string(PACKER_BUFFER_(pk), string);
|
345
|
-
//
|
346
|
-
// return self;
|
347
|
-
//}
|
348
|
-
|
349
341
|
static VALUE Packer_registered_types_internal(VALUE self)
|
350
342
|
{
|
351
343
|
msgpack_packer_t *pk = MessagePack_Packer_get(self);
|
@@ -463,15 +455,9 @@ void MessagePack_Packer_module_init(VALUE mMessagePack)
|
|
463
455
|
rb_define_method(cMessagePack_Packer, "to_str", Packer_to_str, 0);
|
464
456
|
rb_define_alias(cMessagePack_Packer, "to_s", "to_str");
|
465
457
|
rb_define_method(cMessagePack_Packer, "to_a", Packer_to_a, 0);
|
466
|
-
//rb_define_method(cMessagePack_Packer, "append", Packer_append, 1);
|
467
|
-
//rb_define_alias(cMessagePack_Packer, "<<", "append");
|
468
458
|
|
469
459
|
rb_define_private_method(cMessagePack_Packer, "registered_types_internal", Packer_registered_types_internal, 0);
|
470
460
|
rb_define_method(cMessagePack_Packer, "register_type", Packer_register_type, -1);
|
471
461
|
|
472
|
-
//s_packer_value = MessagePack_Packer_alloc(cMessagePack_Packer);
|
473
|
-
//rb_gc_register_address(&s_packer_value);
|
474
|
-
//Data_Get_Struct(s_packer_value, msgpack_packer_t, s_packer);
|
475
|
-
|
476
462
|
rb_define_method(cMessagePack_Packer, "full_pack", Packer_full_pack, 0);
|
477
463
|
}
|
data/ext/msgpack/rbinit.c
CHANGED
data/ext/msgpack/unpacker.c
CHANGED
@@ -120,6 +120,7 @@ void msgpack_unpacker_mark(msgpack_unpacker_t* uk)
|
|
120
120
|
/* See MessagePack_Buffer_wrap */
|
121
121
|
/* msgpack_buffer_mark(UNPACKER_BUFFER_(uk)); */
|
122
122
|
rb_gc_mark(uk->buffer_ref);
|
123
|
+
rb_gc_mark(uk->self);
|
123
124
|
}
|
124
125
|
|
125
126
|
void _msgpack_unpacker_reset(msgpack_unpacker_t* uk)
|
@@ -51,6 +51,7 @@ static void Unpacker_free(void *ptr)
|
|
51
51
|
static void Unpacker_mark(void *ptr)
|
52
52
|
{
|
53
53
|
msgpack_unpacker_t* uk = ptr;
|
54
|
+
msgpack_buffer_mark(uk);
|
54
55
|
msgpack_unpacker_mark(uk);
|
55
56
|
msgpack_unpacker_ext_registry_mark(uk->ext_registry);
|
56
57
|
}
|
@@ -117,7 +118,7 @@ VALUE MessagePack_Unpacker_initialize(int argc, VALUE* argv, VALUE self)
|
|
117
118
|
|
118
119
|
msgpack_unpacker_t *uk = MessagePack_Unpacker_get(self);
|
119
120
|
|
120
|
-
uk->buffer_ref =
|
121
|
+
uk->buffer_ref = Qnil;
|
121
122
|
|
122
123
|
MessagePack_Buffer_set_options(UNPACKER_BUFFER_(uk), io, options);
|
123
124
|
|
@@ -177,6 +178,9 @@ NORETURN(static void raise_unpacker_error(int r))
|
|
177
178
|
static VALUE Unpacker_buffer(VALUE self)
|
178
179
|
{
|
179
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
|
+
}
|
180
184
|
return uk->buffer_ref;
|
181
185
|
}
|
182
186
|
|
@@ -462,11 +466,5 @@ void MessagePack_Unpacker_module_init(VALUE mMessagePack)
|
|
462
466
|
rb_define_private_method(cMessagePack_Unpacker, "registered_types_internal", Unpacker_registered_types_internal, 0);
|
463
467
|
rb_define_method(cMessagePack_Unpacker, "register_type", Unpacker_register_type, -1);
|
464
468
|
|
465
|
-
//s_unpacker_value = MessagePack_Unpacker_alloc(cMessagePack_Unpacker);
|
466
|
-
//rb_gc_register_address(&s_unpacker_value);
|
467
|
-
//Data_Get_Struct(s_unpacker_value, msgpack_unpacker_t, s_unpacker);
|
468
|
-
/* prefer reference than copying */
|
469
|
-
//msgpack_buffer_set_write_reference_threshold(UNPACKER_BUFFER_(s_unpacker), 0);
|
470
|
-
|
471
469
|
rb_define_method(cMessagePack_Unpacker, "full_unpack", Unpacker_full_unpack, 0);
|
472
470
|
}
|
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.6.
|
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,27 +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
|
-
- bin/console
|
136
|
-
- doclib/msgpack.rb
|
137
|
-
- doclib/msgpack/buffer.rb
|
138
|
-
- doclib/msgpack/core_ext.rb
|
139
|
-
- doclib/msgpack/error.rb
|
140
|
-
- doclib/msgpack/extension_value.rb
|
141
|
-
- doclib/msgpack/factory.rb
|
142
|
-
- doclib/msgpack/packer.rb
|
143
|
-
- doclib/msgpack/time.rb
|
144
|
-
- doclib/msgpack/timestamp.rb
|
145
|
-
- doclib/msgpack/unpacker.rb
|
146
142
|
- ext/java/org/msgpack/jruby/Buffer.java
|
147
143
|
- ext/java/org/msgpack/jruby/Decoder.java
|
148
144
|
- ext/java/org/msgpack/jruby/Encoder.java
|
@@ -183,6 +179,7 @@ files:
|
|
183
179
|
- ext/msgpack/unpacker_ext_registry.h
|
184
180
|
- lib/msgpack.rb
|
185
181
|
- lib/msgpack/bigint.rb
|
182
|
+
- lib/msgpack/buffer.rb
|
186
183
|
- lib/msgpack/core_ext.rb
|
187
184
|
- lib/msgpack/factory.rb
|
188
185
|
- lib/msgpack/packer.rb
|
@@ -192,32 +189,6 @@ files:
|
|
192
189
|
- lib/msgpack/unpacker.rb
|
193
190
|
- lib/msgpack/version.rb
|
194
191
|
- msgpack.gemspec
|
195
|
-
- msgpack.org.md
|
196
|
-
- spec/bigint_spec.rb
|
197
|
-
- spec/cases.json
|
198
|
-
- spec/cases.msg
|
199
|
-
- spec/cases_compact.msg
|
200
|
-
- spec/cases_spec.rb
|
201
|
-
- spec/cruby/buffer_io_spec.rb
|
202
|
-
- spec/cruby/buffer_packer.rb
|
203
|
-
- spec/cruby/buffer_spec.rb
|
204
|
-
- spec/cruby/buffer_unpacker.rb
|
205
|
-
- spec/cruby/unpacker_spec.rb
|
206
|
-
- spec/ext_value_spec.rb
|
207
|
-
- spec/exttypes.rb
|
208
|
-
- spec/factory_spec.rb
|
209
|
-
- spec/format_spec.rb
|
210
|
-
- spec/jruby/benchmarks/shootout_bm.rb
|
211
|
-
- spec/jruby/benchmarks/symbolize_keys_bm.rb
|
212
|
-
- spec/jruby/unpacker_spec.rb
|
213
|
-
- spec/msgpack_spec.rb
|
214
|
-
- spec/pack_spec.rb
|
215
|
-
- spec/packer_spec.rb
|
216
|
-
- spec/random_compat.rb
|
217
|
-
- spec/spec_helper.rb
|
218
|
-
- spec/timestamp_spec.rb
|
219
|
-
- spec/unpack_spec.rb
|
220
|
-
- spec/unpacker_spec.rb
|
221
192
|
homepage: http://msgpack.org/
|
222
193
|
licenses:
|
223
194
|
- Apache 2.0
|
@@ -237,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
208
|
- !ruby/object:Gem::Version
|
238
209
|
version: '0'
|
239
210
|
requirements: []
|
240
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.4.6
|
241
212
|
signing_key:
|
242
213
|
specification_version: 4
|
243
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"
|