Sha256: 59bccc3f85beb578fc08c069ab65005804b5d8c18cdf33fc0bcc22337b7111ce

Contents?: true

Size: 1.58 KB

Versions: 2

Compression:

Stored size: 1.58 KB

Contents

#!/usr/bin/env ruby
#
#--
# (c) Copyright 2007-2008 Sun Microsystems, Inc.
# See the file LICENSES.txt included with the distribution for
# software license details.
#++

require 'rubygems'
require 'rake'
require 'warbler'

application = Rake.application
application.standard_exception_handling do
  application.init

  Warbler::Task.new

  task :default => :war

  desc "Generate a configuration file to customize your war assembly"
  task :config do
    if File.exists?(Warbler::Config::FILE) && ENV["FORCE"].nil?
      warn "There's another bird sitting on my favorite branch"
      warn "(file '#{Warbler::Config::FILE}' already exists. Pass argument FORCE=1 to override)"
    elsif !File.directory?("config")
      warn "I'm confused; my favorite branch is missing"
      warn "(directory 'config' is missing)"
    else
      cp "#{Warbler::WARBLER_HOME}/generators/warble/templates/warble.rb", Warbler::Config::FILE
    end
  end

  desc "Unpack warbler as a plugin in your Rails application"
  task :pluginize do
    if !Dir["vendor/plugins/warbler*"].empty?
      warn "I found an old nest in vendor/plugins; please trash it so I can make a new one"
      warn "(directory vendor/plugins/warbler* exists)"
    elsif !File.directory?("vendor/plugins")
      warn "I can't find a place to build my nest"
      warn "(directory 'vendor/plugins' is missing)"
    else
      Dir.chdir("vendor/plugins") do
        ruby "-S", "gem", "unpack", "warbler"
      end
    end
  end

  desc "Display version of warbler"
  task :version do
    puts "Warbler version #{Warbler::VERSION}"
  end

  application.top_level
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
warbler-0.9.10 bin/warble
warbler-0.9.9 bin/warble