Sha256: ed81a6b6d4b21bb12883125d7349f3b08c699fcc104f2315361fa5e115a5e49f

Contents?: true

Size: 1.65 KB

Versions: 13

Compression:

Stored size: 1.65 KB

Contents

#
# Copyright (C) 2011 by Dominic Graefen / http://devboy.org
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

require "buildr"

class Buildr::Project

  def get_as3_output( is_test = false )
    compile_task = is_test ? test.compile : compile
    target = compile_task.target
    options = compile_task.options
    return compile_task.options[:output] if compile_task.options.has_key? :output
    return "#{target}/#{File.basename(options[:main].to_s, File.extname(options[:main].to_s))}.swf" if compile_task.packaging == :swf
    return "#{target}/#{name.gsub(":", "-")}.swc" if compile_task.packaging == :swc
    fail("Could not guess output file for #{name}")
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
buildr-as3-0.2.31.pre lib/buildr/as3/project.rb
buildr-as3-0.2.30.pre lib/buildr/as3/project.rb
buildr-as3-0.2.29.pre lib/buildr/as3/project.rb
buildr-as3-0.2.28.pre lib/buildr/as3/project.rb
buildr-as3-0.2.27.pre lib/buildr/as3/project.rb
buildr-as3-0.2.26.pre lib/buildr/as3/project.rb
buildr-as3-0.2.25.pre lib/buildr/as3/project.rb
buildr-as3-0.2.24.pre lib/buildr/as3/project.rb
buildr-as3-0.2.23.pre lib/buildr/as3/project.rb
buildr-as3-0.2.22.pre lib/buildr/as3/project.rb
buildr-as3-0.2.21.pre lib/buildr/as3/project.rb
buildr-as3-0.2.20.pre lib/buildr/as3/project.rb
buildr-as3-0.2.19 lib/buildr/as3/project.rb