These scripts have been created during the development of different Rails projects at Evil Martians.
They’re not universal enough to be extracted into libraries (some depend on particular Rails version or rely on project-specific assumptions), but they could be used a starting point for building tools for your project.
- Lint/Env: RuboCop cop (restrict the usage of
Rails.envin the app)
- FactoryLinter: lint factory definitions
- TimecopLinter: make sure you always travel back in time when using Timecop
- TemplatesTracker: track unused templates
- GemTracker: track potentially unused gems.
- TestProf: analyze and improve test suite performance
- database_validations: validations consistent with the DB constraints
- database_consistency: check the consistency of the DB constraints and models validations
- isolator: detect transactions with side-effects (non-atomic)
Dead code elimination
- traceroute: detect unused routes/controller actions
- factory_trace: detect unused FactoryBot factories/traits
- anyway_config: transparently use multiple sources of configuration at once
- attractor: churn/complexity analysis
- lefthook: language-agnostic git hook manager
- danger: code review automation helper
- pronto: linters runner to run checks only for the relevant changes
- CircleCI: example CircleCI configuration files
- Docker for Dev: example Docker for development configuration
- Lefthook + Crystalball: Git hooks for convenient development environment
- Fight the flaky tests