bin/flok in flok-0.0.25 vs bin/flok in flok-0.0.26

- old
+ new

@@ -16,17 +16,18 @@ Dir.chdir File.dirname(path) do Flok::Project.create name end end - desc "build <platform>", "Build the products for a platform" - def build platform + desc "build", "Build the products for a platform" + def build + raise "$PLATFORM was not set" unless ENV['PLATFORM'] + platform = ENV['PLATFORM'] + #Create a products folder if it dosen't already exist Dir.mkdir("./products") unless File.exists?("./products") - ENV["PLATFORM"] = platform - #Go into the flok gem project local_products_path = File.join(Dir.pwd, "products") Dir.chdir(File.join(File.dirname(__FILE__), "../")) do #1. Use the rake task system('rake build:world') @@ -63,12 +64,14 @@ end end desc "server", "Monitors for changes within your flok application and triggers an automatic rebuild of ./products/* for a PLATFORM when something in ./app changes" include SpecHelpers #Contains sh2 - def server platform - ENV['PLATFORM'] = platform + def server + raise "$PLATFORM was not set" unless ENV['PLATFORM'] + platform = ENV['PLATFORM'] + #Ensure puts does something because it's on another thread $stdout.sync = true ########################################################################### #We execute two tasks that run at the same time, (1) the webrick hoster @@ -109,7 +112,5 @@ end end end FlokCLI.start(ARGV) - -