Commits

Anonymous committed 75fd184

[no commit message]

Comments (0)

Files changed (2)

flex_dev/install.rb

 # Install hook code here
 require "yaml"
-
+# Build properties map
 flex = {
 	"flex-bin" => "public", 
 	"flex-src" => "flex/src", 
 #prompt for flex home 
 puts "Please enter the Install directory of the FLEX SDK"
 flex["flex-home"] = gets
-Dir.chdir(File.join("..", ".."))
+#Dir.chdir(File.join("..", ".."))
+# write out properties file
 File.open(File.join("config", "flex.yml"), "w") do |f|
 	f.puts YAML::dump(flex)
 end
+# create flex directories
 Dir.mkdir("flex")
 Dir.mkdir(File.join("flex", "src"))
 Dir.mkdir(File.join("flex", "lib"))

flex_dev/tasks/flex_dev_tasks.rake

-# desc "Explaining what the task does"
-# task :flex_dev do
-#   # Task goes here
-# end
+require "yaml"
+namespace :flex do
+  desc "Build flex app in rails"
+  task :build do
+	# read the YAML file for Configuration
+	flex = YAML::load(File.open(File.join( "config", "flex.yml"))) 
+	# Build the command string
+  sep = File::SEPERATOR
+	command = "#{flex["flex_home"]}#{sep}bin#{sep}mxmlc "
+  sh command
+  end
+end