If you're familiar with bbatsov/ruby-style-guide, you can immediately bbatsov-ize the files you changed in a (current) feature branch:
git diff origin/master --name-status | awk '{print $2}' | xargs rubocop --auto-correct
That roughly transates to: get all changed files in the current feature branch and run each file through rubocop, autocorrecting (modifying) the files if possible.
I recommend saving the changes in a separate commit for easier code reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec_helper for faster testing of plain old ruby objects | |
# To check if a spec is ready for this spec_helper, | |
# just replace `require "spec_helper"` | |
# with `require "slim_spec_helper"` and edit | |
# this file as necessary | |
# Loads a subset of the gemfile using bundler/inline | |
begin | |
require "bundler/inline" | |
rescue LoadError => e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
osascript -e "display notification with title \"Start Pomodoro!\" sound name \"Hero.aiff\"" && \ | |
(sleep 1500 | pv --timer) && \ | |
osascript -e "display notification with title \"Pomodoro Break!\" sound name \"Hero.aiff\"" && \ | |
(sleep 300 | pv --timer) && \ | |
# (sleep 900 | pv --timer) &&\ # Uncomment for long breaks; | |
osascript -e "display notification with title \"Pomodoro Break Done!\" sound name \"Hero.aiff\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias rdm="git diff master --name-only --diff-filter=ACMR | grep '.rb' | ag -v 'schema' | xargs rubocop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff origin/master --name-only --diff-filter=ACMR | grep '.rb' | ag -v 'schema' | xargs rubocop -c .rubocop.yml --force-exclusion --display-cop-names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff origin/master --name-only --diff-filter=ACMR | grep '.rb' | grep -v 'schema' | xargs rubocop -c .rubocop.yml --force-exclusion --display-cop-names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ps aux | grep ruby | grep -v grep | awk '{print $2}' | xargs kill |