msgpack 1.4.2 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +85 -0
  3. data/README.md +52 -1
  4. data/ext/java/org/msgpack/jruby/Buffer.java +26 -19
  5. data/ext/java/org/msgpack/jruby/Decoder.java +29 -21
  6. data/ext/java/org/msgpack/jruby/Encoder.java +68 -30
  7. data/ext/java/org/msgpack/jruby/ExtensionRegistry.java +43 -64
  8. data/ext/java/org/msgpack/jruby/ExtensionValue.java +6 -9
  9. data/ext/java/org/msgpack/jruby/Factory.java +43 -42
  10. data/ext/java/org/msgpack/jruby/Packer.java +37 -40
  11. data/ext/java/org/msgpack/jruby/Unpacker.java +80 -73
  12. data/ext/msgpack/buffer.c +54 -74
  13. data/ext/msgpack/buffer.h +21 -18
  14. data/ext/msgpack/buffer_class.c +161 -52
  15. data/ext/msgpack/buffer_class.h +1 -0
  16. data/ext/msgpack/compat.h +0 -99
  17. data/ext/msgpack/extconf.rb +25 -46
  18. data/ext/msgpack/factory_class.c +143 -87
  19. data/ext/msgpack/packer.c +66 -43
  20. data/ext/msgpack/packer.h +25 -20
  21. data/ext/msgpack/packer_class.c +102 -130
  22. data/ext/msgpack/packer_class.h +11 -0
  23. data/ext/msgpack/packer_ext_registry.c +35 -40
  24. data/ext/msgpack/packer_ext_registry.h +41 -38
  25. data/ext/msgpack/rbinit.c +1 -1
  26. data/ext/msgpack/rmem.c +3 -4
  27. data/ext/msgpack/sysdep.h +5 -2
  28. data/ext/msgpack/unpacker.c +126 -108
  29. data/ext/msgpack/unpacker.h +16 -13
  30. data/ext/msgpack/unpacker_class.c +86 -126
  31. data/ext/msgpack/unpacker_class.h +11 -0
  32. data/ext/msgpack/unpacker_ext_registry.c +40 -28
  33. data/ext/msgpack/unpacker_ext_registry.h +21 -18
  34. data/lib/msgpack/bigint.rb +69 -0
  35. data/lib/msgpack/buffer.rb +9 -0
  36. data/lib/msgpack/factory.rb +140 -10
  37. data/lib/msgpack/packer.rb +10 -1
  38. data/lib/msgpack/symbol.rb +21 -4
  39. data/lib/msgpack/time.rb +1 -1
  40. data/lib/msgpack/unpacker.rb +14 -1
  41. data/lib/msgpack/version.rb +1 -1
  42. data/lib/msgpack.rb +6 -7
  43. data/msgpack.gemspec +8 -5
  44. metadata +37 -82
  45. data/.gitignore +0 -23
  46. data/.rubocop.yml +0 -36
  47. data/.travis.yml +0 -39
  48. data/Gemfile +0 -9
  49. data/Rakefile +0 -71
  50. data/appveyor.yml +0 -18
  51. data/bench/pack.rb +0 -23
  52. data/bench/pack_log.rb +0 -33
  53. data/bench/pack_log_long.rb +0 -65
  54. data/bench/pack_symbols.rb +0 -28
  55. data/bench/run.sh +0 -14
  56. data/bench/run_long.sh +0 -35
  57. data/bench/run_symbols.sh +0 -26
  58. data/bench/unpack.rb +0 -21
  59. data/bench/unpack_log.rb +0 -34
  60. data/bench/unpack_log_long.rb +0 -67
  61. data/doclib/msgpack/buffer.rb +0 -193
  62. data/doclib/msgpack/core_ext.rb +0 -101
  63. data/doclib/msgpack/error.rb +0 -19
  64. data/doclib/msgpack/extension_value.rb +0 -9
  65. data/doclib/msgpack/factory.rb +0 -101
  66. data/doclib/msgpack/packer.rb +0 -208
  67. data/doclib/msgpack/time.rb +0 -22
  68. data/doclib/msgpack/timestamp.rb +0 -44
  69. data/doclib/msgpack/unpacker.rb +0 -183
  70. data/doclib/msgpack.rb +0 -87
  71. data/msgpack.org.md +0 -46
  72. data/spec/cases.json +0 -1
  73. data/spec/cases.msg +0 -0
  74. data/spec/cases_compact.msg +0 -0
  75. data/spec/cases_spec.rb +0 -39
  76. data/spec/cruby/buffer_io_spec.rb +0 -255
  77. data/spec/cruby/buffer_packer.rb +0 -29
  78. data/spec/cruby/buffer_spec.rb +0 -575
  79. data/spec/cruby/buffer_unpacker.rb +0 -19
  80. data/spec/cruby/unpacker_spec.rb +0 -70
  81. data/spec/ext_value_spec.rb +0 -99
  82. data/spec/exttypes.rb +0 -51
  83. data/spec/factory_spec.rb +0 -367
  84. data/spec/format_spec.rb +0 -301
  85. data/spec/jruby/benchmarks/shootout_bm.rb +0 -73
  86. data/spec/jruby/benchmarks/symbolize_keys_bm.rb +0 -25
  87. data/spec/jruby/unpacker_spec.rb +0 -186
  88. data/spec/msgpack_spec.rb +0 -214
  89. data/spec/pack_spec.rb +0 -61
  90. data/spec/packer_spec.rb +0 -557
  91. data/spec/random_compat.rb +0 -24
  92. data/spec/spec_helper.rb +0 -55
  93. data/spec/timestamp_spec.rb +0 -121
  94. data/spec/unpack_spec.rb +0 -57
  95. data/spec/unpacker_spec.rb +0 -819
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MessagePack
4
+ module Bigint
5
+ # We split the bigint in 32bits chunks so that individual part fits into
6
+ # a MRI immediate Integer.
7
+ CHUNK_BITLENGTH = 32
8
+ FORMAT = 'CL>*'
9
+
10
+ if Integer.instance_method(:[]).arity != 1 # Ruby 2.7 and newer
11
+ # Starting from Ruby 2.7 we can address arbitrary bitranges inside an Integer with Integer#[]
12
+ # This allows to not allocate any Integer.
13
+ def self.to_msgpack_ext(bigint)
14
+ members = []
15
+
16
+ if bigint < 0
17
+ bigint = -bigint
18
+ members << 1
19
+ else
20
+ members << 0
21
+ end
22
+
23
+ offset = 0
24
+ length = bigint.bit_length
25
+ while offset < length
26
+ members << bigint[offset, CHUNK_BITLENGTH]
27
+ offset += CHUNK_BITLENGTH
28
+ end
29
+
30
+ members.pack(FORMAT)
31
+ end
32
+ else
33
+ # On 2.6 and older since we can't address arbitrary bitranges, so we fallback to shifting the bigint.
34
+ # This means that after each shift, we may allocate another Integer instance.
35
+ BASE = (2**CHUNK_BITLENGTH) - 1
36
+ def self.to_msgpack_ext(bigint)
37
+ members = []
38
+
39
+ if bigint < 0
40
+ bigint = -bigint
41
+ members << 1
42
+ else
43
+ members << 0
44
+ end
45
+
46
+ while bigint > 0
47
+ members << (bigint & BASE)
48
+ bigint = bigint >> CHUNK_BITLENGTH
49
+ end
50
+
51
+ members.pack(FORMAT)
52
+ end
53
+ end
54
+
55
+ def self.from_msgpack_ext(data)
56
+ parts = data.unpack(FORMAT)
57
+
58
+ sign = parts.shift
59
+ sum = parts.pop.to_i
60
+
61
+ parts.reverse_each do |part|
62
+ sum = sum << CHUNK_BITLENGTH
63
+ sum += part
64
+ end
65
+
66
+ sign == 0 ? sum : -sum
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,9 @@
1
+ module MessagePack
2
+ class Buffer
3
+ # see ext for other methods
4
+
5
+ # The semantic of duping a buffer is just too weird.
6
+ undef_method :dup
7
+ undef_method :clone
8
+ end
9
+ end
@@ -2,11 +2,46 @@ module MessagePack
2
2
  class Factory
3
3
  # see ext for other methods
4
4
 
5
+ def register_type(type, klass, options = { packer: :to_msgpack_ext, unpacker: :from_msgpack_ext })
6
+ raise FrozenError, "can't modify frozen MessagePack::Factory" if frozen?
7
+
8
+ if options
9
+ options = options.dup
10
+ case packer = options[:packer]
11
+ when nil, Proc
12
+ # all good
13
+ when String, Symbol
14
+ options[:packer] = packer.to_sym.to_proc
15
+ when Method
16
+ options[:packer] = packer.to_proc
17
+ when packer.respond_to?(:call)
18
+ options[:packer] = packer.method(:call).to_proc
19
+ else
20
+ raise ::TypeError, "expected :packer argument to be a callable object, got: #{packer.inspect}"
21
+ end
22
+
23
+ case unpacker = options[:unpacker]
24
+ when nil, Proc
25
+ # all good
26
+ when String, Symbol
27
+ options[:unpacker] = klass.method(unpacker).to_proc
28
+ when Method
29
+ options[:unpacker] = unpacker.to_proc
30
+ when packer.respond_to?(:call)
31
+ options[:unpacker] = unpacker.method(:call).to_proc
32
+ else
33
+ raise ::TypeError, "expected :unpacker argument to be a callable object, got: #{unpacker.inspect}"
34
+ end
35
+ end
36
+
37
+ register_type_internal(type, klass, options)
38
+ end
39
+
5
40
  # [ {type: id, class: Class(or nil), packer: arg, unpacker: arg}, ... ]
6
41
  def registered_types(selector=:both)
7
42
  packer, unpacker = registered_types_internal
8
- # packer: Class -> [tid, proc, arg]
9
- # unpacker: tid -> [klass, proc, arg]
43
+ # packer: Class -> [tid, proc, _flags]
44
+ # unpacker: tid -> [klass, proc, _flags]
10
45
 
11
46
  list = []
12
47
 
@@ -14,27 +49,31 @@ module MessagePack
14
49
  when :both
15
50
  packer.each_pair do |klass, ary|
16
51
  type = ary[0]
17
- packer_arg = ary[2]
18
- unpacker_arg = nil
19
- if unpacker.has_key?(type) && unpacker[type][0] == klass
20
- unpacker_arg = unpacker.delete(type)[2]
52
+ packer_proc = ary[1]
53
+ unpacker_proc = nil
54
+ if unpacker.has_key?(type)
55
+ unpacker_proc = unpacker.delete(type)[1]
21
56
  end
22
- list << {type: type, class: klass, packer: packer_arg, unpacker: unpacker_arg}
57
+ list << {type: type, class: klass, packer: packer_proc, unpacker: unpacker_proc}
23
58
  end
24
59
 
25
60
  # unpacker definition only
26
61
  unpacker.each_pair do |type, ary|
27
- list << {type: type, class: ary[0], packer: nil, unpacker: ary[2]}
62
+ list << {type: type, class: ary[0], packer: nil, unpacker: ary[1]}
28
63
  end
29
64
 
30
65
  when :packer
31
66
  packer.each_pair do |klass, ary|
32
- list << {type: ary[0], class: klass, packer: ary[2]}
67
+ if ary[1]
68
+ list << {type: ary[0], class: klass, packer: ary[1]}
69
+ end
33
70
  end
34
71
 
35
72
  when :unpacker
36
73
  unpacker.each_pair do |type, ary|
37
- list << {type: type, class: ary[0], unpacker: ary[2]}
74
+ if ary[1]
75
+ list << {type: type, class: ary[0], unpacker: ary[1]}
76
+ end
38
77
  end
39
78
 
40
79
  else
@@ -77,5 +116,96 @@ module MessagePack
77
116
  packer.full_pack
78
117
  end
79
118
  alias :pack :dump
119
+
120
+ def pool(size = 1, **options)
121
+ Pool.new(
122
+ frozen? ? self : dup.freeze,
123
+ size,
124
+ options.empty? ? nil : options,
125
+ )
126
+ end
127
+
128
+ class Pool
129
+ if RUBY_ENGINE == "ruby"
130
+ class MemberPool
131
+ def initialize(size, &block)
132
+ @size = size
133
+ @new_member = block
134
+ @members = []
135
+ end
136
+
137
+ def with
138
+ member = @members.pop || @new_member.call
139
+ begin
140
+ yield member
141
+ ensure
142
+ # If the pool is already full, we simply drop the extra member.
143
+ # This is because contrary to a connection pool, creating an extra instance
144
+ # is extremely unlikely to cause some kind of resource exhaustion.
145
+ #
146
+ # We could cycle the members (keep the newer one) but first It's more work and second
147
+ # the older member might have been created pre-fork, so it might be at least partially
148
+ # in shared memory.
149
+ if member && @members.size < @size
150
+ member.reset
151
+ @members << member
152
+ end
153
+ end
154
+ end
155
+ end
156
+ else
157
+ class MemberPool
158
+ def initialize(size, &block)
159
+ @size = size
160
+ @new_member = block
161
+ @members = []
162
+ @mutex = Mutex.new
163
+ end
164
+
165
+ def with
166
+ member = @mutex.synchronize { @members.pop } || @new_member.call
167
+ begin
168
+ yield member
169
+ ensure
170
+ member.reset
171
+ @mutex.synchronize do
172
+ if member && @members.size < @size
173
+ @members << member
174
+ end
175
+ end
176
+ end
177
+ end
178
+ end
179
+ end
180
+
181
+ def initialize(factory, size, options = nil)
182
+ options = nil if !options || options.empty?
183
+ @factory = factory
184
+ @packers = MemberPool.new(size) { factory.packer(options).freeze }
185
+ @unpackers = MemberPool.new(size) { factory.unpacker(options).freeze }
186
+ end
187
+
188
+ def load(data)
189
+ @unpackers.with do |unpacker|
190
+ unpacker.feed(data)
191
+ unpacker.full_unpack
192
+ end
193
+ end
194
+
195
+ def dump(object)
196
+ @packers.with do |packer|
197
+ packer.write(object)
198
+ packer.full_pack
199
+ end
200
+ end
201
+
202
+ def unpacker(&block)
203
+ @unpackers.with(&block)
204
+ end
205
+
206
+ def packer(&block)
207
+ @packers.with(&block)
208
+ end
209
+ end
80
210
  end
81
211
  end
@@ -2,11 +2,20 @@ module MessagePack
2
2
  class Packer
3
3
  # see ext for other methods
4
4
 
5
+ # The semantic of duping a packer is just too weird.
6
+ undef_method :dup
7
+ undef_method :clone
8
+
9
+ def register_type(type, klass, method_name = nil, &block)
10
+ raise ArgumentError, "expected Module/Class got: #{klass.inspect}" unless klass.is_a?(Module)
11
+ register_type_internal(type, klass, block || method_name.to_proc)
12
+ end
13
+
5
14
  def registered_types
6
15
  list = []
7
16
 
8
17
  registered_types_internal.each_pair do |klass, ary|
9
- list << {type: ary[0], class: klass, packer: ary[2]}
18
+ list << {type: ary[0], class: klass, packer: ary[1]}
10
19
  end
11
20
 
12
21
  list.sort{|a, b| a[:type] <=> b[:type] }
@@ -1,9 +1,26 @@
1
1
  class Symbol
2
- def to_msgpack_ext
3
- [to_s].pack('A*')
2
+ # to_msgpack_ext is supposed to return a binary string.
3
+ # The canonical way to do it for symbols would be:
4
+ # [to_s].pack('A*')
5
+ # However in this instance we can take a shortcut
6
+ if method_defined?(:name)
7
+ alias_method :to_msgpack_ext, :name
8
+ else
9
+ alias_method :to_msgpack_ext, :to_s
4
10
  end
5
11
 
6
12
  def self.from_msgpack_ext(data)
7
- data.unpack('A*').first.to_sym
13
+ # from_msgpack_ext is supposed to parse a binary string.
14
+ # The canonical way to do it for symbols would be:
15
+ # data.unpack1('A*').to_sym
16
+ # However in this instance we can take a shortcut
17
+
18
+ # We assume the string encoding is UTF-8, and let Ruby create either
19
+ # an ASCII symbol or UTF-8 symbol.
20
+ data.force_encoding(Encoding::UTF_8).to_sym
21
+ rescue EncodingError
22
+ # If somehow the string wasn't valid UTF-8 not valid ASCII, we fallback
23
+ # to what has been the historical behavior of creating a binary symbol
24
+ data.force_encoding(Encoding::BINARY).to_sym
8
25
  end
9
- end
26
+ end
data/lib/msgpack/time.rb CHANGED
@@ -18,7 +18,7 @@ module MessagePack
18
18
  else
19
19
  lambda do |payload|
20
20
  tv = MessagePack::Timestamp.from_msgpack_ext(payload)
21
- ::Time.at(tv.sec, tv.nsec / 1000.0)
21
+ ::Time.at(tv.sec, tv.nsec / 1000.0r)
22
22
  end
23
23
  end
24
24
 
@@ -2,11 +2,24 @@ module MessagePack
2
2
  class Unpacker
3
3
  # see ext for other methods
4
4
 
5
+ # The semantic of duping an unpacker is just too weird.
6
+ undef_method :dup
7
+ undef_method :clone
8
+
9
+ def register_type(type, klass = nil, method_name = nil, &block)
10
+ if klass && method_name
11
+ block = klass.method(method_name).to_proc
12
+ elsif !block_given?
13
+ raise ArgumentError, "register_type takes either 3 arguments or a block"
14
+ end
15
+ register_type_internal(type, klass, block)
16
+ end
17
+
5
18
  def registered_types
6
19
  list = []
7
20
 
8
21
  registered_types_internal.each_pair do |type, ary|
9
- list << {type: type, class: ary[0], unpacker: ary[2]}
22
+ list << {type: type, class: ary[0], unpacker: ary[1]}
10
23
  end
11
24
 
12
25
  list.sort{|a, b| a[:type] <=> b[:type] }
@@ -1,5 +1,5 @@
1
1
  module MessagePack
2
- VERSION = "1.4.2"
2
+ VERSION = "1.7.2"
3
3
  # Note for maintainers:
4
4
  # Don't miss building/releasing the JRuby version (rake buld:java)
5
5
  # See "How to build -java rubygems" in README for more details.
data/lib/msgpack.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  require "msgpack/version"
2
2
 
3
3
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" # This is same with `/java/ =~ RUBY_VERSION`
4
- require "java"
5
4
  require "msgpack/msgpack.jar"
6
- org.msgpack.jruby.MessagePackLibrary.new.load(JRuby.runtime, false)
5
+ JRuby::Util.load_ext("org.msgpack.jruby.MessagePackLibrary")
7
6
  else
8
7
  require "msgpack/msgpack"
9
8
  end
10
9
 
10
+ require "msgpack/buffer"
11
11
  require "msgpack/packer"
12
12
  require "msgpack/unpacker"
13
13
  require "msgpack/factory"
@@ -18,16 +18,15 @@ require "msgpack/time"
18
18
 
19
19
  module MessagePack
20
20
  DefaultFactory = MessagePack::Factory.new
21
- DEFAULT_EMPTY_PARAMS = {}.freeze
22
21
 
23
22
  def load(src, param = nil)
24
23
  unpacker = nil
25
24
 
26
25
  if src.is_a? String
27
- unpacker = DefaultFactory.unpacker param || DEFAULT_EMPTY_PARAMS
26
+ unpacker = DefaultFactory.unpacker param
28
27
  unpacker.feed_reference src
29
28
  else
30
- unpacker = DefaultFactory.unpacker src, param || DEFAULT_EMPTY_PARAMS
29
+ unpacker = DefaultFactory.unpacker src, param
31
30
  end
32
31
 
33
32
  unpacker.full_unpack
@@ -37,8 +36,8 @@ module MessagePack
37
36
  module_function :load
38
37
  module_function :unpack
39
38
 
40
- def pack(v, *rest)
41
- packer = DefaultFactory.packer(*rest)
39
+ def pack(v, io = nil, options = nil)
40
+ packer = DefaultFactory.packer(io, options)
42
41
  packer.write v
43
42
  packer.full_pack
44
43
  end
data/msgpack.gemspec CHANGED
@@ -12,20 +12,23 @@ 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("\n")
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
- s.test_files = `git ls-files -- {test,spec}/*`.split("\n")
22
23
 
23
- s.required_ruby_version = ">= 2.4"
24
+ s.required_ruby_version = ">= 2.5"
24
25
 
25
26
  s.add_development_dependency 'bundler'
26
27
  s.add_development_dependency 'rake'
27
- s.add_development_dependency 'rake-compiler'
28
+ s.add_development_dependency 'rake-compiler', ['>= 1.1.9']
28
29
  s.add_development_dependency 'rspec', ['~> 3.3']
30
+ s.add_development_dependency 'ruby_memcheck'
29
31
  s.add_development_dependency 'yard'
30
32
  s.add_development_dependency 'json'
33
+ s.add_development_dependency 'benchmark-ips', ['~> 2.10.0']
31
34
  end
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.2
4
+ version: 1.7.2
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: 2021-02-01 00:00:00.000000000 Z
13
+ date: 2023-07-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0'
49
+ version: 1.1.9
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '0'
56
+ version: 1.1.9
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rspec
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -96,6 +110,20 @@ dependencies:
96
110
  - - ">="
97
111
  - !ruby/object:Gem::Version
98
112
  version: '0'
113
+ - !ruby/object:Gem::Dependency
114
+ name: benchmark-ips
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: 2.10.0
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: 2.10.0
99
127
  description: MessagePack is a binary-based efficient object serialization library.
100
128
  It enables to exchange structured objects between many languages like JSON. But
101
129
  unlike JSON, it is very fast and small.
@@ -108,35 +136,9 @@ extensions:
108
136
  - ext/msgpack/extconf.rb
109
137
  extra_rdoc_files: []
110
138
  files:
111
- - ".gitignore"
112
- - ".rubocop.yml"
113
- - ".travis.yml"
114
139
  - ChangeLog
115
- - Gemfile
116
140
  - LICENSE
117
141
  - README.md
118
- - Rakefile
119
- - appveyor.yml
120
- - bench/pack.rb
121
- - bench/pack_log.rb
122
- - bench/pack_log_long.rb
123
- - bench/pack_symbols.rb
124
- - bench/run.sh
125
- - bench/run_long.sh
126
- - bench/run_symbols.sh
127
- - bench/unpack.rb
128
- - bench/unpack_log.rb
129
- - bench/unpack_log_long.rb
130
- - doclib/msgpack.rb
131
- - doclib/msgpack/buffer.rb
132
- - doclib/msgpack/core_ext.rb
133
- - doclib/msgpack/error.rb
134
- - doclib/msgpack/extension_value.rb
135
- - doclib/msgpack/factory.rb
136
- - doclib/msgpack/packer.rb
137
- - doclib/msgpack/time.rb
138
- - doclib/msgpack/timestamp.rb
139
- - doclib/msgpack/unpacker.rb
140
142
  - ext/java/org/msgpack/jruby/Buffer.java
141
143
  - ext/java/org/msgpack/jruby/Decoder.java
142
144
  - ext/java/org/msgpack/jruby/Encoder.java
@@ -176,6 +178,8 @@ files:
176
178
  - ext/msgpack/unpacker_ext_registry.c
177
179
  - ext/msgpack/unpacker_ext_registry.h
178
180
  - lib/msgpack.rb
181
+ - lib/msgpack/bigint.rb
182
+ - lib/msgpack/buffer.rb
179
183
  - lib/msgpack/core_ext.rb
180
184
  - lib/msgpack/factory.rb
181
185
  - lib/msgpack/packer.rb
@@ -185,31 +189,6 @@ files:
185
189
  - lib/msgpack/unpacker.rb
186
190
  - lib/msgpack/version.rb
187
191
  - msgpack.gemspec
188
- - msgpack.org.md
189
- - spec/cases.json
190
- - spec/cases.msg
191
- - spec/cases_compact.msg
192
- - spec/cases_spec.rb
193
- - spec/cruby/buffer_io_spec.rb
194
- - spec/cruby/buffer_packer.rb
195
- - spec/cruby/buffer_spec.rb
196
- - spec/cruby/buffer_unpacker.rb
197
- - spec/cruby/unpacker_spec.rb
198
- - spec/ext_value_spec.rb
199
- - spec/exttypes.rb
200
- - spec/factory_spec.rb
201
- - spec/format_spec.rb
202
- - spec/jruby/benchmarks/shootout_bm.rb
203
- - spec/jruby/benchmarks/symbolize_keys_bm.rb
204
- - spec/jruby/unpacker_spec.rb
205
- - spec/msgpack_spec.rb
206
- - spec/pack_spec.rb
207
- - spec/packer_spec.rb
208
- - spec/random_compat.rb
209
- - spec/spec_helper.rb
210
- - spec/timestamp_spec.rb
211
- - spec/unpack_spec.rb
212
- - spec/unpacker_spec.rb
213
192
  homepage: http://msgpack.org/
214
193
  licenses:
215
194
  - Apache 2.0
@@ -222,39 +201,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
201
  requirements:
223
202
  - - ">="
224
203
  - !ruby/object:Gem::Version
225
- version: '2.4'
204
+ version: '2.5'
226
205
  required_rubygems_version: !ruby/object:Gem::Requirement
227
206
  requirements:
228
207
  - - ">="
229
208
  - !ruby/object:Gem::Version
230
209
  version: '0'
231
210
  requirements: []
232
- rubygems_version: 3.2.3
211
+ rubygems_version: 3.3.7
233
212
  signing_key:
234
213
  specification_version: 4
235
214
  summary: MessagePack, a binary-based efficient data interchange format.
236
- test_files:
237
- - spec/cases.json
238
- - spec/cases.msg
239
- - spec/cases_compact.msg
240
- - spec/cases_spec.rb
241
- - spec/cruby/buffer_io_spec.rb
242
- - spec/cruby/buffer_packer.rb
243
- - spec/cruby/buffer_spec.rb
244
- - spec/cruby/buffer_unpacker.rb
245
- - spec/cruby/unpacker_spec.rb
246
- - spec/ext_value_spec.rb
247
- - spec/exttypes.rb
248
- - spec/factory_spec.rb
249
- - spec/format_spec.rb
250
- - spec/jruby/benchmarks/shootout_bm.rb
251
- - spec/jruby/benchmarks/symbolize_keys_bm.rb
252
- - spec/jruby/unpacker_spec.rb
253
- - spec/msgpack_spec.rb
254
- - spec/pack_spec.rb
255
- - spec/packer_spec.rb
256
- - spec/random_compat.rb
257
- - spec/spec_helper.rb
258
- - spec/timestamp_spec.rb
259
- - spec/unpack_spec.rb
260
- - spec/unpacker_spec.rb
215
+ test_files: []
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