mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-18 03:29:49 +02:00
ruby: MessagePack::VERSION constant
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
require 'mkmf'
|
require 'mkmf'
|
||||||
$CFLAGS << " -I.. -Wall -O4"
|
require './version.rb'
|
||||||
|
$CFLAGS << %[ -I.. -Wall -O4 -DMESSAGEPACK_VERSION=\\"#{MessagePack::VERSION}\\"]
|
||||||
create_makefile('msgpack')
|
create_makefile('msgpack')
|
||||||
|
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
|
require './version.rb'
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.platform = Gem::Platform::RUBY
|
s.platform = Gem::Platform::RUBY
|
||||||
s.name = "msgpack"
|
s.name = "msgpack"
|
||||||
s.version = "0.4.2"
|
s.version = MessagePack::VERSION
|
||||||
s.summary = "MessagePack, a binary-based efficient data interchange format."
|
s.summary = "MessagePack, a binary-based efficient data interchange format."
|
||||||
s.author = "FURUHASHI Sadayuki"
|
s.author = "FURUHASHI Sadayuki"
|
||||||
s.email = "frsyuki@users.sourceforge.jp"
|
s.email = "frsyuki@users.sourceforge.jp"
|
||||||
|
@@ -43,7 +43,9 @@ static VALUE mMessagePack;
|
|||||||
void Init_msgpack(void)
|
void Init_msgpack(void)
|
||||||
{
|
{
|
||||||
mMessagePack = rb_define_module("MessagePack");
|
mMessagePack = rb_define_module("MessagePack");
|
||||||
|
|
||||||
|
rb_define_const(mMessagePack, "VERSION", rb_str_new2(MESSAGEPACK_VERSION));
|
||||||
|
|
||||||
Init_msgpack_unpack(mMessagePack);
|
Init_msgpack_unpack(mMessagePack);
|
||||||
Init_msgpack_pack(mMessagePack);
|
Init_msgpack_pack(mMessagePack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,4 +5,4 @@ rescue LoadError
|
|||||||
require File.dirname(__FILE__) + '/../lib/msgpack'
|
require File.dirname(__FILE__) + '/../lib/msgpack'
|
||||||
end
|
end
|
||||||
|
|
||||||
GC.stress = true
|
#GC.stress = true
|
||||||
|
@@ -276,6 +276,10 @@ class MessagePackTestPackUnpack < Test::Unit::TestCase
|
|||||||
assert_equal(parsed, num)
|
assert_equal(parsed, num)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "MessagePack::VERSION constant" do
|
||||||
|
p MessagePack::VERSION
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check(len, obj)
|
def check(len, obj)
|
||||||
v = obj.to_msgpack
|
v = obj.to_msgpack
|
||||||
|
3
ruby/version.rb
Normal file
3
ruby/version.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module MessagePack
|
||||||
|
VERSION = "0.4.3"
|
||||||
|
end
|
Reference in New Issue
Block a user