Class: RakeRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber_rake_runner/rake_runner.rb

Class Method Summary collapse

Class Method Details

.invoke(task_name, *args) ⇒ Object



3
4
5
6
# File 'lib/cucumber_rake_runner/rake_runner.rb', line 3

def self.invoke(task_name, *args)
  RakeRunner.rake_application[task_name].invoke(*args)
  RakeRunner.rake_application[task_name].reenable
end

.rake_applicationObject



8
9
10
11
12
13
14
15
16
# File 'lib/cucumber_rake_runner/rake_runner.rb', line 8

def self.rake_application
  @rake_application ||= Rake.application.tap do |app|
    ARGV.clear # Necessary to remove command line parameters built
    # into jruby which are then parsed by the setup of the Rake
    # application object
    app.handle_options
    app.load_rakefile
  end
end