Skip to content

Instantly share code, notes, and snippets.

@arjunvenkat
Last active May 15, 2016 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arjunvenkat/a6feb4cbca9a540f8233f164cccd74ce to your computer and use it in GitHub Desktop.
Save arjunvenkat/a6feb4cbca9a540f8233f164cccd74ce to your computer and use it in GitHub Desktop.
Grading bash script for MBA courses
# edit the project name and any feature specs if they're being copied in
project_name=photogram_golden_seven
mkdir ${project_name}_grades
cd $project_name
for branch in $(git for-each-ref --format='%(refname)' refs/remotes/); do
short_name=${branch/refs\/remotes\/origin\//""}
echo $short_name
git add -A
git stash
git checkout $short_name
cd ..
# rm $project_name/spec/features/zodiacs_feature_spec.rb
# cp zodiacs_feature_spec.rb $project_name/spec/features/zodiacs_feature_spec.rb
cd ${project_name}_grades
touch $short_name.json
cd ../$project_name
rspec --format j > ../${project_name}_grades/$short_name.json
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment