Sha256: 5bd88b1daed060950f09e4af659d38f5f4f96bd3a35d0122cd5f960a494b404c

Contents?: true

Size: 634 Bytes

Versions: 12

Compression:

Stored size: 634 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
  return files
end

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

Version data entries

12 entries across 6 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.6.3 samples/processing_app/library/vecmath/vec2d/Rakefile
ruby-processing-2.6.2 samples/processing_app/library/vecmath/vec2d/Rakefile
ruby-processing-2.6.2 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.6.1 samples/processing_app/library/vecmath/vec2d/Rakefile
ruby-processing-2.6.1 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.6.0 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.6.0 samples/processing_app/library/vecmath/vec2d/Rakefile
ruby-processing-2.5.1 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.5.1 samples/processing_app/library/vecmath/vec2d/Rakefile
ruby-processing-2.5.0 samples/processing_app/topics/advanced_data/Rakefile
ruby-processing-2.5.0 samples/processing_app/library/vecmath/vec2d/Rakefile