Sha256: 87ac26111dc03191d861284aa34dfd475eed386854b2f22ed6a7fcebb8e48f60

Contents?: true

Size: 613 Bytes

Versions: 13

Compression:

Stored size: 613 Bytes

Contents

# Simple demo Rakefile to autorun samples in current directory
# adjust path to rp5 executable, and or opts as required

SAMPLES_DIR = './'

desc 'run demo'
task default: [:demo]

desc 'demo'
task :demo do
  samples_list.shuffle.each { |sample| run_sample sample }
end

def samples_list
  files = []
  Dir.chdir(SAMPLES_DIR)
  Dir.glob('*.rb').each do |file|
    files << File.join(SAMPLES_DIR, file)
  end
  files
end

def run_sample(sample_name)
  puts "Running #{sample_name}...quit to run next sample"
  open("|k9 --run #{sample_name}", 'r') do |io|
    while l = io.gets
      puts(l.chop)
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
toxiclibs-2.1.0 examples/Rakefile
toxiclibs-2.0.0 examples/Rakefile
pbox2d-1.0.3-java examples/Rakefile
toxiclibs-1.0.0 examples/Rakefile
pbox2d-1.0.2-java examples/Rakefile
pbox2d-1.0.1-java examples/Rakefile
toxiclibs-0.9.3 examples/Rakefile
pbox2d-1.0.0-java examples/Rakefile
toxiclibs-0.9.2 examples/Rakefile
toxiclibs-0.9.1 examples/Rakefile
pbox2d-0.9.1-java examples/Rakefile
pbox2d-0.9.0-java examples/Rakefile
toxiclibs-0.9.0 examples/Rakefile