Skip to content

Commit bb99e88

Browse files
committed
Update releasing, remove patches
1 parent eae24ea commit bb99e88

File tree

2 files changed

+9
-45
lines changed

2 files changed

+9
-45
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gem 'concurrent-ruby-ext', Concurrent::VERSION, options.merge(platform: :mri)
1111

1212
group :development do
1313
gem 'rake', '~> 12.0'
14-
gem 'rake-compiler', '~> 1.0'
14+
gem 'rake-compiler', '~> 1.0', '>= 1.0.7'
1515
gem 'rake-compiler-dock', '~> 0.7.0'
1616
gem 'pry', '~> 0.11', platforms: :mri
1717
end

Rakefile

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,7 @@ edge_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-edge.
1818

1919
require 'rake/javaextensiontask'
2020

21-
class ConcurrentRubyJavaExtensionTask < Rake::JavaExtensionTask
22-
def java_classpath_arg(*args)
23-
jruby_cpath = nil
24-
25-
if RUBY_PLATFORM =~ /java/
26-
begin
27-
cpath = Java::java.lang.System.getProperty('java.class.path').split(File::PATH_SEPARATOR)
28-
cpath += Java::java.lang.System.getProperty('sun.boot.class.path').split(File::PATH_SEPARATOR)
29-
jruby_cpath = cpath.compact.join(File::PATH_SEPARATOR)
30-
rescue => e
31-
end
32-
33-
unless jruby_cpath
34-
libdir = RbConfig::CONFIG['libdir']
35-
if libdir.start_with? "classpath:"
36-
raise 'Cannot build with jruby-complete'
37-
end
38-
jruby_cpath = File.join(libdir, "jruby.jar")
39-
end
40-
end
41-
42-
unless jruby_cpath
43-
jruby_home = ENV['JRUBY_HOME']
44-
if jruby_home
45-
candidate = File.join(jruby_home, 'lib', 'jruby.jar')
46-
jruby_cpath = candidate if File.exist? candidate
47-
end
48-
end
49-
50-
raise "jruby.jar path not found" unless jruby_cpath
51-
52-
jruby_cpath += File::PATH_SEPARATOR + args.join(File::PATH_SEPARATOR) unless args.empty?
53-
jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
54-
end
55-
end
56-
57-
ConcurrentRubyJavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext|
21+
Rake::JavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext|
5822
ext.ext_dir = 'ext/concurrent-ruby'
5923
ext.lib_dir = 'lib/concurrent'
6024
end
@@ -81,7 +45,8 @@ namespace :repackage do
8145
sh 'bundle package'
8246

8347
# build only the jar file not the whole gem for java platform, the jar is part the concurrent-ruby-x.y.z.gem
84-
RakeCompilerDock.sh 'bundle install --local && bundle exec rake lib/concurrent/concurrent_ruby.jar --trace', rubyvm: :jruby
48+
Rake::Task['lib/concurrent/concurrent_ruby.jar'].invoke
49+
8550
# build all gem files
8651
RakeCompilerDock.sh 'bundle install --local && bundle exec rake cross native package --trace'
8752
end
@@ -103,15 +68,14 @@ begin
10368

10469
RSpec::Core::RakeTask.new(:spec)
10570

106-
options = %w[ --color
107-
--backtrace
108-
--seed 1
109-
--format documentation
110-
--tag ~notravis ]
111-
11271
namespace :spec do
11372
desc '* Configured for ci'
11473
RSpec::Core::RakeTask.new(:ci) do |t|
74+
options = %w[ --color
75+
--backtrace
76+
--order defined
77+
--format documentation
78+
--tag ~notravis ]
11579
t.rspec_opts = [*options].join(' ')
11680
end
11781

0 commit comments

Comments
 (0)