Terraforming Rails

screenshot of Terraforming Rails
rails

Terraforming legacy Rails applications guides and tools

Overview

Terraforming Rails is an innovative collection of tools and guides designed to help developers transform legacy code into robust and efficient applications. Inspired by the insights shared during the RailsConf 2019 talk "Terraforming Legacy Rails Applications," this suite provides essential scripts and resources to enhance the coding experience within Rails projects. Whether working with outdated code or seeking to optimize existing applications, Terraforming Rails offers a comprehensive toolkit to facilitate this transformation.

Features

  • Unreleased Scripts: Custom scripts developed in various Rails projects that serve as a foundation for building tailored tools suited for specific applications.
  • Lint/Env: A RuboCop cop designed to limit the use of ENV and Rails.env, promoting cleaner and more manageable code.
  • FactoryLinter: This tool helps ensure that factory definitions are properly structured and free of errors, enhancing the reliability of test data.
  • TimecopLinter: A vital utility that guarantees proper time-traveling mechanics are applied in tests using Timecop, ensuring accuracy in time-related functionalities.
  • Security Tools: Includes bundler-audit to check dependencies for known CVEs and Brakeman to detect security vulnerabilities within the application code.
  • Dead Code Elimination: Tools like traceroute and factory_trace help identify and eliminate unused routes, controller actions, and FactoryBot factories, thereby streamlining the codebase.
  • Automation Tools: Lefthook serves as a language-agnostic git hook manager, while Danger and Pronto automate code reviews and run linters on relevant changes, enhancing the development workflow.
  • Comprehensive Guides: Provides valuable resources for tackling flaky tests and optimizing configurations, empowering developers to achieve their project goals efficiently.
rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.