Remove underscores and dashes when finding suggestions #19

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@presidentbeef
Contributor

As documented in the earlier pull request, this can sometimes provide faster and more accurate suggestions. In other cases, it can be slower.

I also took the liberty of correcting the method description and removing unused variables.

With this change:

$ time -p gem install rubydebug
ERROR:  Could not find a valid gem 'rubydebug' (>= 0) in any repository
ERROR:  Possible alternatives: ruby-debug
real 6.22  user 5.71  sys 0.11

$ time -p gem install active_support
ERROR:  Could not find a valid gem 'active_support' (>= 0) in any repository
ERROR:  Possible alternatives: activesupport
real 1.48  user 1.01  sys 0.08

$ time -p gem install RubyParser
ERROR:  Could not find a valid gem 'RubyParser' (>= 0) in any repository
ERROR:  Possible alternatives: ruby_parser
real 7.79  user 7.18  sys 0.06

$ time -p gem install ruby-purser
ERROR:  Could not find a valid gem 'ruby-purser' (>= 0) in any repository
ERROR:  Possible alternatives: ruby_parser, rubypulse, ruby-poker, rubypodder, rb-ruby_parser
real 10.24  user 9.67  sys 0.09

Without this change:

$ time -p gem install rubydebug
ERROR:  Could not find a valid gem 'rubydebug' (>= 0) in any repository
ERROR:  Possible alternatives: ruby-debug, rudebug, ruby-dbus, rubydbc, ruby-debug19
real 7.18  user 6.68  sys 0.10

$ time -p gem install active_support
ERROR:  Could not find a valid gem 'active_support' (>= 0) in any repository
ERROR:  Possible alternatives: activesupport, active_form, redis_support, bcms_support, active_wrapper
real 14.80  user 14.21  sys 0.11

$ time -p gem install RubyParser
ERROR:  Could not find a valid gem 'RubyParser' (>= 0) in any repository
ERROR:  Possible alternatives: ruby_parser, queryparser, rubypodder, rubypulse, rubylogparser
real 9.39  user 8.81  sys 0.13

$ time -p gem install ruby-purser
ERROR:  Could not find a valid gem 'ruby-purser' (>= 0) in any repository
ERROR:  Possible alternatives: ruby_parser, rubypulse, ruby-poker, rubypodder, ruby-beamer
real 10.39  user 9.67  sys 0.08
@luislavena
Member

Hello,

Can you please update the full request to contain code based on latest master codebase?

Thank you

@presidentbeef
Contributor

Looking into it now.

@presidentbeef
Contributor

Please see #21

@drbrain
Member
drbrain commented Jan 24, 2011

Closing in favor of 21

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment