lib/dev_tasks.rb in dev_tasks-0.0.163 vs lib/dev_tasks.rb in dev_tasks-0.0.164

- old
+ new

@@ -9,10 +9,11 @@ require_relative './console.rb' require_relative './timer.rb' require_relative './settings.rb' require_relative './text.rb' require_relative './svnexports.rb' +require_relative './logger.rb' CLEAN.include('log','bin/**/*.pdb') CLOBBER.include('bin','obj','TestResults','*.gem','bin/**/*.exe') class DevTasks < Hash @@ -82,25 +83,11 @@ def execute cmd self[:commands].execute_command cmd end def execute_task task - sym_task = task.to_sym - timer=Timer.new - Console.announce_task_start task - #self[:commands][sym_task].update if self[:commands][sym_task].respond_to? update - if(!self[:commands].has_key?(sym_task)) - puts "no commands discovered for task " + task - else - self[:commands][sym_task].update - self[:commands][sym_task].each {|c| self[:commands].execute_command(c) } - end - elapsed = timer.elapsed - if elapsed > 30 - elapsed_str="[" + "%.0f" %(elapsed) + "s]" - Console.announce_task_end task, elapsed_str - end + self[:commands].execute_task task end def define_task task_name if(!Rake::Task.task_defined?(task_name)) ruby="desc '#{task_name} task';task :#{task_name} do;DEV_TASKS.execute_task '#{task_name}';end" @@ -163,9 +150,10 @@ end desc 'dev_tasks default' task :default do Rake::Task[:dev_tasks_default].invoke + Logger.finalize end desc 'displays information about current rake directory' task :info do DEV_TASKS.update