Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

• Adding file options.

This means it is now possible to define a sequence of directories, and the files they contain,
to be included in the packaging task.
  • Loading branch information...
commit 4005c604523b4d522d5c50ba79f4653db6b47296 1 parent d07ce8c
@simongregory simongregory authored
Showing with 35 additions and 1 deletion.
  1. +15 −1 lib/flashsdk/adt.rb
  2. +20 −0 test/unit/adt_test.rb
View
16 lib/flashsdk/adt.rb
@@ -228,6 +228,21 @@ class ADT < Sprout::Executable::Base
# they will not be included.
#
add_param :included_paths, Paths, { :hidden_name => true }
+
+ ##
+ # Allows file options in the form of -C <dir> <fileOrDir>+
+ #
+ # For example if you defined:
+ #
+ # t.file_options << 'dir path/to/asset.xml'
+ #
+ # In your adt task defintion, then:
+ #
+ # -C dir path/to/asset.xml
+ #
+ # Would be appended to your arguments.
+ #
+ add_param :file_options, Strings, { :shell_name => '-C', :delimiter => ' ' }
##
# The the Ruby file that will load the expected
@@ -258,4 +273,3 @@ def adt *args, &block
exe.to_rake(*args, &block)
exe
end
-
View
20 test/unit/adt_test.rb
@@ -45,6 +45,26 @@ class ADTTest < Test::Unit::TestCase
#assert_file @expected_output
end
end
+
+ should "package a SWF and complex assets with an application.xml" do
+ as_a_unix_system do
+ t = adt @expected_output do |t|
+ t.package = true
+ t.target = @target
+ t.package_input = @application_xml
+ t.package_output = @expected_output
+ t.storetype = 'PKCS12'
+ t.keystore = @certificate
+ t.storepass = @cert_password
+ t.included_files << @swf_input
+ t.file_options << 'bin path/to/asset.xml'
+ end
+ assert_equal "-package -target #{@target} -storetype PKCS12 -keystore test/fixtures/air/simple/SomeProject.pfx -storepass samplePassword test/fixtures/air/simple/SomeProject.air test/fixtures/air/simple/SomeProject.xml test/fixtures/air/simple/SomeProject.swf -C bin path/to/asset.xml", t.to_shell
+
+ #t.execute
+ #assert_file @expected_output
+ end
+ end
should "package an iOS swf with a provisioning profile" do
as_a_unix_system do
Please sign in to comment.
Something went wrong with that request. Please try again.