diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2026-03-22 10:20:51 +0100 |
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2026-03-22 10:20:51 +0100 |
| commit | 787440f7049fdc95894612c3e25ee953c4a2c594 (patch) | |
| tree | b662e37c944459f96a4cd1330c45274a48b23959 | |
| parent | 3ab565ec96b186eb88c3708917c862c4b9f9965b (diff) | |
| download | colonial-twilight-787440f7049fdc95894612c3e25ee953c4a2c594.zip colonial-twilight-787440f7049fdc95894612c3e25ee953c4a2c594.tar.gz | |
| -rwxr-xr-x | check | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -0,0 +1,51 @@ +#! /bin/bash + +clear +FILES=" + deck \ + board \ + actions \ + turn +" +echo "--" +echo "check dependencies" +for file in $FILES +do + echo "* check ${file}" + grep require_relative "./lib/colonial_twilight/$file.rb" | grep -v '#' | sed "s@.*require_relative '\(.*\)'@ \1@" + ruby -Ilib "./lib/colonial_twilight/$file.rb" +done + +FILES=" + forces \ + spaces \ + board \ + turn \ + fln_actions +" +echo "--" +echo "check coverage" +rm -fr coverage +files="" +for file in $FILES +do + files="$files ./spec/${file}_spec.rb" +done +rspec $files +echo "--" +awk ' + /<h3>/ { + match($0, /<h3>(.*)<\/h3>/, arr); file = arr[1] + } + /[0-9.]*%/ { + match($0, /([0-9.]+)%/, arr); last_pct = arr[1] + } + /lines covered/ { + if (file != "") { + print file ": " last_pct "%" + file = "" + } + } +' coverage/index.html +echo "--" +echo |
