Files
redux-scraper/justfile
Dylan Knutson 5c1807711b Add testing utilities and improve test coverage with FactoryBot integration
- Added `shoulda-matchers` for enhanced RSpec testing capabilities.
- Introduced `factory_bot_rails` for easier test data creation.
- Created factories for `HttpLogEntry`, `BlobEntry`, and `Domain::Fa::Post` models.
- Updated `rails_helper.rb` to include FactoryBot methods and configure Shoulda matchers.
- Enhanced `HttpLogEntry` model with a new `response_size` method.
- Refactored `justfile` to include parallel test execution.
- Improved `Gemfile` and `Gemfile.lock` with new testing gems.
2024-12-27 16:59:27 +00:00

22 lines
676 B
Makefile

default:
@just --list
[private]
changed-ruby-files:
@git diff --name-only | \
(grep -v 'db/schema.rb' || true) | \
(grep -E '(\.(rb|rake|erb)|Rakefile)$' || true)
format-changed:
just changed-ruby-files | xargs -I{} bash -c "stree format {} > {}.tmp && mv {}.tmp {}"
format-all:
find . -name '*.rb' -type f -exec sh -c 'stree format "$1" > "$1.tmp" && mv "$1.tmp" "$1"' sh {} \;
psql-dump-domain-fa-favs:
@psql -P pager=off -c 'select user_id, post_id, 1 from domain_fa_favs limit 10000000;' -d redux_prod -h 10.166.33.171 -U scraper_redux -t -A -F ' '
test:
RAILS_ENV=test bin/rails test
RAILS_ENV=test bin/rake parallel:spec