0
project.task('test:resources').tap do |res|
0
res.send :associate_with, project, bdd_dir
0
- project.path_to(:source, bdd_dir, :resources).tap { |dir| res
ources.from dir if File.exist?(dir) }
0
+ project.path_to(:source, bdd_dir, :resources).tap { |dir| res
es.from dir if File.exist?(dir) }
0
include TestFramework::JavaBDD
0
- REQUIRES = ['org.jruby:jruby-complete:jar:1.1']
0
+ REQUIRES.unshift 'org.jruby:jruby-complete:jar:1.1.1' unless RUBY_PLATFORM =~ /java/
0
TESTS_PATTERN = [ /_spec.rb$/ ]
0
OPTIONS = [:properties, :java_args]
0
def run(tests, dependencies) #:nodoc:
0
cmd_options = task.options.only(:properties, :java_args)
0
+ dependencies.push *Dir.glob(File.join(jruby_home, "lib/*.jar")) if RUBY_PLATFORM =~ /java/
0
cmd_options.update :classpath => dependencies, :project => task.project
0
# TODO: Setting up JRuby is something to do before running Buildr.
0
#install_gems(cmd_options)
0
ENV['CI_REPORTS'] = report_dir
0
jruby("-Ilib", "-S", "spec",
0
- #"--require", gem_path(task.project, "ci_reporter", "lib/ci/reporter/rake/rspec_loader"),
0
"--require", "ci/reporter/rake/rspec_loader",
0
"--format", "CI::Reporter::RSpecDoc", tests,
0
cmd_options.merge({:name => "RSpec"}))
0
- def jruby_home
(project)0
@jruby_home ||= RUBY_PLATFORM =~ /java/ ? Config::CONFIG['prefix'] : File.expand_path(".jruby", ENV['HOME'])
0
java_args << {} unless Hash === args.last
0
cmd_options = java_args.last
0
project = cmd_options.delete(:project)
0
- if RUBY_PLATFORM =~ /java/
0
- # when run from within JRuby, use jars in launched-JRuby's classpath rather than the
0
- cmd_options[:classpath].delete_if {|e| File.basename(e) =~ /^jruby-complete-.*\.jar$/ }
0
- cmd_options[:classpath].unshift *(java.lang.System.getProperty("java.class.path").split(File::PATH_SEPARATOR))
0
cmd_options[:java_args] ||= []
0
cmd_options[:java_args] << "-Xmx512m" unless cmd_options[:java_args].detect {|a| a =~ /^-Xmx/}
0
cmd_options[:properties] ||= {}
0
- cmd_options[:properties]["jruby.home"] = jruby_home
(project)0
+ cmd_options[:properties]["jruby.home"] = jruby_home
0
Java::Commands.java(*java_args)
Comments
No one has commented yet.