Sha256: 93cf7c68df58366ff9d56fc5b80ced8c811afc8776d0654383e7c668582ade74

Contents?: true

Size: 1.45 KB

Versions: 15

Compression:

Stored size: 1.45 KB

Contents

module Sprout

  
  # The MXMLCCruise helper wraps up the fdb and mxmlc unit test tasks by
  # using either a Singleton or provided ProjectModel instance.
  #
  # The simple case that uses a Singleton ProjectModel:
  #   ci :cruise
  #
  # Using a specific ProjectModel instance:
  #   project_model :model
  #
  #   ci :cruise => :model
  #
  # Configuring the proxied MXMLCTask
  #   ci :cruise do |t|
  #     t.link_report = 'LinkReport.rpt'
  #   end
  #
  class MXMLCCruise < MXMLCHelper
    attr_accessor :kill_on_fault # hack b/c of problems with rake task names and incestuous helpers

    def initialize(args, &block)
      super
      library :asunit3
      
      mxmlc output do |t|
        configure_mxmlc t
        configure_mxmlc_application t
        t.debug = true
        t.prerequisites << :asunit3
        t.source_path << model.test_dir
        
        if(model.test_width && model.test_height)
          t.default_size = "#{model.test_width} #{model.test_height}"
        end

        yield t if block_given?
      end

      define_fdb
      t = define_outer_task
      t.prerequisites << output
      t.prerequisites << player_task_name
    end
    
    def create_output
      return "#{create_output_base}XMLRunner.swf"
    end

    def create_input
      input = super
      input.gsub!(/#{input_extension}$/, "XMLRunner#{input_extension}") 
      return input
    end
  
  end
end

def ci(args, &block)
  return Sprout::MXMLCCruise.new(args, &block)
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sprout-as3-bundle-1.0.37 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.36 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.32 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.31 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.29 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.30 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.20 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.14 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.11 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.10 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.12 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.21 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.23 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.24 lib/sprout/tasks/mxmlc_ci.rb
sprout-as3-bundle-1.0.22 lib/sprout/tasks/mxmlc_ci.rb