#!/usr/bin/env ruby require_relative '../lib/knapsack_pro' runner = ARGV[0] arguments = ARGV[1] MAP = { 'rspec' => KnapsackPro::Runners::RSpecRunner, 'cucumber' => KnapsackPro::Runners::CucumberRunner, 'minitest' => KnapsackPro::Runners::MinitestRunner, } runner_class = MAP[runner] if runner_class runner_class.run(arguments) else raise 'Undefined runner. Please provide runner name and optional arguments, for instance: knapsack_pro rspec "--color --profile"' end