Skip to content

Instantly share code, notes, and snippets.

@tosch

tosch/gac_spec.zsh Secret

Last active Apr 26, 2018
Embed
What would you like to do?
# Put this file into ~/.oh-my-zsh/custom
#
# All credits to [@thomet](https://github.com/thomet)
# Run all specs I have touched in diff to master
alias rspecch='bundle exec rspec $(git diff master...HEAD --name-only --relative --diff-filter=d | grep "_spec.rb")'
# Run all specs I have touched in diff to master with output of a lot of times (to check timing for PR)
alias rspecchp='bundle exec rspec --profile 1000 $(git diff master...HEAD --name-only --relative --diff-filter=d | grep "_spec.rb")'
# Runs flog on all changed files in diff to master
alias flogch='flog -m $(git diff master...HEAD --name-only --relative --diff-filter=d | grep ".rb" | grep -v "_spec")'
# Runs flay on all changed files in diff to master
alias flaych='flay -v --diff $(git diff master...HEAD --name-only --relative --diff-filter=d | grep ".rb" | grep -v "_spec")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment