Skip to content

Instantly share code, notes, and snippets.

@arjunvenkat

arjunvenkat/grade.sh

Last active May 15, 2016
Embed
What would you like to do?
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