Giter Club home page Giter Club logo

annotate_gem's Introduction

Build Status Gem Version

AnnotateGem

annotate-gem is command line tool that will add useful comments to your Gemfile. For each gem, annotate-gem will create a comment with the gem's description and the gem's website. For example, a Gemfile containing the following

gem "rails"
gem "nokogiri"
gem "brakeman"

will be converted into something that is more descriptive and is self-documenting:

# Full-stack web application framework. (http://www.rubyonrails.org)
gem "rails"
# Nokogiri (้‹ธ) is an HTML, XML, SAX, and Reader parser
gem "nokogiri"
# Security vulnerability scanner for Ruby on Rails. (http://brakemanscanner.org)
gem "brakeman"

The motivation for annotate-gem is that developers often open a Gemfile and not know what many of the listed gems are actually for. It's hard to track down which gem is providing which functionality. This is a common problem since many gem names do not reflect the actual feature.

If you do not want to install the gem, you can also visit https://annotate-gem.herokuapp.com/ which is a web interface for annotate-gem.

Installation

$ gem install annotate_gem

Usage

Running annotate-gem itself will add comments to the current directory's Gemfile.

$ cat Gemfile
source 'https://rubygems.org'
gem "pry"
$ annotate-gem
$ cat Gemfile
source 'https://rubygems.org'
# An IRB alternative and runtime developer console (http://pryrepl.org)
gem "pry"

annotate-gem has several options:

$ annotate_gem --help
  Add comments to your Gemfile with each dependency's description.
        Usage: annotate_gem [options]
               annotate_gem [gem name]
        --website-only               Only output the website
        --description-only           Only output the description
        --new-comments-only          Only add a comment to gemfile if there isn't a comment already (for non-inline comments)
        --inline                     Inline the comment
    -h, --help                       Show this message
    -v, --version                    Show version

annotate-gem also works with specifying a single gem name:

$ annotate-gem aasm
State machine mixin for Ruby objects (https://github.com/aasm/aasm)

Contributing

  1. Fork it ( https://github.com/ivantsepp/annotate_gem/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

annotate_gem's People

Contributors

ivantsepp avatar masatooba avatar johansenja avatar robinator avatar ghosteathuman avatar pocheptsov avatar superscott avatar

Watchers

 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.