Parent

Methods

Included Modules

Warbler::Task

Warbler Rake task. Allows defining multiple configurations inside the same Rakefile by using different task names.

To define multiple Warbler configurations in a single project, use code like the following in a Rakefile:

Warbler::Task.new("war1", Warbler::Config.new do |config|
  config.jar_name = "war1"
  # ...
end
Warbler::Task.new("war2", Warbler::Config.new do |config|
  config.jar_name = "war2"
  # ...
end

With this setup, you can create two separate war files two different configurations by running rake war1 war2.

Attributes

config[RW]
jar[RW]
name[RW]

Task name

war[RW]

Public Class Methods

new(name = nil, config = nil) click to toggle source
# File lib/warbler/task.rb, line 43
def initialize(name = nil, config = nil)
  @config = config
  if @config.nil? && File.exists?(Config::FILE)
    @config = eval(File.open(Config::FILE) {|f| f.read})
  end
  @config ||= Config.new
  unless @config.kind_of? Config
    $stderr.puts "Warbler::Config not provided by override in initializer or #{Config::FILE}; using defaults"
    @config = Config.new
  end
  @name = name || @config.jar_extension
  @jar = Warbler::Jar.new
  yield self if block_given?
  define_tasks
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.