Skip to content

Commit

Permalink
Provide own native gems for Ruby 2.6 and Protobuf.
Browse files Browse the repository at this point in the history
This allows mutation/testing on Ruby 2.6.

Related:
https://twitter.com/pawelpacana/status/1080576829872844801
protocolbuffers/protobuf#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
  • Loading branch information
mostlyobvious committed Jan 2, 2019
1 parent 9e7c195 commit 67329cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions lib/protobuf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def require_protobuf_dependencies
end

def unsupported_ruby_version
truffleruby || jruby || ruby_2_6_0
truffleruby || jruby
end

def truffleruby
Expand All @@ -19,8 +19,4 @@ def truffleruby
def jruby
RUBY_PLATFORM == "java"
end

def ruby_2_6_0
RUBY_VERSION == "2.6.0"
end
end
2 changes: 1 addition & 1 deletion rails_event_store/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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']
4 changes: 2 additions & 2 deletions ruby_event_store/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
gem 'google-protobuf', '= 3.6.1', source: 'https://gem.fury.io/pawelpacana/'
gem 'activesupport', '~> 5.0'

0 comments on commit 67329cd

Please sign in to comment.