From 67329cda462dceee736307a5fc6e593794047440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pacana?= Date: Wed, 2 Jan 2019 22:30:45 +0100 Subject: [PATCH] Provide own native gems for Ruby 2.6 and Protobuf. This allows mutation/testing on Ruby 2.6. Related: https://twitter.com/pawelpacana/status/1080576829872844801 https://github.com/protocolbuffers/protobuf/issues/5161 Private source to be removed once there's an official update on rubygems.org. Building https://github.com/protocolbuffers/protobuf: 1. compile C++ version to have src/proto ready for use 2. on macos: rake build clobber_package gem gem:native 3. on linux: rake build clobber_package gem gem:native as well, but make sure to update rake-compiler* dependencies to newest ones, update RUBY_CC_VERSION to include 2.6.0 and disable non-linux from ext.cross_platform --- lib/protobuf_helper.rb | 6 +----- rails_event_store/Gemfile | 2 +- ruby_event_store/Gemfile | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/protobuf_helper.rb b/lib/protobuf_helper.rb index db66858522..02d88ce13e 100644 --- a/lib/protobuf_helper.rb +++ b/lib/protobuf_helper.rb @@ -9,7 +9,7 @@ def require_protobuf_dependencies end def unsupported_ruby_version - truffleruby || jruby || ruby_2_6_0 + truffleruby || jruby end def truffleruby @@ -19,8 +19,4 @@ def truffleruby def jruby RUBY_PLATFORM == "java" end - - def ruby_2_6_0 - RUBY_VERSION == "2.6.0" - end end diff --git a/rails_event_store/Gemfile b/rails_event_store/Gemfile index 2a18c7a3dd..ee29db2ded 100644 --- a/rails_event_store/Gemfile +++ b/rails_event_store/Gemfile @@ -12,6 +12,6 @@ gem 'protobuf_nested_struct' gem 'sidekiq' gem 'sqlite3' gem 'rack-test' -gem 'google-protobuf', '~> 3.5.1.2' +gem 'google-protobuf', '= 3.6.1', source: 'https://gem.fury.io/pawelpacana/' gem 'pry' gem 'rails', ENV['RAILS_VERSION'] \ No newline at end of file diff --git a/ruby_event_store/Gemfile b/ruby_event_store/Gemfile index 585650fc57..372bc4e2fb 100644 --- a/ruby_event_store/Gemfile +++ b/ruby_event_store/Gemfile @@ -7,5 +7,5 @@ gem 'protobuf_nested_struct' gem 'parser' gem 'unparser' gem 'astrolabe' -gem 'google-protobuf', '~> 3.5.1.2' -gem 'activesupport', '~> 5.0' \ No newline at end of file +gem 'google-protobuf', '= 3.6.1', source: 'https://gem.fury.io/pawelpacana/' +gem 'activesupport', '~> 5.0'