<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@no-svg --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
selenium: --tags ~@no-selenium features CUCUMBER_PROFILE=selenium
sauce: features CUCUMBER_PROFILE=sauce

<%
format = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "#{format} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "#{format} --strict --tags ~@no-svg --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
selenium: --tags ~@no-selenium features CUCUMBER_PROFILE=selenium
sauce: <%= format %> features CUCUMBER_PROFILE=sauce

Make 'progress' format default for sauce runs
Make 'progress' format default for sauce runs
