Terraforming Rails

Based on the RailsConf 2019 talk “Terraforming legacy Rails applications” (slides, video).


Unreleased scripts

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 ENV and Rails.env in 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



Dead code elimination


  • anyway_config: transparently use multiple sources of configuration at once


Automation Tools

  • lefthook: language-agnostic git hook manager
  • danger: code review automation helper
  • pronto: linters runner to run checks only for the relevant changes



  • Fight the flaky tests

Further reading

In the same orbit

Explore more open source projects

Contact us

We’d love to hear from you! We’re not really all that evil, and we love discussing potential projects, intriguing ideas, and new opportunities. Complete the form below or drop us a line at surrender@evilmartians.com.

Martians at a glance
years in business

A product development consultancy that works with startups and established businesses, while also creating open source-based products and services