Git Product home page Git Product logo

close_enough's Introduction

Close Enough

Build Status Code Climate Dependency Status

SYNOPSIS

Sometimes when deadlines are tight, speed becomes more important than accuracy. How many times have we had to face failing tests because fo one little typo in a method signature?

Close Enough fixes this. By calculating the Damerau-Levenshtein distance between existing methods and what you actually typed, we infer the intended method from method calls with small typographical errors (an edit distance of < 3).

USAGE

It's easy.

gem install close_enough

and

require close_enough in your project.

With bundler:

gem 'close_enough', :require => 'close_enough'

Then:

o = Object.new
o.closs

=> Object

"foo".lentgh

=> 3

[1, 2, 3].redcue(:+)
=> 6

center

FAQ

Q. I make typos all the time! Will this save my job?

A. Probably not, no.

Q. You're joking, right?

A. ...

Q. So I shouldn't use this in production code?

A. No, go right ahead... just be advised we take no responsibility for the consequences.

How do I get it?

From Rubygems, of course!

https://rubygems.org/gems/close_enough

AUTHORS

Micah Gates

Jason Lewis

Contributors

Jordan Hollinger

CONTRIBUTING

Really? You have that much time on your hands? Awesome!

Two guidelines, though:

  • Please include tests for all pull requests. Bonus points for feature branches!
  • No monkey-patching BasicObject without grave justification. We're not that crazy.

LICENSE

Copyright (C) 2013 Micah Gates and Jason Lewis

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

close_enough's People

Contributors

canweriotnow avatar jhollinger avatar

Watchers

James Cloos avatar Gregg Smith 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.