Sha256: 4da6d58113a7f974e169016af151b50c0d5c4d84e1986300e6fe9b991aae9a8b

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 8 versions & 1 rubygems

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