File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33Gem ::Specification . new do |s |
44 s . name = 'jruby-openssl'
55
6- path = File . expand_path ( 'lib/jopenssl/version.rb' , File . dirname ( __FILE__ ) )
7- s . version = File . read ( path ) . match ( /.*VERSION\s *=\s *['"](.*)['"]/m ) [ 1 ]
6+ version_rb = File . expand_path ( 'lib/jopenssl/version.rb' , File . dirname ( __FILE__ ) )
7+ version_rb = File . read ( version_rb )
8+ s . version = version_rb . match ( /.*VERSION\s *=\s *['"](.*)['"]/m ) [ 1 ]
89
910 s . platform = 'java'
1011 s . authors = [ 'Ola Bini' , 'JRuby contributors' ]
@@ -21,8 +22,11 @@ Gem::Specification.new do |s|
2122 select { |f | f =~ /^(lib)/ || f =~ /^History|LICENSE|README|Rakefile/i } +
2223 Dir . glob ( 'lib/**/*.jar' ) # 'lib/jopenssl.jar' and potentially BC jars
2324
24- s . requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{ Jopenssl ::Version ::BOUNCY_CASTLE_VERSION } "
25- s . requirements << "jar org.bouncycastle:bcprov-jdk15on, #{ Jopenssl ::Version ::BOUNCY_CASTLE_VERSION } "
25+ bc_version = version_rb . match ( /.*BOUNCY_CASTLE_VERSION\s *=\s *['"](.*)['"]/m ) [ 1 ]
26+ raise 'BOUNCY_CASTLE_VERSION not matched' if ( bc_version || '' ) . empty?
27+
28+ s . requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{ bc_version } "
29+ s . requirements << "jar org.bouncycastle:bcprov-jdk15on, #{ bc_version } "
2630
2731 s . add_development_dependency 'jar-dependencies' , '~> 0.1.0'
2832
You can’t perform that action at this time.
0 commit comments