ruby-jokes / close_enough

Spelling is hrad. close_enough lets yuo think about code instaed.
http://ruby-jokes.github.com/close_enough
GNU General Public License v3.0
84 stars 10 forks source link

Close Enough

Build Status Code Climate Dependency Status Coverage Status Gem Version

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:

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/.