#!/usr/bin/env ruby # This task detects and prints out the RSpec files for the current build group require "#{File.dirname(__FILE__)}/../lib/peak_flow_utils" args = {} ARGV.each do |arg| if (match = arg.match(/\A--(.+?)=(.+)\Z/)) args[match[1]] = match[2] end end rspec_helper = PeakFlowUtils::RspecHelper.new( groups: args.fetch("groups").to_i, group_number: args.fetch("group-number").to_i, only_types: args["only-types"]&.split(","), tags: args["tags"]&.split(",") ) print rspec_helper.group_files.map { |group_file| group_file.fetch(:path) }.join(" ")