#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../lib/starting_blocks.rb') options = {} def display value end if ARGV.include? '--verbose' options[:verbose] = true end if ARGV.include? '--no-vendor' options[:no_vendor] = true end if ARGV.include? '--bundler' options[:use_bundler] = true end def run_all_specs options files = ['**/*_spec.rb*', '**/*_test.rb*', '**/test_*.rb*'].map do |d| Dir[d]. select { |f| File.file?(f) }. map { |x| File.expand_path(x) } end.flatten StartingBlocks::Runner.new(options).run_files files end if ARGV.include? '--watch' StartingBlocks::Watcher.start_watching Dir, options elsif ARGV.include? '--off' StartingBlocks::Extensions::BlinkyLighting.turn_off! else run_all_specs options end