Skip to content

Commit

Permalink
Update gem spec to handle java
Browse files Browse the repository at this point in the history
  • Loading branch information
wallin committed Nov 15, 2016
1 parent 70cf108 commit 8156f63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3
2.3.1
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ rvm:
- 2.1.0
- 2.2.4
- 2.3.1
- jruby-9.1.3.0
before_install: gem install bundler -v 1.10.6
14 changes: 12 additions & 2 deletions tdigest.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'tdigest/version'

java = (ENV['RUBY_PLATFORM'] == 'java')

Gem::Specification.new do |spec|
spec.name = "tdigest"
spec.version = TDigest::VERSION
spec.authors = ["Sebastian Wallin"]
spec.email = ["sebastian.wallin@gmail.com"]

spec.summary = %q{Ruby implementation of Dunning's T-Digest for streaming quantile approximation}
spec.summary = %q{TDigest for Ruby}
spec.description = %q{Ruby implementation of Dunning's T-Digest for streaming quantile approximation}
spec.homepage = "https://github.com/castle/tdigest"
spec.license = "MIT"
Expand All @@ -18,12 +20,20 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.platform = java ? 'java' : 'ruby'


if java
spec.add_runtime_dependency 'rbtree-jruby', '~> 0.2.1'
else
spec.add_runtime_dependency 'rbtree', '~> 0.4.2'
end

spec.add_runtime_dependency 'rbtree', '~> 0.4.2'

spec.add_development_dependency 'bundler', '~> 1.10'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'minitest', '~> 5.8.3'
spec.add_development_dependency 'minitest', '~> 5.8'
spec.add_development_dependency 'coveralls', '~> 0.8.10'
spec.add_development_dependency 'simplecov', '~> 0.11.1'
end

0 comments on commit 8156f63

Please sign in to comment.