Source

atlassian-jruby-example-plugin / Rakefile

Full commit
require 'rake'
require 'rake/testtask'

Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['src/test/ruby/*test.rb']
  t.verbose = true
end

desc "Generate gem index in order to set up the load path properly"
task :generate_gem_index do
  index_file = ENV['index_file']
  gem_path = ENV['custom_gem_path']
  raise "rake generate_gem_index index_file=PATH_TO_INDEX_FILE" unless index_file && gem_path
  specs = "#{gem_path}/specifications"
  specs = Dir["#{specs}/*.gemspec"].map {|path| File.basename(path).gsub(/\.gemspec$/, '')}
  File.open(index_file, 'wb') do |f|
    f << specs.join("\n")
  end
end