Sha256: 2030b4c94c0f9cb21c3db0cec2118506d7a370351e69b39478fd90efe0747fd4
Contents?: true
Size: 1.85 KB
Versions: 4
Compression:
Stored size: 1.85 KB
Contents
puts_debug "read " + __FILE__.foreground(:green) require 'rake' if("#{RUBY_VERSION}">"1.9.1") include Rake::DSL end def task_start(task_name) puts " " puts "[:#{task_name}]".foreground(:yellow).bright end task :clean do; task_start "clean"; end task :clobber do; task_start "clobber"; end require 'rake/clean' CLEAN.include('*.gem','doc/*','obj/*','*.taskstamp') CLOBBER.include('doc','obj') def generate_tasks(project) task_hash = { :info=> { :desc=> 'display information about the rakefile' }, :compile=> { :desc=> 'compile' }, :test=> { :desc=> 'run unit tests' }, :commit=> { :desc=> 'commit' }, :replace=> { :desc=> 'replace text' }, :loc=> { :desc=> 'count the lines of code' }, :setup=> { :desc=> 'setup the project environment' }, :pull=> { :desc=> 'rake working copies of dependencies' }, :check=> { :desc=> 'checks if the project default task may be skipped' } } if project[:type]=="gem" || project[:type]=="ruby" task_hash[:features] = { :desc=> 'tests cucumber features' } end if("#{RUBY_VERSION}">"1.9.1") task_hash.each do |k,v| name=k.to_s desc=nil desc=v[:desc] if v.has_key?(:desc) ruby="task :#{name} do; task_start '#{name}'; PROJECT.#{name}; end" ruby="desc '#{desc}'; " + ruby unless desc.nil? unless task_defined(name) puts_debug "defining task " + name eval(ruby) end end end end if("#{RUBY_VERSION}"<="1.9.1") task :setup do; puts "upgrade to ruby 1.9.3!" ; end task :compile do; puts "upgrade to ruby 1.9.3!"; end task :test do; puts "upgrade to ruby 1.9.3!"; end task :commit do; puts "upgrade to ruby 1.9.3!"; end task :replace do; puts "upgrade to ruby 1.9.3!"; end task :loc do; puts "upgrade to ruby 1.9.3!"; end task :setup do; puts "upgrade to ruby 1.9.3!"; end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dev-1.0.18 | lib/dev/Tasks.rb |
dev-1.0.17 | lib/dev/Tasks.rb |
dev-1.0.16 | lib/dev/Tasks.rb |
dev-1.0.15 | lib/dev/Tasks.rb |