Commit af4aa9bd authored by Josh Haberman's avatar Josh Haberman

Added support for binary gems.

parent bd8a4765
PATH PATH
remote: . remote: .
specs: specs:
google-protobuf (3.0.0.alpha.4.0) google-protobuf (3.0.0.alpha.5.0)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
...@@ -25,4 +25,4 @@ DEPENDENCIES ...@@ -25,4 +25,4 @@ DEPENDENCIES
test-unit test-unit
BUNDLED WITH BUNDLED WITH
1.10.6 1.11.2
...@@ -21,6 +21,11 @@ else ...@@ -21,6 +21,11 @@ else
ext.ext_dir = "ext/google/protobuf_c" ext.ext_dir = "ext/google/protobuf_c"
ext.lib_dir = "lib/google" ext.lib_dir = "lib/google"
end end
task 'gem:windows' do
require 'rake_compiler_dock'
RakeCompilerDock.sh "bundle && rake cross native gem"
end
end end
Gem::PackageTask.new(spec) do |pkg| Gem::PackageTask.new(spec) do |pkg|
......
...@@ -44,7 +44,11 @@ if RUBY_PLATFORM == "java" ...@@ -44,7 +44,11 @@ if RUBY_PLATFORM == "java"
require 'json' require 'json'
require 'google/protobuf_java' require 'google/protobuf_java'
else else
require 'google/protobuf_c' begin
require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c"
rescue LoadError
require 'google/protobuf_c'
end
end end
require 'google/protobuf/repeated_field' require 'google/protobuf/repeated_field'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment