8000 Stub gemspec for JRuby · ruby/openssl@74ccaa5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 74ccaa5

Browse files
committed
Stub gemspec for JRuby
JRuby has its own implementation of the `openssl` library in jruby-openssl. The simplest way for us to allow 8000 users to set openssl as a gem dependency is to ship a stub gem that just depends on jruby-openssl. This patch adds that to the gemspec. Additional work may be required to fit this stub gem into the test and release process. See #20 for more details.
1 parent 79aa330 commit 74ccaa5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

openssl.gemspec

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ Gem::Specification.new do |spec|
88
spec.homepage = "https://github.com/ruby/openssl"
99
spec.license = "Ruby"
1010

11-
spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "LICENSE.txt"]
12-
spec.require_paths = ["lib"]
13-
spec.extensions = ["ext/openssl/extconf.rb"]
11+
if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
12+
spec.platform = "java"
13+
spec.files = []
14+
spec.add_runtime_dependency('jruby-openssl', '~> 0.14')
15+
else
16+
spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "LICENSE.txt"]
17+
spec.require_paths = ["lib"]
18+
spec.extensions = ["ext/openssl/extconf.rb"]
19+
end
1420

1521
spec.extra_rdoc_files = Dir["*.md"]
1622
spec.rdoc_options = ["--main", "README.md"]

0 commit comments

Comments
 (0)
0