0.03
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
close_enough patches method_missing to calculate the Damerau-Levenshtein distance between what you typed, and the existing methods on the current receiver. So typos are no longer a big deal.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0.3
~> 2.13.0

Runtime

 Project Readme

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:

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