msgpack 1.3.3 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +99 -0
  3. data/README.md +293 -0
  4. data/ext/java/org/msgpack/jruby/Buffer.java +26 -19
  5. data/ext/java/org/msgpack/jruby/Decoder.java +46 -23
  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 +86 -68
  12. data/ext/msgpack/buffer.c +58 -85
  13. data/ext/msgpack/buffer.h +59 -20
  14. data/ext/msgpack/buffer_class.c +161 -52
  15. data/ext/msgpack/buffer_class.h +1 -0
  16. data/ext/msgpack/compat.h +1 -111
  17. data/ext/msgpack/extconf.rb +41 -23
  18. data/ext/msgpack/factory_class.c +143 -87
  19. data/ext/msgpack/packer.c +66 -43
  20. data/ext/msgpack/packer.h +25 -27
  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 +130 -126
  29. data/ext/msgpack/unpacker.h +22 -13
  30. data/ext/msgpack/unpacker_class.c +94 -124
  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 +4 -8
  42. data/lib/msgpack.rb +7 -12
  43. data/msgpack.gemspec +9 -8
  44. metadata +37 -96
  45. data/.gitignore +0 -23
  46. data/.rubocop.yml +0 -36
  47. data/.travis.yml +0 -43
  48. data/Gemfile +0 -9
  49. data/README.rdoc +0 -225
  50. data/Rakefile +0 -78
  51. data/appveyor.yml +0 -18
  52. data/bench/pack.rb +0 -23
  53. data/bench/pack_log.rb +0 -33
  54. data/bench/pack_log_long.rb +0 -65
  55. data/bench/pack_symbols.rb +0 -28
  56. data/bench/run.sh +0 -14
  57. data/bench/run_long.sh +0 -35
  58. data/bench/run_symbols.sh +0 -26
  59. data/bench/unpack.rb +0 -21
  60. data/bench/unpack_log.rb +0 -34
  61. data/bench/unpack_log_long.rb +0 -67
  62. data/doclib/msgpack/buffer.rb +0 -193
  63. data/doclib/msgpack/core_ext.rb +0 -101
  64. data/doclib/msgpack/error.rb +0 -19
  65. data/doclib/msgpack/extension_value.rb +0 -9
  66. data/doclib/msgpack/factory.rb +0 -101
  67. data/doclib/msgpack/packer.rb +0 -208
  68. data/doclib/msgpack/time.rb +0 -22
  69. data/doclib/msgpack/timestamp.rb +0 -44
  70. data/doclib/msgpack/unpacker.rb +0 -183
  71. data/doclib/msgpack.rb +0 -87
  72. data/msgpack.org.md +0 -46
  73. data/spec/cases.json +0 -1
  74. data/spec/cases.msg +0 -0
  75. data/spec/cases_compact.msg +0 -0
  76. data/spec/cases_spec.rb +0 -39
  77. data/spec/cruby/buffer_io_spec.rb +0 -255
  78. data/spec/cruby/buffer_packer.rb +0 -29
  79. data/spec/cruby/buffer_spec.rb +0 -575
  80. data/spec/cruby/buffer_unpacker.rb +0 -19
  81. data/spec/cruby/unpacker_spec.rb +0 -70
  82. data/spec/ext_value_spec.rb +0 -99
  83. data/spec/exttypes.rb +0 -51
  84. data/spec/factory_spec.rb +0 -367
  85. data/spec/format_spec.rb +0 -301
  86. data/spec/jruby/benchmarks/shootout_bm.rb +0 -73
  87. data/spec/jruby/benchmarks/symbolize_keys_bm.rb +0 -25
  88. data/spec/jruby/unpacker_spec.rb +0 -186
  89. data/spec/msgpack_spec.rb +0 -214
  90. data/spec/pack_spec.rb +0 -61
  91. data/spec/packer_spec.rb +0 -557
  92. data/spec/random_compat.rb +0 -24
  93. data/spec/spec_helper.rb +0 -38
  94. data/spec/timestamp_spec.rb +0 -121
  95. data/spec/unpack_spec.rb +0 -57
  96. data/spec/unpacker_spec.rb +0 -716
@@ -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,10 +1,6 @@
1
1
  module MessagePack
2
- VERSION = "1.3.3"
3
-
4
- # NOTE for msgpack-ruby maintainer:
5
- # Check these things to release new binaryes for new Ruby versions (especially for Windows):
6
- # * versions/supports of rake-compiler & rake-compiler-dock
7
- # https://github.com/rake-compiler/rake-compiler-dock/blob/master/History.md
8
- # * update RUBY_CC_VERSION in Rakefile
9
- # * check Ruby dependency of released mswin gem details
2
+ VERSION = "1.7.2"
3
+ # Note for maintainers:
4
+ # Don't miss building/releasing the JRuby version (rake buld:java)
5
+ # See "How to build -java rubygems" in README for more details.
10
6
  end
data/lib/msgpack.rb CHANGED
@@ -1,17 +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
- begin
9
- require "msgpack/#{RUBY_VERSION[/\d+.\d+/]}/msgpack"
10
- rescue LoadError
11
- require "msgpack/msgpack"
12
- end
7
+ require "msgpack/msgpack"
13
8
  end
14
9
 
10
+ require "msgpack/buffer"
15
11
  require "msgpack/packer"
16
12
  require "msgpack/unpacker"
17
13
  require "msgpack/factory"
@@ -22,16 +18,15 @@ require "msgpack/time"
22
18
 
23
19
  module MessagePack
24
20
  DefaultFactory = MessagePack::Factory.new
25
- DEFAULT_EMPTY_PARAMS = {}.freeze
26
21
 
27
22
  def load(src, param = nil)
28
23
  unpacker = nil
29
24
 
30
25
  if src.is_a? String
31
- unpacker = DefaultFactory.unpacker param || DEFAULT_EMPTY_PARAMS
26
+ unpacker = DefaultFactory.unpacker param
32
27
  unpacker.feed_reference src
33
28
  else
34
- unpacker = DefaultFactory.unpacker src, param || DEFAULT_EMPTY_PARAMS
29
+ unpacker = DefaultFactory.unpacker src, param
35
30
  end
36
31
 
37
32
  unpacker.full_unpack
@@ -41,8 +36,8 @@ module MessagePack
41
36
  module_function :load
42
37
  module_function :unpack
43
38
 
44
- def pack(v, *rest)
45
- packer = DefaultFactory.packer(*rest)
39
+ def pack(v, io = nil, options = nil)
40
+ packer = DefaultFactory.packer(io, options)
46
41
  packer.write v
47
42
  packer.full_pack
48
43
  end
data/msgpack.gemspec CHANGED
@@ -12,22 +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")
23
+
24
+ s.required_ruby_version = ">= 2.5"
22
25
 
23
26
  s.add_development_dependency 'bundler'
24
27
  s.add_development_dependency 'rake'
25
- s.add_development_dependency 'rake-compiler', ['~> 1.0']
26
- if /java/ !~ RUBY_PLATFORM
27
- # NOTE: rake-compiler-dock SHOULD be updated for new Ruby versions
28
- s.add_development_dependency 'rake-compiler-dock', ['~> 1.0']
29
- end
28
+ s.add_development_dependency 'rake-compiler', ['>= 1.1.9']
30
29
  s.add_development_dependency 'rspec', ['~> 3.3']
30
+ s.add_development_dependency 'ruby_memcheck'
31
31
  s.add_development_dependency 'yard'
32
32
  s.add_development_dependency 'json'
33
+ s.add_development_dependency 'benchmark-ips', ['~> 2.10.0']
33
34
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msgpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  - Theo Hultberg
9
9
  - Satoshi Tagomori
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-02-05 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
@@ -44,44 +44,44 @@ dependencies:
44
44
  name: rake-compiler
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '1.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: '1.0'
56
+ version: 1.1.9
57
57
  - !ruby/object:Gem::Dependency
58
- name: rake-compiler-dock
58
+ name: rspec
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.0'
63
+ version: '3.3'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '1.0'
70
+ version: '3.3'
71
71
  - !ruby/object:Gem::Dependency
72
- name: rspec
72
+ name: ruby_memcheck
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: '3.3'
77
+ version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: '3.3'
84
+ version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: yard
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -110,6 +110,20 @@ dependencies:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
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
113
127
  description: MessagePack is a binary-based efficient object serialization library.
114
128
  It enables to exchange structured objects between many languages like JSON. But
115
129
  unlike JSON, it is very fast and small.
@@ -122,35 +136,9 @@ extensions:
122
136
  - ext/msgpack/extconf.rb
123
137
  extra_rdoc_files: []
124
138
  files:
125
- - ".gitignore"
126
- - ".rubocop.yml"
127
- - ".travis.yml"
128
139
  - ChangeLog
129
- - Gemfile
130
140
  - LICENSE
131
- - README.rdoc
132
- - Rakefile
133
- - appveyor.yml
134
- - bench/pack.rb
135
- - bench/pack_log.rb
136
- - bench/pack_log_long.rb
137
- - bench/pack_symbols.rb
138
- - bench/run.sh
139
- - bench/run_long.sh
140
- - bench/run_symbols.sh
141
- - bench/unpack.rb
142
- - bench/unpack_log.rb
143
- - bench/unpack_log_long.rb
144
- - doclib/msgpack.rb
145
- - doclib/msgpack/buffer.rb
146
- - doclib/msgpack/core_ext.rb
147
- - doclib/msgpack/error.rb
148
- - doclib/msgpack/extension_value.rb
149
- - doclib/msgpack/factory.rb
150
- - doclib/msgpack/packer.rb
151
- - doclib/msgpack/time.rb
152
- - doclib/msgpack/timestamp.rb
153
- - doclib/msgpack/unpacker.rb
141
+ - README.md
154
142
  - ext/java/org/msgpack/jruby/Buffer.java
155
143
  - ext/java/org/msgpack/jruby/Decoder.java
156
144
  - ext/java/org/msgpack/jruby/Encoder.java
@@ -190,6 +178,8 @@ files:
190
178
  - ext/msgpack/unpacker_ext_registry.c
191
179
  - ext/msgpack/unpacker_ext_registry.h
192
180
  - lib/msgpack.rb
181
+ - lib/msgpack/bigint.rb
182
+ - lib/msgpack/buffer.rb
193
183
  - lib/msgpack/core_ext.rb
194
184
  - lib/msgpack/factory.rb
195
185
  - lib/msgpack/packer.rb
@@ -199,36 +189,11 @@ files:
199
189
  - lib/msgpack/unpacker.rb
200
190
  - lib/msgpack/version.rb
201
191
  - msgpack.gemspec
202
- - msgpack.org.md
203
- - spec/cases.json
204
- - spec/cases.msg
205
- - spec/cases_compact.msg
206
- - spec/cases_spec.rb
207
- - spec/cruby/buffer_io_spec.rb
208
- - spec/cruby/buffer_packer.rb
209
- - spec/cruby/buffer_spec.rb
210
- - spec/cruby/buffer_unpacker.rb
211
- - spec/cruby/unpacker_spec.rb
212
- - spec/ext_value_spec.rb
213
- - spec/exttypes.rb
214
- - spec/factory_spec.rb
215
- - spec/format_spec.rb
216
- - spec/jruby/benchmarks/shootout_bm.rb
217
- - spec/jruby/benchmarks/symbolize_keys_bm.rb
218
- - spec/jruby/unpacker_spec.rb
219
- - spec/msgpack_spec.rb
220
- - spec/pack_spec.rb
221
- - spec/packer_spec.rb
222
- - spec/random_compat.rb
223
- - spec/spec_helper.rb
224
- - spec/timestamp_spec.rb
225
- - spec/unpack_spec.rb
226
- - spec/unpacker_spec.rb
227
192
  homepage: http://msgpack.org/
228
193
  licenses:
229
194
  - Apache 2.0
230
195
  metadata: {}
231
- post_install_message:
196
+ post_install_message:
232
197
  rdoc_options: []
233
198
  require_paths:
234
199
  - lib
@@ -236,39 +201,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
201
  requirements:
237
202
  - - ">="
238
203
  - !ruby/object:Gem::Version
239
- version: '0'
204
+ version: '2.5'
240
205
  required_rubygems_version: !ruby/object:Gem::Requirement
241
206
  requirements:
242
207
  - - ">="
243
208
  - !ruby/object:Gem::Version
244
209
  version: '0'
245
210
  requirements: []
246
- rubygems_version: 3.1.2
247
- signing_key:
211
+ rubygems_version: 3.3.7
212
+ signing_key:
248
213
  specification_version: 4
249
214
  summary: MessagePack, a binary-based efficient data interchange format.
250
- test_files:
251
- - spec/cases.json
252
- - spec/cases.msg
253
- - spec/cases_compact.msg
254
- - spec/cases_spec.rb
255
- - spec/cruby/buffer_io_spec.rb
256
- - spec/cruby/buffer_packer.rb
257
- - spec/cruby/buffer_spec.rb
258
- - spec/cruby/buffer_unpacker.rb
259
- - spec/cruby/unpacker_spec.rb
260
- - spec/ext_value_spec.rb
261
- - spec/exttypes.rb
262
- - spec/factory_spec.rb
263
- - spec/format_spec.rb
264
- - spec/jruby/benchmarks/shootout_bm.rb
265
- - spec/jruby/benchmarks/symbolize_keys_bm.rb
266
- - spec/jruby/unpacker_spec.rb
267
- - spec/msgpack_spec.rb
268
- - spec/pack_spec.rb
269
- - spec/packer_spec.rb
270
- - spec/random_compat.rb
271
- - spec/spec_helper.rb
272
- - spec/timestamp_spec.rb
273
- - spec/unpack_spec.rb
274
- - 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.3
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
- Lint/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