devboy/buildr_as3 — pull request #43 by thejustinwalsh (2012-03-02 19:01:36+00:00)
Title: Feature/flexsdk

This feature adds in support for overriding the target FlexSDK's playerglobal.swc and bundled Air SDK. It is useful for building against incubator, beta, and release candidate builds of the Flash Player and Adobe Air.

```ruby
# The latest Flash Player 11.2 Release Candidate
player = Player.new("11.2 RC 1", "15").from("http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer11-2/flashplayer11-2_p6_playerglobal_022712.swc")

# The latest Adobe Air 3.2 Release Candidate
airsdk = AirSDK.new("3.2 RC 1").from("http://download.macromedia.com/pub/labs/flashplatformruntimes/air3-2/air3-2_p6_sdk_mac_022712.tbz2")

# Override the Player and Air SDK in the 4.6.0.23201B Flex SDK
flexsdk = FlexSDK.new("4.6.0.23201B", {:player => player, :airsdk => airsdk})

# Override the Player in the 4.6.0.23201B Flex SDK
flexsdk = FlexSDK.new("4.6.0.23201B", {:player => player})

# Override the Air SDK in the 4.6.0.23201B Flex SDK
flexsdk = FlexSDK.new("4.6.0.23201B", {:airsdk => airsdk})

# Override nothing 4.6.0.23201B Flex SDK
flexsdk = FlexSDK.new("4.6.0.23201B")
```
Instead of merging the SDKs on disk and creating duplicates of all the data within, this feature generates the a custom flex-config.xml, air-config.xml, and airmobile-config.xml for you using fully qualified paths within the config and replacing the paths w/ the proper path based on your setup.

### TODO:
- Config files are generated every-time you build, I don't think I understand the Artifact syntax for versioning, and the [Artifact::content / install method](http://buildr.apache.org/rdoc/classes/Buildr/Artifact.html) was throwing about to_str being undefined on my passed in content?

- The Toolkit base needed to understand how to extract tar.bz2 / tbz2 files, I feel like Buildr::Zip should be smart enough to figure this out, however it looks like that path was previously abandoned. I ended up checking the URL for the extension to know what decompression scheme to run.