Sha256: e1417f4eb037a700e6207b6a75bb9a55793721a6ed661d697c9cb373117a64fe
Contents?: true
Size: 582 Bytes
Versions: 2
Compression:
Stored size: 582 Bytes
Contents
def exit_msg(msg, code=1) puts msg exit(code) end def run command res = `#{command}` exit_msg res, $?.exitstatus if $?.exitstatus != 0 res end def out command (puts (run command)) end def cd_tmp Dir.mkdir 'tmp' unless File.directory? 'tmp' Dir.chdir('tmp') do |dir| yield dir end rm_rf 'tmp' end class IO def self.write( file, str ) self.open( file, 'w' ) { |fh| fh.print str } end def self.read_write( file, write_file=file ) self.write(write_file, (yield( self.read( file )))) end end Dir.glob('tasks/*.rake').sort.each {|fn| import fn}
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
methodchain-0.4.1 | tasks/helpers.rb |
methodchain-0.4.2 | tasks/helpers.rb |