msgpack 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +10 -0
- data/Dockerfile +1 -8
- data/README.rdoc +3 -3
- data/Rakefile +1 -1
- data/ext/msgpack/packer.h +5 -9
- data/lib/msgpack/version.rb +1 -1
- data/spec/format_spec.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 504d2e79f6495ca1e39421dc878ec2108f317fc5
|
4
|
+
data.tar.gz: b433d02ec1d26ac55341af24c04384b5e8442dee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45aaa1839c144714fc3efed75acf446e01f455a20010c92951fba275f27cd652319cd444b2a18eb59ffcd11e5d328fad133d410f4087f7ceb9fad7f60145be04
|
7
|
+
data.tar.gz: b9320514ce04bda3cd8f7ffd344a32251db8ccdef7ea8d81c39a044a0b89f55e3536f6e122b7e4f7e580a227bbadd52f4fcf56de3c4d597fa6d3d1858f4b6b27
|
data/ChangeLog
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
2015-07-22 version 0.6.2:
|
2
|
+
|
3
|
+
* Fix release workflow: Ruby 2.1 and 2.2 are supported for Windows (2.0 is omitted)
|
4
|
+
* Fix to encode symbols along its encoding
|
5
|
+
* Fix segmentation fault in minor case
|
6
|
+
|
7
|
+
2015-07-01 version 0.6.1:
|
8
|
+
|
9
|
+
* Added :compatibility_mode option to Packer#initialize. Default is false. If it
|
10
|
+
is set to true, str8 format and bin format family will not be used.
|
1
11
|
|
2
12
|
2015-05-26 version 0.6.0:
|
3
13
|
|
data/Dockerfile
CHANGED
@@ -31,13 +31,6 @@ WORKDIR /home/ubuntu
|
|
31
31
|
RUN git clone https://github.com/tagomoris/xbuild.git
|
32
32
|
RUN git clone https://github.com/msgpack/msgpack-ruby.git
|
33
33
|
|
34
|
-
RUN /home/ubuntu/xbuild/ruby-install 2.0.0-p643 /home/ubuntu/local/ruby-2.0
|
35
|
-
|
36
|
-
ENV PATH /home/ubuntu/local/ruby-2.0/bin:$PATH
|
37
|
-
RUN gem install rake-compiler
|
38
|
-
RUN rake-compiler cross-ruby VERSION=2.0.0-p643 HOST=i686-w64-mingw32 EXTS=--without-extensions
|
39
|
-
RUN rake-compiler cross-ruby VERSION=2.0.0-p643 HOST=x86_64-w64-mingw32 EXTS=--without-extensions
|
40
|
-
|
41
34
|
RUN /home/ubuntu/xbuild/ruby-install 2.1.5 /home/ubuntu/local/ruby-2.1
|
42
35
|
|
43
36
|
ENV PATH /home/ubuntu/local/ruby-2.1/bin:$PATH
|
@@ -59,4 +52,4 @@ ENV BUILD_BRANCH master
|
|
59
52
|
ENV BUILD_POSITION HEAD
|
60
53
|
|
61
54
|
### docker run -v `pwd`/pkg:/home/ubuntu/msgpack-ruby/pkg IMAGENAME
|
62
|
-
CMD ["bash", "-c", "git remote add dockerbuild $MSGPACK_REPO && git fetch dockerbuild && git checkout $BUILD_BRANCH && git pull dockerbuild $BUILD_BRANCH && git reset --hard $BUILD_POSITION && bundle && rake clean && rake cross native gem"]
|
55
|
+
CMD ["bash", "-c", "git remote add dockerbuild $MSGPACK_REPO && git fetch dockerbuild && git checkout $BUILD_BRANCH && git pull dockerbuild $BUILD_BRANCH && git reset --hard $BUILD_POSITION && bundle && rake clean && rake cross native gem RUBY_CC_VERSION=2.1.5:2.2.2"]
|
data/README.rdoc
CHANGED
@@ -123,15 +123,15 @@ Then, you can run the tasks as follows:
|
|
123
123
|
|
124
124
|
== How to build -mingw32 rubygems
|
125
125
|
|
126
|
-
MessagePack mingw32 rubygems build process uses {Docker}[https://docs.docker.com/].
|
126
|
+
MessagePack mingw32/64 rubygems build process uses {Docker}[https://docs.docker.com/].
|
127
127
|
|
128
128
|
Set up docker environment at first, and then run docker container to build gems, with shared directory "pkg".
|
129
129
|
|
130
|
-
docker run -it --rm -v `pwd`/pkg:/home/ubuntu/msgpack-ruby/pkg msgpack/msgpack-rubygem-
|
130
|
+
docker run -it --rm -v `pwd`/pkg:/home/ubuntu/msgpack-ruby/pkg msgpack/msgpack-rubygem-crosscompile
|
131
131
|
|
132
132
|
Once this step successes, target gems exist in pkg/msgpack-*-{x86,x64}-mingw32.gem.
|
133
133
|
|
134
|
-
See also: https://registry.hub.docker.com/u/msgpack/msgpack-rubygem-
|
134
|
+
See also: https://registry.hub.docker.com/u/msgpack/msgpack-rubygem-crosscompile/
|
135
135
|
|
136
136
|
= Copyright
|
137
137
|
|
data/Rakefile
CHANGED
@@ -52,7 +52,7 @@ else
|
|
52
52
|
ext.ext_dir = 'ext/msgpack'
|
53
53
|
ext.cross_compile = true
|
54
54
|
ext.lib_dir = File.join(*['lib', 'msgpack', ENV['FAT_DIR']].compact)
|
55
|
-
ext.cross_platform = ['
|
55
|
+
ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
|
56
56
|
end
|
57
57
|
|
58
58
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
data/ext/msgpack/packer.h
CHANGED
@@ -297,7 +297,7 @@ static inline void msgpack_packer_write_raw_header(msgpack_packer_t* pk, unsigne
|
|
297
297
|
static inline void msgpack_packer_write_bin_header(msgpack_packer_t* pk, unsigned int n)
|
298
298
|
{
|
299
299
|
if(n < 256) {
|
300
|
-
msgpack_buffer_ensure_writable(PACKER_BUFFER_(pk),
|
300
|
+
msgpack_buffer_ensure_writable(PACKER_BUFFER_(pk), 2);
|
301
301
|
unsigned char be = (uint8_t) n;
|
302
302
|
msgpack_buffer_write_byte_and_data(PACKER_BUFFER_(pk), 0xc4, (const void*)&be, 1);
|
303
303
|
} else if(n < 65536) {
|
@@ -404,15 +404,11 @@ static inline void msgpack_packer_write_symbol_value(msgpack_packer_t* pk, VALUE
|
|
404
404
|
/* rb_sym2str is added since MRI 2.2.0 */
|
405
405
|
msgpack_packer_write_string_value(pk, rb_sym2str(v));
|
406
406
|
#else
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
if(len > 0xffffffffUL) {
|
411
|
-
// TODO rb_eArgError?
|
412
|
-
rb_raise(rb_eArgError, "size of symbol is too long to pack: %lu bytes should be <= %lu", len, 0xffffffffUL);
|
407
|
+
VALUE str = rb_id2str(SYM2ID(v));
|
408
|
+
if (!str) {
|
409
|
+
rb_raise(rb_eRuntimeError, "could not convert a symbol to string");
|
413
410
|
}
|
414
|
-
|
415
|
-
msgpack_buffer_append(PACKER_BUFFER_(pk), name, len);
|
411
|
+
msgpack_packer_write_string_value(pk, str);
|
416
412
|
#endif
|
417
413
|
}
|
418
414
|
|
data/lib/msgpack/version.rb
CHANGED
data/spec/format_spec.rb
CHANGED
@@ -126,6 +126,25 @@ describe MessagePack do
|
|
126
126
|
v.should == "\xE3\x81\x82".force_encoding('UTF-8')
|
127
127
|
end
|
128
128
|
|
129
|
+
it "symbol to str" do
|
130
|
+
v = pack_unpack(:a)
|
131
|
+
v.should == "a".force_encoding('UTF-8')
|
132
|
+
end
|
133
|
+
|
134
|
+
it "symbol to str with encoding" do
|
135
|
+
a = "\xE3\x81\x82".force_encoding('UTF-8')
|
136
|
+
v = pack_unpack(a.encode('Shift_JIS').to_sym)
|
137
|
+
v.encoding.should == Encoding::UTF_8
|
138
|
+
v.should == a
|
139
|
+
end
|
140
|
+
|
141
|
+
it "symbol to bin" do
|
142
|
+
a = "\xE3\x81\x82".force_encoding('ASCII-8BIT')
|
143
|
+
v = pack_unpack(a.to_sym)
|
144
|
+
v.encoding.should == Encoding::ASCII_8BIT
|
145
|
+
v.should == a
|
146
|
+
end
|
147
|
+
|
129
148
|
it "bin 8" do
|
130
149
|
check_bin 2, (1<<8)-1
|
131
150
|
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: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|