aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/google-protobuf.gemspec
diff options
context:
space:
mode:
authorGravatar Isaiah Peng <issaria@gmail.com>2014-12-24 15:48:41 +0100
committerGravatar Isaiah Peng <issaria@gmail.com>2015-03-10 23:14:08 +0100
commit27e2b57830c328b83286e055752bf92790587953 (patch)
tree6cf4de2cbcb24d53b2475ed15d6a61a98712685c /ruby/google-protobuf.gemspec
parenta5f7bb8ebb60d636c21c18ad2ffeda80e8f80a48 (diff)
add jruby support by protobuf-java reflection API
Diffstat (limited to 'ruby/google-protobuf.gemspec')
-rw-r--r--ruby/google-protobuf.gemspec27
1 files changed, 13 insertions, 14 deletions
diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec
index 371009bb..4c9449d2 100644
--- a/ruby/google-protobuf.gemspec
+++ b/ruby/google-protobuf.gemspec
@@ -1,10 +1,3 @@
-class << Gem::Specification
- def find_c_source(dir)
- `cd #{dir}; git ls-files "*.c" "*.h" extconf.rb Makefile`.split
- .map{|f| "#{dir}/#{f}"}
- end
-end
-
Gem::Specification.new do |s|
s.name = "google-protobuf"
s.version = "3.0.0.alpha.3.0.pre"
@@ -14,11 +7,17 @@ Gem::Specification.new do |s|
s.authors = ["Protobuf Authors"]
s.email = "protobuf@googlegroups.com"
s.require_paths = ["lib"]
- s.extensions = ["ext/google/protobuf_c/extconf.rb"]
- s.files = ["lib/google/protobuf.rb"] +
- # extension C source
- find_c_source("ext/google/protobuf_c")
- s.test_files = ["tests/basic.rb",
- "tests/stress.rb",
- "tests/generated_code_test.rb"]
+ s.files = ["lib/google/protobuf.rb"]
+ unless RUBY_PLATFORM == "java"
+ s.files += `git ls-files "*.c" "*.h" extconf.rb Makefile`.split
+ s.extensions= ["ext/google/protobuf_c/extconf.rb"]
+ else
+ s.files += ["lib/google/protobuf_java.jar"]
+ end
+ s.test_files = ["tests/basic.rb",
+ "tests/stress.rb",
+ "tests/generated_code_test.rb"]
+ s.add_development_dependency "rake-compiler"
+ s.add_development_dependency "test-unit"
+ s.add_development_dependency "rubygems-tasks"
end