require 'rubygems' require 'rubyonacid/factories/meta' require 'rubyonacid/factories/flash' require 'rubyonacid/factories/increment' require 'rubyonacid/factories/loop' require 'rubyonacid/factories/random' require 'rubyonacid/factories/sine' require 'rubyonacid/factories/skip' factories = [] factories << RubyOnAcid::LoopFactory.new(0.001) factories << RubyOnAcid::LoopFactory.new(-0.001) factories << RubyOnAcid::LoopFactory.new(0.01) factories << RubyOnAcid::LoopFactory.new(-0.01) factories << RubyOnAcid::LoopFactory.new(0.1) factories << RubyOnAcid::LoopFactory.new(-0.1) factories << RubyOnAcid::IncrementFactory.new(0.001) factories << RubyOnAcid::RandomFactory.new factories << RubyOnAcid::FlashFactory.new(1) factories << RubyOnAcid::FlashFactory.new(3) factories << RubyOnAcid::FlashFactory.new(50) factories << RubyOnAcid::FlashFactory.new(100) factories << RubyOnAcid::SineFactory.new(0.1) factories << RubyOnAcid::SineFactory.new(-0.1) factories << RubyOnAcid::SineFactory.new(0.01) factories << RubyOnAcid::SineFactory.new(-0.01) factories << RubyOnAcid::SineFactory.new(0.001) factories << RubyOnAcid::SineFactory.new(-0.001) keys = [:red, :green, :blue, :alpha, :width, :x, :y, :x2, :y2] factories.permutation(keys.length).each_with_index do |permutation, i| meta_factory = RubyOnAcid::MetaFactory.new keys.each do |key| meta_factory.assign_factory(key, permutation.shift) end File.open(sprintf('%05d.yml', i), "w") do |file| YAML.dump(meta_factory, file) end end