Sha256: 11299f0faa989b87152bc07cfe65515435534b60f88a0abbd0553c80a0b50d30

Contents?: true

Size: 624 Bytes

Versions: 24

Compression:

Stored size: 624 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 run #{sample_name}", 'r') do |io|
    while l = io.gets
      puts(l.chop)
    end      
  end
end

Version data entries

24 entries across 6 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/topics/lsystems/Rakefile
ruby-processing-2.6.3 samples/processing_app/library/vecmath/arcball/Rakefile
ruby-processing-2.6.3 samples/processing_app/library/vecmath/vec3d/Rakefile
ruby-processing-2.6.3 samples/contributed/Rakefile
ruby-processing-2.6.2 samples/processing_app/library/vecmath/vec3d/Rakefile
ruby-processing-2.6.2 samples/contributed/Rakefile
ruby-processing-2.6.2 samples/processing_app/topics/lsystems/Rakefile
ruby-processing-2.6.2 samples/processing_app/library/vecmath/arcball/Rakefile
ruby-processing-2.6.1 samples/contributed/Rakefile
ruby-processing-2.6.1 samples/processing_app/topics/lsystems/Rakefile
ruby-processing-2.6.1 samples/processing_app/library/vecmath/vec3d/Rakefile
ruby-processing-2.6.1 samples/processing_app/library/vecmath/arcball/Rakefile
ruby-processing-2.6.0 samples/processing_app/library/vecmath/arcball/Rakefile
ruby-processing-2.6.0 samples/processing_app/library/vecmath/vec3d/Rakefile
ruby-processing-2.6.0 samples/contributed/Rakefile
ruby-processing-2.6.0 samples/processing_app/topics/lsystems/Rakefile
ruby-processing-2.5.1 samples/processing_app/topics/lsystems/Rakefile
ruby-processing-2.5.1 samples/processing_app/library/vecmath/vec3d/Rakefile
ruby-processing-2.5.1 samples/processing_app/library/vecmath/arcball/Rakefile
ruby-processing-2.5.1 samples/contributed/Rakefile