#!/usr/bin/env ruby
# This program stubs out the Sass CLI. It does not apply any Sass
# transformations and simply outputs the input file to stdout.
# Version flag needs to return a value.
if ARGV.last == '--version'
puts '0.1'
else
# sass-spec passes in full paths to the -I command. We should
# omit that path.
args = ARGV
arg_position_I = ARGV.index("-I")
# Array is shifted post_delete, so -I path will be at arg_position_I on second delete.
2.times { ARGV.delete_at(arg_position_I) } if arg_position_I
puts ["input: #{args.inspect}", "file: #{File.read(ARGV.last)}"].join("\n")
end