flex-sdk

Provides a Gemified wrapper for the FlexSDK, for building Flex applications in other projects.

Note: This Gem does not provide or redistribute the actual Flex SDK, only a way to download it and build against it in other projects.

Gem

Gem can be downloaded from RubyGems.org: https://rubygems.org/gems/flex-sdk

Installation

This gem is (or at least should be) included in a Gemfile for the project that requires the Flex SDK.

The Flex Project's Gemfile should have a line something like this:

gem "flex-sdk"

It could also probably be put in a "build" group. This would mean that Rails won't attempt to load it during normal operation, only during Rake tasks. Like this:

group :build do
  gem "flex-sdk"
end

Usage in Ruby

require 'flex-sdk'
...
flexsdk = FlexSDK.new
...
config = flexsdk.config
...
config["sdk_dir"]
=> "/Volumes/Data/git/flex-sdk/vendor/flex_sdk_3.5.0.12683"

flexsdk.download(config)
=> "Downloading SDK"
=>  "From: http://fpdownload.adobe.com/pub/flex/sdk/builds/flex3/flex_sdk_3.5.0.12683.zip"
=>  "To: /Volumes/Data/git/flex-sdk/vendor/flex_sdk_3.5.0.12683.zip"

flexsdk.unzip(config)
=> "Unzipping SDK"
=> "From: /Volumes/Data/git/flex-sdk/vendor/flex_sdk_3.5.0.12683.zip"
=> "To: /Volumes/Data/git/flex-sdk/vendor/flex_sdk_3.5.0.12683/"

Usage in Bash

To download and unzip the Flex SDK from Adobe site, into vendor/ in this Gem

bundle exec flex-sdk-prime

Report the installation path of the Flex SDK

bundle exec flex-sdk-path

Upgrading the SDK version used in this Gem

Edit config.yml and update the version number. Make sure that this is a valid version on the Adobe website. e.g:

sdk_ver: "3.5.0.12683"

Bump the version of this gem

rake version:bump:minor

Release

rake release

Copylocale

Once the SDK is downloaded, unzipped and copied in, this project (flex-sdk) has a method to do the copylocale thing.

In Ruby:

flexsdk.copylocale(config)

In Bash:

bundle exec flex-sdk-copylocale

In the old money, this is the same as doing:

(Old way) bin/copylocale en_US en_NZ