Sha256: 3f69d73248ccdbaf02a0d2641d6cffd8c7817f195eda9df1712068bf85188335
Contents?: true
Size: 1.77 KB
Versions: 2
Compression:
Stored size: 1.77 KB
Contents
require 'rake' class Tasks #@@commands=nil @@quiet=false def self.quiet @@quiet end def self.execute value if(value.respond_to?(:execute)) value.update if value.respond_to?(:update) value.execute else if(value.is_a?(String)) puts `#{value}` else if(value.is_a?(Array)) value.each{|e| execute(e)} end end end end def self.execute_task task if(defined?(COMMANDS)) if(COMMANDS.has_key?(task)) puts "[:#{task}]" if(!Tasks.quiet) Tasks.execute(COMMANDS[task]) end end end end ['add','clobber','pull'].each{|name| require_relative("#{name}.rb")} require 'rake/clean' desc 'performs svn update' task :update do Tasks.execute_task :update; end desc 'performs setup commands' task :setup do Tasks.execute_task :setup;end desc 'performs build commands' task :build do Tasks.execute_task :build;end desc 'performs test commands' task :test => [:build] do Tasks.execute_task :test;end desc 'performs analyze commands' task :analyze do Tasks.execute_task :analyze;end desc 'performs documentation commands' task :doc do Tasks.execute_task :doc;end desc 'performs clean commands' task :clean do Tasks.execute_task :clean;end desc 'performs publish commands' task :publish do Tasks.execute_task :publish; end #desc 'performs clobber commands' #task :clobber => [:clean] do Tasks.execute_task :clobber;end desc 'commits source files to git or subversion' task :commit do Tasks.execute_task :commit;end desc 'performs a git push' task :push do Tasks.execute_task :push;end desc 'displays project info' task :info do if(defined?(INFO) && INFO.length > 0) puts "[:info]" if(!Tasks.quiet) INFO.each{|l|puts l} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev-2.0.141 | lib/tasks/tasks.rb |
dev-2.0.140 | lib/tasks/tasks.rb |