Git Product home page Git Product logo

tools's Introduction

Tools Repository

In this repository you'll find a number of different commonly used tools that I have created over the years.

Ellis::Tools Module

The Ellis::Tools module is designed to enhance the Rails development experience by providing utility functions that assist in the annotation, debugging, and performance benchmarking of ActiveRecord models and Rails controllers. This module is especially useful for developers who need to quickly understand and document the structure of Rails applications, and is intended to be used in the console.

Features

  • Model and Controller Annotations: Automatically generate detailed annotations for ActiveRecord models and Rails controllers, outlining their structure and relationships.
  • Benchmarking Utilities: Compare the performance of methods within your models or any other Ruby code.
  • Data Inspection: Extract and display data from ActiveRecord objects, which can be particularly helpful for debugging and ensuring data integrity.

Usage

Annotating Models and Controllers

You can annotate your models and controllers to get a detailed schema or structure directly from your Rails console.

Provides a detailed annotation of ActiveRecord models or Rails controllers using the Audited gem. This method can output annotations directly to the console, copy them to the clipboard, or append them to the relevant model or controller files.

It is designed to help developers quickly understand the structure and relationships of various components in their application.

Here's how to use this feature:

# Load the tools in your Rails console
# Usage:
  load '/{path to file}/tools.rb'
  Ellis::Tools.annotate [Model], *options

# Example:
  Ellis::Tools.annotate User, to_file: true

# Options:
  :to_clipboard - (Boolean) Whether to copy the output to the clipboard. Default: true.
  :to_screen - (Boolean) Whether to display the output on the screen. Default: true.
  :to_file - (Boolean) Whether to append the output to the model's file. Default: false.

(there is more I just need to update this file at some point....)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.