Skip to content

Instantly share code, notes, and snippets.

@tosch
Last active April 26, 2018 07:43
Show Gist options
  • Save tosch/5ae63d73adc91276d5f4e12761064f81 to your computer and use it in GitHub Desktop.
Save tosch/5ae63d73adc91276d5f4e12761064f81 to your computer and use it in GitHub Desktop.
# 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