Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b96f4e3f80
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (57 sloc) 1.706 kb
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
require 'yard'
require 'yard/rake/yardoc_task'
load File.expand_path("../tasks/remove_task.rake", __FILE__)
require 'ci/reporter/rake/rspec'
RSpec::Core::RakeTask.new do |t|
t.pattern = "spec/**/*_spec.rb"
end
task :spec => [:compile]
desc "Remove the compiled artifacts"
task :clean do
Dir['**/*.class'].each { |fn| rm_rf fn }
end
desc "Compile the java adapter code"
task :compile do
puts "Compiling java support code"
jars = Dir['lib/ladle/apacheds/*.jar'].collect { |fn| File.expand_path(fn) }
javac = ENV['JAVA_HOME'] ? ENV['JAVA_HOME'] + "/bin/javac" : "javac"
one_cmd(
javac, '-cp', "'#{jars.join(':')}'",
('-verbose' if Rake.application.options.trace),
'lib/ladle/java/net/detailedbalance/ladle/*.java')
end
# build task is provided by bundler's gem helper
task :build => [:clean, :compile]
remove_task(:release)
desc "Release both the Ruby and JRuby variants of Ladle"
task :release do
system("rake -f meta.rakefile release")
end
desc "Run the yard server with automatic reloading enabled"
task :yard => ['yard:auto']
namespace :yard do
YARD::Rake::YardocTask.new(:once) do |t|
t.options = ["--title", "Ladle #{Ladle::VERSION}"]
end
task :auto do
one_cmd("bundle exec yard server --reload")
end
desc "Remove the YARD cache and the generated docs"
task :clean do
rm_rf '.yardoc'
rm_rf 'doc'
end
end
namespace :ci do
ENV["CI_REPORTS"] = "reports/spec-xml"
desc "Run specs for CI"
task :spec => ['ci:setup:rspec', 'rake:spec']
end
def one_cmd(*cmd)
str = cmd.compact.join(' ')
puts str if Rake.application.options.trace
system(str)
end
Jump to Line
Something went wrong with that request. Please try again.