Git Product home page Git Product logo

yard-rails-plugin's Introduction

yard-rails-plugin

This is a fork of the original Yard::Rails::Plugin by Ogeidix. This guy takes the credit.

Forked because I want a separate repo to hack on. It may be better, it may be not. It wasn't designed with public consumption in mind.

Adds a couple of convenient things for documenting rails:

  • Routes

    • Adds a routes entry to your Yard file list which enumerates your routes, mounted engines etc
    • Adds route information to controller class and method documentation
  • Controllers

    • Adds params taken by each method to their documentation

Installation

In your gemfile

gem 'yard-rails-plugin', '>= 0.1.0', github: 'lorddoig/yard-rails-plugin'

Or for older versions of bundler

gem 'yard-rails-plugin', '>= 0.1.0', git: 'https://github.com/lorddoig/yard-rails-plugin.git'

Followed by a quick bundle install.

Put this line in your .yardopts file

"{lib,app}/**/*.rb" --plugin rails-plugin - tmp/routes.html

Tested with Yard 0.8.3 and Ruby 2.0.0 - your mileage may vary. Original gem was pretty broken on this set up.

Usage

None! The plugin will run when you run yard doc, yard server etc

Note that to get your routes it has to load Rails, so there's a longer than usual delay

Contribution

Pull requests here or with the original author, Ogeidix at Yard::Rails::Plugin

TODO

  • A @renders tag for controllers
    • Showing HTTP status, content-type, template in docs
  • Get logic out of the view files, DRY them up a bit too

yard-rails-plugin's People

Contributors

lorddoig avatar dgnemo avatar romanbsd avatar theodorton avatar

Watchers

 avatar James Cloos avatar  avatar

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.