Sha256: 723f33e8a2b31e353acd22277ef04336a8b5735d3570989780b5a75e113b696c
Contents?: true
Size: 837 Bytes
Versions: 14
Compression:
Stored size: 837 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true $LOAD_PATH.unshift(File.expand_path('../lib', __dir__)) require 'fast' require 'fast/experiment' require 'coderay' arguments = ARGV experiment_files = Fast.ruby_files_from(File.expand_path('../experiments', __dir__)) experiment_files.each(&method(:require)) experiments = [] if arguments.any? experiments << arguments.shift while arguments.any? && !(File.exist?(arguments.first) || Dir.exist?(arguments.first)) experiments.map! { |name| Fast.experiments[name] } else experiments = Fast.experiments.values end if arguments.any? ruby_files = arguments.all? { |e| File.exist?(e) && e.end_with?('.rb') } experiments.each do |experiment| if ruby_files experiment.files = arguments else experiment.lookup arguments end end end experiments.each(&:run)
Version data entries
14 entries across 14 versions & 1 rubygems