Sha256: f814216bba48ec373573d386fc3ff9b6483e0920c6c3f018d04e5040968548bf

Contents?: true

Size: 672 Bytes

Versions: 4

Compression:

Stored size: 672 Bytes

Contents

def exit_msg(msg, code=1)
  puts msg
  exit(code)
end
def run command
  res = `#{command}`
  if $?.exitstatus != 0
    exit_msg(
      "\nfailure on command:\n  #{command.chomp}\nresult:\n  #{res}\n",
      $?.exitstatus
    )
  end
  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

4 entries across 4 versions & 2 rubygems

Version Path
gregwebs-quicktest-0.6.2 tasks/helpers.rb
quicktest-0.5.7 tasks/helpers.rb
quicktest-0.6.0 tasks/helpers.rb
quicktest-0.6.1 tasks/helpers.rb