I hereby claim:
- I am lockyy on github.
- I am naomilockhart (https://keybase.io/naomilockhart) on keybase.
- I have a public key ASCo84SJkCaxREnS3224nSpPEhwaKXPoeyUghKMkZEi8Ngo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
changedSpecFiles=$(files-diff | grep '^spec' | grep -v 'spec/support' | grep -v 'spec/factories') | |
joinedSpecFileNames=$($changedSpecFiles | tr "\n" " ") | |
spring rspec "$@" $($joinedSpecFileNames) |
#!/bin/bash | |
git diff --name-only --diff-filter=d main... |
git log -S <string> path/to/file |
if ENV['CI'] | |
config.before(:example, :focus) { | |
raise "You've added a focused spec to a commit, this'll prevent CI from running properly and you should remove this." | |
} | |
else | |
config.filter_run focus: true | |
config.run_all_when_everything_filtered = true | |
end |
class String | |
def colorize(color_code) | |
"\e[#{color_code}m#{self}\e[0m" | |
end | |
def red | |
colorize(31) | |
end | |
def green |
namespace :db do | |
desc 'Dumps the database to db/backups' | |
task :dump, [:backup_name] => :environment do |_task, args| | |
params = gather_required_data(args) | |
cmd = [ | |
'pg_dump', | |
'-F c', | |
'-v', | |
'-h', params[:host], |
def to_age | |
today = Time.current | |
year_diff = today.year - year | |
today_is_past_birthday = today.month > month || (today.month == month && today.day >= day) | |
today_is_past_birthday ? year_diff : year_diff - 1 | |
end |
#!/bin/bash | |
reek --force-exclusion "$@" $(git status --porcelain | sed s/^...//) |
#!/bin/bash | |
rubocop $(git diff --name-only --diff-filter=d main...) --force-exclusion "$@" |