- Existing
rspec-stackprof
is "empty" stackprof
is written as a replacement forperftools.rb
- Added an environment variable to conditionally run the profiler, it slows down test runtime by a couple of seconds for me.
- Just add
stackprof.rb
to yourspec/support
folder, which is loaded onrails_helper.rb
Combining both find
and sed
to find and replace words
find app db spec -type f \( -name '*.rb' -o -name '*.sql' \) -exec sed -i '' -e 's/dollar_value/budget_value/g' {} \;
This script:
- searches in the
app
,db
, andspec
directories - it only looks at file types that are either
.rb
or.sql
files