Sha256: e05f1d220031c053829cba7aff02abd1b19577249cc97e6b1ec5506e5fd8175c
Contents?: true
Size: 1.15 KB
Versions: 34
Compression:
Stored size: 1.15 KB
Contents
module FlashPlayer class Task < Rake::Task attr_accessor :input attr_accessor :pkg_name attr_accessor :pkg_version ## # This is the Rake::Task constructor # signature... def initialize task_name, rake_application super @input = task_name @player = FlashPlayer::Executable.new @pkg_name = FlashPlayer::NAME @pkg_version = FlashPlayer::VERSION end def execute *args super update_input_if_necessary @player.input = input @player.fdb = use_fdb? @player.execute end def logger=(logger) @player.logger = logger end def logger @player.logger end private def use_fdb? # Check as string b/c this is # how the boolean value comes # accross the command line input. ENV['USE_FDB'].to_s == 'true' end def update_input_if_necessary return if input.match(/\.swf$/) prerequisites.each do |prereq| if(prereq.match(/\.swf$/)) self.input = prereq return end end end end end def flashplayer *args, &block FlashPlayer::Task.define_task *args, &block end
Version data entries
34 entries across 34 versions & 3 rubygems