Hello community, here is the log from the commit of package rubygem-rice for openSUSE:Factory checked in at 2020-05-13 22:56:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rice (Old) and /work/SRC/openSUSE:Factory/.rubygem-rice.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rice" Wed May 13 22:56:24 2020 rev:5 rq:805021 version:2.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rice/rubygem-rice.changes 2019-06-14 20:43:08.802316915 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-rice.new.2738/rubygem-rice.changes 2020-05-13 22:56:25.375048885 +0200 @@ -1,0 +2,7 @@ +Mon Feb 10 15:37:08 UTC 2020 - Stephan Kulow <[email protected]> + +- updated to version 2.2.0 + no changelog found +- Make build work with ruby2.7 + +------------------------------------------------------------------- Old: ---- rice-2.1.3.gem New: ---- rice-2.2.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rice.spec ++++++ --- /var/tmp/diff_new_pack.nMXvwV/_old 2020-05-13 22:56:26.091050282 +0200 +++ /var/tmp/diff_new_pack.nMXvwV/_new 2020-05-13 22:56:26.095050290 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-rice # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-rice -Version: 2.1.3 +Version: 2.2.0 Release: 0 %define mod_name rice %define mod_full_name %{mod_name}-%{version} @@ -35,13 +35,13 @@ BuildRequires: gettext-devel # /MANUAL BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{rubydevel} +BuildRequires: %{rubydevel >= 2.4} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 -Url: https://github.com/jasonroelofs/rice +URL: https://github.com/jasonroelofs/rice Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml -Source99: rice-rpmlintrc +Source2: rice-rpmlintrc Summary: Ruby Interface for C++ Extensions License: MIT Group: Development/Languages/Ruby ++++++ rice-2.1.3.gem -> rice-2.2.0.gem ++++++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extconf.rb new/extconf.rb --- old/extconf.rb 2019-02-28 18:46:34.000000000 +0100 +++ new/extconf.rb 2020-01-11 02:55:14.000000000 +0100 @@ -23,12 +23,9 @@ Unfortunately Rice does not build against a staticly linked Ruby. You'll need to rebuild Ruby with --enable-shared to use this library. -If you're on rvm: rvm reinstall [version] -- --enable-shared -If you're on rbenv: CONFIGURE_OPTS="--enable-shared" rbenv install [version] - -If you are using Heroku, they use a own custom configured, staticly linked Ruby -for their stack and it unfortunately does not work with Rice. You will need to use -a custom Ruby build pack that builds and uses a non-static version of Ruby. +If you're on rvm: rvm reinstall [version] -- --enable-shared +If you're on rbenv: CONFIGURE_OPTS="--enable-shared" rbenv install [version] +If you're on Heroku: upgrade your stack to heroku-16 or later EOC end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-02-28 18:46:34.000000000 +0100 +++ new/metadata 2020-01-11 02:55:14.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rice version: !ruby/object:Gem::Version - version: 2.1.3 + version: 2.2.0 platform: ruby authors: - Paul Brannan @@ -9,8 +9,50 @@ autorequire: bindir: bin cert_chain: [] -date: 2019-02-28 00:00:00.000000000 Z -dependencies: [] +date: 2020-01-11 00:00:00.000000000 Z +dependencies: +- !ruby/object:Gem::Dependency + name: bundler + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' +- !ruby/object:Gem::Dependency + name: rake + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' +- !ruby/object:Gem::Dependency + name: minitest + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' description: | Rice is a C++ interface to Ruby's C API. It provides a type-safe and exception-safe interface in order to make embedding Ruby and writing @@ -230,15 +272,14 @@ requirements: - - ">=" - !ruby/object:Gem::Version - version: '0' + version: '2.4' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.7.6 +rubygems_version: 3.1.2 signing_key: specification_version: 4 summary: Ruby Interface for C++ Extensions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rice/detail/method_data.cpp new/rice/detail/method_data.cpp --- old/rice/detail/method_data.cpp 2019-02-28 18:46:34.000000000 +0100 +++ new/rice/detail/method_data.cpp 2020-01-11 02:55:14.000000000 +0100 @@ -31,6 +31,12 @@ return (store == Qnil) ? Qnil : rb_ivar_get(store, id); } +// Ruby 2.7 now includes a similarly named macro that uses templates to +// pick the right overload for the underlying function. That doesn't work +// for our cases because we are using this method dynamically and get a +// compilation error otherwise. This removes the macro and lets us fall +// back to the C-API underneath again. +#undef rb_define_method_id // Define a method and attach data to it. // The method looks to ruby like a normal aliased CFUNC, with a modified @@ -75,9 +81,9 @@ rb_ivar_set(store, id, data); // Create the aliased method on the origin class - rb_define_method( + rb_define_method_id( klass, - rb_id2name(id), + id, cfunc, arity); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rice/detail/ruby_version_code.hpp new/rice/detail/ruby_version_code.hpp --- old/rice/detail/ruby_version_code.hpp 2019-02-28 18:46:34.000000000 +0100 +++ new/rice/detail/ruby_version_code.hpp 2020-01-11 02:55:14.000000000 +0100 @@ -1,6 +1,6 @@ #ifndef Rice__detail__ruby_version_code__hpp #define Rice__detail__ruby_version_code__hpp -#define RICE__RUBY_VERSION_CODE 253 +#define RICE__RUBY_VERSION_CODE 270 #endif // Rice__detail__ruby_version_code__hpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rice/to_from_ruby.ipp new/rice/to_from_ruby.ipp --- old/rice/to_from_ruby.ipp 2019-02-28 18:46:34.000000000 +0100 +++ new/rice/to_from_ruby.ipp 2020-01-11 02:55:14.000000000 +0100 @@ -23,6 +23,37 @@ { namespace detail { + inline short num2short(VALUE x) + { + return NUM2SHORT(x); + } + + inline VALUE short2num(short x) + { + return INT2NUM(x); + } + } +} + +template<> +inline +short from_ruby<short>(Rice::Object x) +{ + return Rice::detail::num2short(x); +} + +template<> +inline +Rice::Object to_ruby<short>(short const & x) +{ + return Rice::protect(Rice::detail::short2num, x); +} + +// --------------------------------------------------------------------- +namespace Rice +{ + namespace detail + { inline int num2int(VALUE x) { return NUM2INT(x); @@ -85,6 +116,68 @@ { namespace detail { + inline long long num2longlong(VALUE x) + { + return NUM2LL(x); + } + + inline VALUE longlong2num(long long x) + { + return LL2NUM(x); + } + } +} + +template<> +inline +long long from_ruby<long long>(Rice::Object x) +{ + return Rice::protect(Rice::detail::num2longlong, x); +} + +template<> +inline +Rice::Object to_ruby<long long>(long long const & x) +{ + return Rice::protect(Rice::detail::longlong2num, x); +} + +// --------------------------------------------------------------------- +namespace Rice +{ + namespace detail + { + inline unsigned short num2ushort(VALUE x) + { + return NUM2USHORT(x); + } + + inline VALUE ushort2num(unsigned short x) + { + return UINT2NUM(x); + } + } +} + +template<> +inline +unsigned short from_ruby<unsigned short>(Rice::Object x) +{ + return Rice::detail::num2ushort(x); +} + +template<> +inline +Rice::Object to_ruby<unsigned short>(unsigned short const & x) +{ + return Rice::protect(Rice::detail::ushort2num, x); +} + +// --------------------------------------------------------------------- +namespace Rice +{ + namespace detail + { inline unsigned int num2uint(VALUE x) { return NUM2UINT(x); @@ -143,6 +236,37 @@ } // --------------------------------------------------------------------- +namespace Rice +{ + namespace detail + { + inline unsigned long long num2ulonglong(VALUE x) + { + return NUM2ULL(x); + } + + inline VALUE ulonglong2num(unsigned long long x) + { + return ULL2NUM(x); + } + } +} + +template<> +inline +unsigned long long from_ruby<unsigned long long>(Rice::Object x) +{ + return Rice::protect(Rice::detail::num2ulonglong, x); +} + +template<> +inline +Rice::Object to_ruby<unsigned long long>(unsigned long long const & x) +{ + return Rice::protect(Rice::detail::ulonglong2num, x); +} + +// --------------------------------------------------------------------- template<> inline bool from_ruby<bool>(Rice::Object x) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ruby/lib/version.rb new/ruby/lib/version.rb --- old/ruby/lib/version.rb 2019-02-28 18:46:34.000000000 +0100 +++ new/ruby/lib/version.rb 2020-01-11 02:55:14.000000000 +0100 @@ -1,3 +1,3 @@ module Rice - VERSION = "2.1.3" + VERSION = "2.2.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_To_From_Ruby.cpp new/test/test_To_From_Ruby.cpp --- old/test/test_To_From_Ruby.cpp 2019-02-28 18:46:34.000000000 +0100 +++ new/test/test_To_From_Ruby.cpp 2020-01-11 02:55:14.000000000 +0100 @@ -27,6 +27,32 @@ ASSERT_EQUAL(o.value(), from_ruby<Object>(o).value()); } +TESTCASE(short_to_ruby) +{ + ASSERT_EQUAL(INT2NUM(0), to_ruby((short)0).value()); + ASSERT_EQUAL(INT2NUM(-1), to_ruby((short)-1).value()); + ASSERT_EQUAL(INT2NUM(1), to_ruby((short)1).value()); + ASSERT_EQUAL( + Object(INT2NUM(std::numeric_limits<short>::min())), + to_ruby(std::numeric_limits<short>::min())); + ASSERT_EQUAL( + Object(INT2NUM(std::numeric_limits<short>::max())), + to_ruby(std::numeric_limits<short>::max())); +} + +TESTCASE(short_from_ruby) +{ + ASSERT_EQUAL(0, from_ruby<short>(INT2NUM(0))); + ASSERT_EQUAL(-1, from_ruby<short>(INT2NUM(-1))); + ASSERT_EQUAL(1, from_ruby<short>(INT2NUM(1))); + ASSERT_EQUAL( + std::numeric_limits<short>::min(), + from_ruby<short>(INT2NUM(std::numeric_limits<short>::min()))); + ASSERT_EQUAL( + std::numeric_limits<short>::max(), + from_ruby<short>(INT2NUM(std::numeric_limits<short>::max()))); +} + TESTCASE(int_to_ruby) { ASSERT_EQUAL(INT2NUM(0), to_ruby((int)0).value()); @@ -91,6 +117,56 @@ from_ruby<long>(LONG2NUM(std::numeric_limits<long>::max()))); } +TESTCASE(long_long_to_ruby) +{ + ASSERT_EQUAL(LL2NUM(0), to_ruby((long long)0).value()); + ASSERT_EQUAL(LL2NUM(-1), to_ruby((long long)-1).value()); + ASSERT_EQUAL(LL2NUM(1), to_ruby((long long)1).value()); + ASSERT_EQUAL( + Object(LL2NUM(std::numeric_limits<long long>::min())), + to_ruby(std::numeric_limits<long long>::min())); + ASSERT_EQUAL( + Object(LL2NUM(std::numeric_limits<long long>::max())), + to_ruby(std::numeric_limits<long long>::max())); +} + +TESTCASE(long_long_from_ruby) +{ + ASSERT_EQUAL(0, from_ruby<long long>(LL2NUM(0))); + ASSERT_EQUAL(-1, from_ruby<long long>(LL2NUM(-1))); + ASSERT_EQUAL(1, from_ruby<long long>(LL2NUM(1))); + ASSERT_EQUAL( + std::numeric_limits<long long>::min(), + from_ruby<long long>(LL2NUM(std::numeric_limits<long long>::min()))); + ASSERT_EQUAL( + std::numeric_limits<long long>::max(), + from_ruby<long long>(LL2NUM(std::numeric_limits<long long>::max()))); +} + +TESTCASE(unsigned_short_to_ruby) +{ + ASSERT_EQUAL(UINT2NUM(0), to_ruby((unsigned short)0).value()); + ASSERT_EQUAL(UINT2NUM(1), to_ruby((unsigned short)1).value()); + ASSERT_EQUAL( + Object(UINT2NUM(std::numeric_limits<unsigned short>::min())), + to_ruby(std::numeric_limits<unsigned short>::min())); + ASSERT_EQUAL( + Object(UINT2NUM(std::numeric_limits<unsigned short>::max())), + to_ruby(std::numeric_limits<unsigned short>::max())); +} + +TESTCASE(unsigned_short_from_ruby) +{ + ASSERT_EQUAL(0u, from_ruby<unsigned short>(UINT2NUM(0))); + ASSERT_EQUAL(1u, from_ruby<unsigned short>(UINT2NUM(1))); + ASSERT_EQUAL( + std::numeric_limits<unsigned short>::min(), + from_ruby<unsigned short>(UINT2NUM(std::numeric_limits<unsigned short>::min()))); + ASSERT_EQUAL( + std::numeric_limits<unsigned short>::max(), + from_ruby<unsigned short>(UINT2NUM(std::numeric_limits<unsigned short>::max()))); +} + TESTCASE(unsigned_int_to_ruby) { ASSERT_EQUAL(UINT2NUM(0), to_ruby((unsigned int)0).value()); @@ -145,6 +221,30 @@ from_ruby<unsigned long>(ULONG2NUM(std::numeric_limits<unsigned long>::max()))); } +TESTCASE(unsigned_long_long_to_ruby) +{ + ASSERT_EQUAL(ULL2NUM(0), to_ruby((unsigned long long)0).value()); + ASSERT_EQUAL(ULL2NUM(1), to_ruby((unsigned long long)1).value()); + ASSERT_EQUAL( + Object(ULL2NUM(std::numeric_limits<unsigned long long>::min())), + to_ruby(std::numeric_limits<unsigned long long>::min())); + ASSERT_EQUAL( + Object(ULL2NUM(std::numeric_limits<unsigned long long>::max())), + to_ruby(std::numeric_limits<unsigned long long>::max())); +} + +TESTCASE(unsigned_long_long_from_ruby) +{ + ASSERT_EQUAL(0u, from_ruby<unsigned long>(ULL2NUM(0))); + ASSERT_EQUAL(1u, from_ruby<unsigned long>(ULL2NUM(1))); + ASSERT_EQUAL( + std::numeric_limits<unsigned long long>::min(), + from_ruby<unsigned long long>(ULL2NUM(std::numeric_limits<unsigned long long>::min()))); + ASSERT_EQUAL( + std::numeric_limits<unsigned long long>::max(), + from_ruby<unsigned long long>(ULL2NUM(std::numeric_limits<unsigned long long>::max()))); +} + TESTCASE(bool_to_ruby) { ASSERT_EQUAL(Qfalse, to_ruby(false).value());
