msgpack 0.6.1-x64-mingw32 → 0.6.2-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 061bf4e223be0ec5cd073d7e40ffbfff30c42de8
4
- data.tar.gz: c01cf237f4702dfb85951b138f64fbefaaa28381
3
+ metadata.gz: fc6897b654a8b3dddfc360d84c54ebf1884d8d64
4
+ data.tar.gz: 7c5b6dfec3d6e1f1e65a8d05b070a07360859062
5
5
  SHA512:
6
- metadata.gz: c18c958023c23e0563d09a8c12e0c30c06dbedef61070c6d7802ba4d905dc3472cfb51a35b89ea9a2b1944bd8c0fc53a5d0b088b06c565b894a0952a5ed85dc6
7
- data.tar.gz: 030f5ff78911c2397f7c65b54c515403c4d88e5f869c9e6bd08a6d8d978655c9c394f3c7452d140499bb9a80b4f7d666c8fa5554dd66307784478d323bb70fbc
6
+ metadata.gz: cdd76d6c29a99bd2a7b77fa553838efeede5c9e3d10ad414054430b8b7ac1f400084c3ff487855377a3562cdc7c966bd1441e9c884c271dd9a955512e54c2fb2
7
+ data.tar.gz: e9d925601bcd341caf7ac17ac30133a9827c2e99f01dc1c3f8012adbd78b5ec529a350bb78d628a6867e72646a952e7ad9f84a8ab062d5948e49e1f517ea83e6
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"]
@@ -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-cross01
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-cross01/
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 = ['i386-mswin32-60', 'x64-mingw32']
55
+ ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
56
56
  end
57
57
 
58
58
  RSpec::Core::RakeTask.new(:spec) do |t|
@@ -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), 1);
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
- const char* name = rb_id2name(SYM2ID(v));
408
- unsigned long len = strlen(name);
409
- /* actual return type of strlen is size_t */
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
- msgpack_packer_write_raw_header(pk, (unsigned int)len);
415
- msgpack_buffer_append(PACKER_BUFFER_(pk), name, len);
411
+ msgpack_packer_write_string_value(pk, str);
416
412
  #endif
417
413
  }
418
414
 
@@ -1,3 +1,3 @@
1
1
  module MessagePack
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -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.1
4
+ version: 0.6.2
5
5
  platform: x64-mingw32
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-01 00:00:00.000000000 Z
12
+ date: 2015-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -158,7 +158,8 @@ files:
158
158
  - ext/msgpack/unpacker_class.c
159
159
  - ext/msgpack/unpacker_class.h
160
160
  - lib/msgpack.rb
161
- - lib/msgpack/msgpack.so
161
+ - lib/msgpack/2.1/msgpack.so
162
+ - lib/msgpack/2.2/msgpack.so
162
163
  - lib/msgpack/version.rb
163
164
  - msgpack.gemspec
164
165
  - msgpack.org.md