lib/flashsdk/asdoc.rb in flashsdk-1.0.26.pre vs lib/flashsdk/asdoc.rb in flashsdk-1.0.27.pre

- old
+ new

@@ -99,11 +99,11 @@ # File containing description for packages. add_param :package_description_file, Files ## # Specifies a description for a package name. - add_param :package, Path + add_param :package, Strings, { :delimiter => ' ' } ## # Path for custom templates. add_param :templates_path, Path @@ -117,15 +117,25 @@ def execute # Never use fcsh for asdoc # (overused inheritance smell) self.use_fcsh = false - start = Time.now - super - duration = (Time.now - start).seconds + duration = Benchmark.measure { super } Sprout.stdout.puts "[ASDOC] Creation complete in #{duration} seconds." end + protected + + ## + # Override the default behavior that creates a file task, + # and create a 'task' instead. This will force the docs + # to get recreated with every run, instead of failing to + # create when the outer folder still exists. + def create_outer_task *args + task *args do + execute + end + end end end ## # Create a new Rake::File task that will execute {FlashSDK::AsDoc}.