Sha256: 98f45db3951cd9e1da0bcc9e5cb8cbb056f700bb11177d2d2e86e46d8491ac14
Contents?: true
Size: 1.34 KB
Versions: 26
Compression:
Stored size: 1.34 KB
Contents
class String #:nodoc: def uncapitalize #:nodoc: "#{self[0..0].downcase}#{self[1..-1]}" end def any? size > 0 end end class ::Rake::SshDirPublisher # :nodoc: attr_reader :host, :remote_dir, :local_dir end class Echoe def self.silence if !ENV['VERBOSE'] stdout, stderr = $stdout.clone, $stderr.clone $stdout.reopen(File.new("#{Dir.tmpdir}/stdout.echoe", 'w')) $stderr.reopen(File.new("#{Dir.tmpdir}/stderr.echoe", 'w')) begin yield ensure $stdout.reopen(stdout) $stderr.reopen(stderr) end else yield end end end # Redefine instead of chain a Rake task # http://www.bigbold.com/snippets/posts/show/2032 module Rake module TaskManager def redefine_task(task_class, *args, &block) task_name, deps = resolve_args(args) task_name = task_class.scope_name(@scope, task_name) deps = [deps] unless deps.respond_to?(:to_ary) deps = deps.collect {|d| d.to_s } task = @tasks[task_name.to_s] = task_class.new(task_name, self) task.application = self task.send(:add_comment, @last_comment) @last_comment = nil task.enhance(deps, &block) task end end class Task class << self def redefine_task(*args, &block) Rake.application.redefine_task(self, *args, &block) end end end end
Version data entries
26 entries across 17 versions & 3 rubygems