did_you_mean 1.3.0 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/ruby.yml +39 -0
- data/CHANGELOG.md +200 -62
- data/Gemfile +2 -0
- data/README.md +40 -36
- data/Rakefile +46 -13
- data/appveyor.yml +25 -0
- data/benchmark/jaro_winkler/memory_usage.rb +4 -4
- data/benchmark/jaro_winkler/speed.rb +14 -6
- data/benchmark/levenshtein/memory_usage.rb +4 -4
- data/benchmark/levenshtein/speed.rb +13 -8
- data/benchmark/require_path_checker.rb +47 -0
- data/benchmark/speed.yml +13 -0
- data/did_you_mean.gemspec +6 -4
- data/{doc → documentation}/changelog_generator.rb +1 -1
- data/documentation/human_typo_api.md +20 -0
- data/documentation/tree_spell_algorithm.md +82 -0
- data/documentation/tree_spell_checker_api.md +24 -0
- data/lib/did_you_mean/core_ext/name_error.rb +41 -11
- data/lib/did_you_mean/experimental.rb +2 -2
- data/lib/did_you_mean/formatter.rb +44 -0
- data/lib/did_you_mean/formatters/plain_formatter.rb +3 -32
- data/lib/did_you_mean/formatters/verbose_formatter.rb +5 -44
- data/lib/did_you_mean/levenshtein.rb +1 -1
- data/lib/did_you_mean/spell_checker.rb +13 -19
- data/lib/did_you_mean/spell_checkers/key_error_checker.rb +8 -2
- data/lib/did_you_mean/spell_checkers/method_name_checker.rb +30 -7
- data/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +5 -5
- data/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +5 -2
- data/lib/did_you_mean/spell_checkers/name_error_checkers.rb +2 -2
- data/lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb +20 -0
- data/lib/did_you_mean/spell_checkers/require_path_checker.rb +39 -0
- data/lib/did_you_mean/tree_spell_checker.rb +109 -0
- data/lib/did_you_mean/verbose.rb +2 -4
- data/lib/did_you_mean/version.rb +1 -1
- data/lib/did_you_mean.rb +68 -22
- data/test/core_ext/test_name_error_extension.rb +55 -0
- data/test/edit_distance/{jaro_winkler_test.rb → test_jaro_winkler.rb} +2 -2
- data/test/fixtures/book.rb +1 -1
- data/test/fixtures/mini_dir.yml +15 -0
- data/test/fixtures/rspec_dir.yml +112 -0
- data/test/helper.rb +43 -0
- data/test/lib/core_assertions.rb +757 -0
- data/test/lib/envutil.rb +372 -0
- data/test/lib/find_executable.rb +22 -0
- data/test/lib/helper.rb +3 -0
- data/test/spell_checking/{class_name_check_test.rb → test_class_name_check.rb} +15 -11
- data/test/spell_checking/test_key_name_check.rb +54 -0
- data/test/spell_checking/test_method_name_check.rb +165 -0
- data/test/spell_checking/test_pattern_key_name_check.rb +20 -0
- data/test/spell_checking/test_require_path_check.rb +32 -0
- data/test/spell_checking/test_uncorrectable_name_check.rb +15 -0
- data/test/spell_checking/{variable_name_check_test.rb → test_variable_name_check.rb} +46 -30
- data/test/test_ractor_compatibility.rb +117 -0
- data/test/{spell_checker_test.rb → test_spell_checker.rb} +3 -2
- data/test/test_tree_spell_checker.rb +170 -0
- data/test/tree_spell/change_word.rb +61 -0
- data/test/tree_spell/human_typo.rb +69 -0
- data/test/tree_spell/test_change_word.rb +38 -0
- data/test/tree_spell/test_explore.rb +128 -0
- data/test/tree_spell/test_human_typo.rb +24 -0
- metadata +69 -67
- data/.ruby-version +0 -1
- data/.travis.yml +0 -15
- data/lib/did_you_mean/experimental/initializer_name_correction.rb +0 -20
- data/lib/did_you_mean/experimental/ivar_name_correction.rb +0 -74
- data/test/core_ext/name_error_extension_test.rb +0 -51
- data/test/experimental/initializer_name_correction_test.rb +0 -15
- data/test/experimental/method_name_checker_test.rb +0 -13
- data/test/spell_checking/key_name_check_test.rb +0 -44
- data/test/spell_checking/method_name_check_test.rb +0 -126
- data/test/spell_checking/uncorrectable_name_check_test.rb +0 -15
- data/test/test_helper.rb +0 -13
- data/test/verbose_formatter_test.rb +0 -23
- data/tmp/.keep +0 -0
- /data/{doc → documentation}/CHANGELOG.md.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe3eda9f13dc6e837711f29799ee6701771200e75f11017c1f18cc521de10ca
|
4
|
+
data.tar.gz: 96476669d502e64083fa91cbbb7c91c583228b86f34ea0b22929bf38c931ee6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2697751c0b6ba2afa9153b41c306118fddd7ce584cdb9de9f71974cf924d83208fdb47a307e1ee4ea6161b63641334ea7ff1ca58fff0e141116809d6690e254b
|
7
|
+
data.tar.gz: 1cd6e82755d1d66c9503fc5ff3f6c42931860edb3fbb11c94c1411317ddffaa1ba1f0e7020cc1ad553cb0ad26195e6ab897a0c88a8fad58cad779d008f38bbb1
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- 'master'
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- 'master'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2', 'jruby-9.3', 'jruby-head' ]
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
- name: Build and test with Rake
|
23
|
+
run: |
|
24
|
+
gem i test-unit
|
25
|
+
RUBYOPT='--disable-did_you_mean' rake
|
26
|
+
|
27
|
+
benchmark:
|
28
|
+
runs-on: ubuntu-latest
|
29
|
+
steps:
|
30
|
+
- uses: actions/checkout@v3
|
31
|
+
- uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: 3.1.3
|
34
|
+
- name: Test performance and accuracy
|
35
|
+
run: |
|
36
|
+
gem install bundler
|
37
|
+
bundle install --jobs 4 --retry 2
|
38
|
+
RUBYOPT='--disable-did_you_mean' bundle exec rake test:accuracy
|
39
|
+
RUBYOPT='--disable-did_you_mean' bundle exec rake benchmark:memory
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,137 @@
|
|
1
|
-
##
|
1
|
+
## v1.6.3
|
2
|
+
|
3
|
+
_<sup>released at 2022-12-19 5:57:00 UTC</sup>_
|
4
|
+
|
5
|
+
- Do not suggest #name= for #name.
|
6
|
+
|
7
|
+
## v1.6.2
|
8
|
+
|
9
|
+
_<sup>released at 2022-12-05 10:29:20 UTC</sup>_
|
10
|
+
|
11
|
+
- Define Exception#detailed_message instead of clobbering #message
|
12
|
+
- Fixed correction duplicates in VaribaleNameChecker
|
13
|
+
|
14
|
+
## v1.6.1
|
15
|
+
|
16
|
+
_<sup>released at 2020-12-22 13:22:35 UTC</sup>_
|
17
|
+
|
18
|
+
#### Deprecations
|
19
|
+
|
20
|
+
- Deprecate custom formatters to reduce complexity for Ractor support.
|
21
|
+
- Deprecate access to the `DidYouMean::SPELL_CHECKERS` constant for Ractor support.
|
22
|
+
|
23
|
+
#### Features
|
24
|
+
|
25
|
+
- The `did_you_mean` gem is now Ractor-compatible (`8faba54b`)
|
26
|
+
- Suggest keys on NoMatchingPatternKeyError (#159, @k-tsj)
|
27
|
+
- Make the same name check case-sensitive (#164, @pocke)
|
28
|
+
|
29
|
+
Before:
|
30
|
+
```ruby
|
31
|
+
DidYouMean::SpellChecker.new(dictionary: ['Method', 'MEthod']).correct("MEthod")
|
32
|
+
# => ['Method', 'method']
|
33
|
+
```
|
34
|
+
|
35
|
+
After:
|
36
|
+
```ruby
|
37
|
+
DidYouMean::SpellChecker.new(dictionary: ['Method', 'MEthod']).correct("MEthod")
|
38
|
+
# => ['Method']
|
39
|
+
```
|
40
|
+
|
41
|
+
## v1.6.0 (yanked)
|
42
|
+
|
43
|
+
_This version has been yanked due to significant and unexpected breaking changes._
|
44
|
+
|
45
|
+
## [v1.5.0](https://github.com/ruby/did_you_mean/tree/v1.5.0)
|
46
|
+
|
47
|
+
_<sup>released at 2020-12-22 05:47:21 UTC</sup>_
|
48
|
+
|
49
|
+
#### Features
|
50
|
+
|
51
|
+
- Suggest require paths on LoadError ([#143](https://github.com/ruby/did_you_mean/pull/143))
|
52
|
+
|
53
|
+
## [v1.4.0](https://github.com/ruby/did_you_mean/tree/v1.4.0)
|
54
|
+
|
55
|
+
_<sup>released at 2020-05-09 02:56:43 UTC</sup>_
|
56
|
+
|
57
|
+
As of Ruby 2.7, the `did_you_mean` gem has been promoted up to a default gem. I would like to thank [@kddeisz](https://github.com/kddeisz) for his hard work on making the entire gem easily portable the main ruby/ruby repo ([#132](https://github.com/ruby/did_you_mean/pull/132), [#131](https://github.com/ruby/did_you_mean/pull/131), and [ruby/ruby#2631](https://github.com/ruby/ruby/pull/2631)).
|
58
|
+
|
59
|
+
#### Features
|
60
|
+
|
61
|
+
- Add a new tree spell checker ([#119](https://github.com/ruby/did_you_mean/pull/119), [@obromios](https://github.com/obromios))
|
62
|
+
- Add a public API for registering an error ([#123](https://github.com/ruby/did_you_mean/pull/123), [@kddeisz](https://github.com/kddeisz))
|
63
|
+
|
64
|
+
#### Bug fixes
|
65
|
+
|
66
|
+
- Fixes a bug where wrong suggestion could be made when string requested on hash and keys are symbols ([@localhostdotdev](https://github.com/localhostdotdev), [#134](https://github.com/ruby/did_you_mean/pull/134))
|
67
|
+
|
68
|
+
#### Breaking changes
|
69
|
+
|
70
|
+
- Experimental features have been removed ([#135](https://github.com/ruby/did_you_mean/pull/135))
|
71
|
+
|
72
|
+
#### Internal changes
|
73
|
+
|
74
|
+
- Replace Travis CI with GitHub Actions ([#124](https://github.com/ruby/did_you_mean/pull/124))
|
75
|
+
- Drop mintiest dependency ([#129](https://github.com/ruby/did_you_mean/pull/129))
|
76
|
+
- Drop delegate dependency ([#138](https://github.com/ruby/did_you_mean/pull/138))
|
77
|
+
|
78
|
+
## [v1.3.1](https://github.com/ruby/did_you_mean/tree/v1.3.1)
|
79
|
+
|
80
|
+
_<sup>released at 2019-09-29 03:58:46 UTC</sup>_
|
81
|
+
|
82
|
+
#### Bug fixes
|
83
|
+
|
84
|
+
- Fixes a test failure in Ruby core where DYM attempts to mutate immutable strings from `Symbol#to_s` ([#125](https://github.com/ruby/did_you_mean/pull/125), [@nobu](https://github.com/nobu), [@eregon](https://github.com/eregon), [@MSP-Greg](https://github.com/MSP-Greg))
|
85
|
+
- Removes the empty `tmp/` directory to comply with `rpmlint` ([#122](https://github.com/ruby/did_you_mean/issues/122), [@pvalena](https://github.com/pvalena))
|
86
|
+
- Fixes a bug where suggestions are not shown on subsequent errors ([#120](https://github.com/ruby/did_you_mean/issues/120), [@localhostdotdev](https://github.com/localhostdotdev))
|
87
|
+
|
88
|
+
## [v1.3.0](https://github.com/ruby/did_you_mean/tree/v1.3.0)
|
89
|
+
|
90
|
+
_<sup>released at 2018-12-18 15:37:10 UTC</sup>_
|
91
|
+
|
92
|
+
**Starting version 1.3, the `did_you_mean` gem will be compatible with 2.6 and 2.5, and we will try to keep all subsequent versions compatible with Ruby 2.5 on an best-effort basis.**
|
93
|
+
|
94
|
+
- Version 1.2.0 only has support for Ruby 2.5.0 and later as it uses new features that are only available in 2.5.
|
95
|
+
- Versions earlier than 1.1.\* will still be maintained until Ruby 2.4 is deprecated.
|
96
|
+
- Versions earlier than 1.0.\* is still maintained, but are likely to be deprecated as Ruby 2.3 will (probably) be deprecated in 2019.
|
97
|
+
- Support for versions below 1.0 has already ended.
|
98
|
+
|
99
|
+
#### New features
|
100
|
+
|
101
|
+
- Suggest reserved words if there are close matches ([<tt>2a082a7</tt>](https://github.com/ruby/did_you_mean/commit/2a082a71991f5afe2e27ce9538103eac4c428025))
|
102
|
+
|
103
|
+
```ruby
|
104
|
+
results = yiedl
|
105
|
+
# NameError => undefined local variable or method `yiedl' for ...
|
106
|
+
# Did you mean? yield
|
107
|
+
```
|
108
|
+
|
109
|
+
#### Bug fixes
|
110
|
+
|
111
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
112
|
+
|
113
|
+
## [v1.2.2](https://github.com/ruby/did_you_mean/tree/v1.2.2)
|
114
|
+
|
115
|
+
_<sup>released at 2019-03-09 23:17:22 UTC</sup>_
|
116
|
+
|
117
|
+
#### Bug fixes
|
118
|
+
|
119
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
120
|
+
|
121
|
+
## [v1.2.1](https://github.com/ruby/did_you_mean/tree/v1.2.1)
|
2
122
|
|
3
123
|
_<sup>released at 2018-04-03 04:44:47 UTC</sup>_
|
4
124
|
|
5
125
|
#### Bug Fixes
|
6
126
|
|
7
|
-
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/
|
8
|
-
- Fixed a bug where the deprecated `DidYouMean::Formatter` has been removed unexpectedly ([#103](https://github.com/
|
127
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
128
|
+
- Fixed a bug where the deprecated `DidYouMean::Formatter` has been removed unexpectedly ([#103](https://github.com/ruby/did_you_mean/issues/103), [<tt>4b5ba32</tt>](https://github.com/ruby/did_you_mean/commit/4b5ba3215975df1dd8e9c7eacffcf02abfffa92e))
|
9
129
|
|
10
130
|
#### Other Changes
|
11
131
|
|
12
|
-
- Non-production code that has a non-commercial
|
132
|
+
- Non-production code that has a non-commercial license has been removed from gem releases ([#105](https://github.com/ruby/did_you_mean/issues/105), [@jbotelho2-bb](https://github.com/jbotelho2-bb))
|
13
133
|
|
14
|
-
## [v1.2.0](https://github.com/
|
134
|
+
## [v1.2.0](https://github.com/ruby/did_you_mean/tree/v1.2.0)
|
15
135
|
|
16
136
|
_<sup>released at 2018-01-02 20:49:35 UTC</sup>_
|
17
137
|
|
@@ -19,11 +139,20 @@ _<sup>released at 2018-01-02 20:49:35 UTC</sup>_
|
|
19
139
|
|
20
140
|
#### New features
|
21
141
|
|
22
|
-
- The `KeyError` name suggestion feature has been promoted to a stable feature and is available by default ([<tt>acf5945</tt>](https://github.com/
|
23
|
-
- Now suggests `true`, `false` or `nil` if a NameError occurs because of a typo in these names ([#94](https://github.com/
|
24
|
-
- New Formatter API: This provides a clean way to customize DidYouMean’s formatter without overriding the default formatter. Please refer to [the built-in verbose formatter](https://github.com/
|
142
|
+
- The `KeyError` name suggestion feature has been promoted to a stable feature and is available by default ([<tt>acf5945</tt>](https://github.com/ruby/did_you_mean/commit/acf59450dfb67eefae9b465ccc8029af46ae7dd0), [https://bugs.ruby-lang.org/issues/12063](https://bugs.ruby-lang.org/issues/12063))
|
143
|
+
- Now suggests `true`, `false` or `nil` if a NameError occurs because of a typo in these names ([#94](https://github.com/ruby/did_you_mean/pull/94), [@styd](https://github.com/styd))
|
144
|
+
- New Formatter API: This provides a clean way to customize DidYouMean’s formatter without overriding the default formatter. Please refer to [the built-in verbose formatter](https://github.com/ruby/did_you_mean/blob/671cdff/lib/did_you_mean/verbose.rb) for how to use it
|
145
|
+
|
146
|
+
## [v1.1.3](https://github.com/ruby/did_you_mean/tree/v1.1.3)
|
25
147
|
|
26
|
-
|
148
|
+
_<sup>released at 2019-03-09 23:16:54 UTC</sup>_
|
149
|
+
|
150
|
+
#### Bug fixes
|
151
|
+
|
152
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
153
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
154
|
+
|
155
|
+
## [v1.1.2](https://github.com/ruby/did_you_mean/tree/v1.1.2)
|
27
156
|
|
28
157
|
_<sup>released at 2017-09-24 07:28:48 UTC</sup>_
|
29
158
|
|
@@ -31,15 +160,15 @@ _<sup>released at 2017-09-24 07:28:48 UTC</sup>_
|
|
31
160
|
|
32
161
|
#### Bug Fixes
|
33
162
|
|
34
|
-
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/
|
163
|
+
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/ruby/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/ruby/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
|
35
164
|
|
36
|
-
## [v1.1.1](https://github.com/
|
165
|
+
## [v1.1.1](https://github.com/ruby/did_you_mean/tree/v1.1.1)
|
37
166
|
|
38
167
|
_<sup>released at 2017-09-24 07:24:02 UTC</sup>_
|
39
168
|
|
40
169
|
### This version has been yanked from Rubygems.org and is not available.
|
41
170
|
|
42
|
-
## [v1.1.0](https://github.com/
|
171
|
+
## [v1.1.0](https://github.com/ruby/did_you_mean/tree/v1.1.0)
|
43
172
|
|
44
173
|
_<sup>released at 2016-12-19 23:19:06 UTC</sup>_
|
45
174
|
|
@@ -47,7 +176,7 @@ The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch r
|
|
47
176
|
|
48
177
|
#### New Features
|
49
178
|
|
50
|
-
- Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/
|
179
|
+
- Suggest a method name on a NameError from the `Struct#[]` or `Struct#[]=` method ([#73](https://github.com/ruby/did_you_mean/pull/73)):
|
51
180
|
|
52
181
|
```ruby
|
53
182
|
Struct.new(:foo).new[:fooo]
|
@@ -67,9 +196,18 @@ The version `1.1.0` only has support for Ruby 2.4.0 and later. Also, all patch r
|
|
67
196
|
|
68
197
|
#### Bug Fixes
|
69
198
|
|
70
|
-
- Fixed a bug where private method names were added to the dictionary when an argument was passed in to a public method. Use the `NoMethodError#private_call?` method instead ([<tt>0a1b761</tt>](https://github.com/
|
199
|
+
- Fixed a bug where private method names were added to the dictionary when an argument was passed in to a public method. Use the `NoMethodError#private_call?` method instead ([<tt>0a1b761</tt>](https://github.com/ruby/did_you_mean/commit/0a1b7612252055e583a373b473932f789381ca0f))
|
200
|
+
|
201
|
+
## [v1.0.4](https://github.com/ruby/did_you_mean/tree/v1.0.4)
|
202
|
+
|
203
|
+
_<sup>released at 2019-03-09 23:16:38 UTC</sup>_
|
204
|
+
|
205
|
+
#### Bug fixes
|
206
|
+
|
207
|
+
- Fixes a bug where name errors can not be dumped ([#108](https://github.com/ruby/did_you_mean/issues/108), [@jessebs](https://github.com/jessebs))
|
208
|
+
- Fixed a bug where DYM suggests the same class name in the error message ([#102](https://github.com/ruby/did_you_mean/issues/102), [@schneems](https://github.com/schneems))
|
71
209
|
|
72
|
-
## [v1.0.3](https://github.com/
|
210
|
+
## [v1.0.3](https://github.com/ruby/did_you_mean/tree/v1.0.3)
|
73
211
|
|
74
212
|
_<sup>released at 2017-09-24 07:22:07 UTC</sup>_
|
75
213
|
|
@@ -77,9 +215,9 @@ _<sup>released at 2017-09-24 07:22:07 UTC</sup>_
|
|
77
215
|
|
78
216
|
#### Bug Fixes
|
79
217
|
|
80
|
-
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/
|
218
|
+
- Fixed a bug where `did_you_mean` shows duplicate suggestions when the exception is raised multiple times ([#84](https://github.com/ruby/did_you_mean/pull/84), [<tt>c2e4008</tt>](https://github.com/ruby/did_you_mean/commit/c2e40083cef604c00ccd10efc6d7a5036ad9eb5b))
|
81
219
|
|
82
|
-
## [v1.0.2](https://github.com/
|
220
|
+
## [v1.0.2](https://github.com/ruby/did_you_mean/tree/v1.0.2)
|
83
221
|
|
84
222
|
_<sup>released at 2016-11-20 18:03:07 UTC</sup>_
|
85
223
|
|
@@ -97,41 +235,41 @@ _<sup>released at 2016-11-20 18:03:07 UTC</sup>_
|
|
97
235
|
|
98
236
|
- Replaced the `DidYouMean::SpellCheckable` module with the `DidYouMean::SpellChecker` class. This is a slower implementation but close to the model explained in [this talk](https://speakerdeck.com/yuki24/saving-people-from-typos), more reusable and possibly makes it easier to expose the class as a public interface.
|
99
237
|
|
100
|
-
## [v1.0.1](https://github.com/
|
238
|
+
## [v1.0.1](https://github.com/ruby/did_you_mean/tree/v1.0.1)
|
101
239
|
|
102
240
|
_<sup>released at 2016-05-15 05:17:22 UTC</sup>_
|
103
241
|
|
104
242
|
#### Bug Fixes
|
105
243
|
|
106
|
-
- Fixed a bug where the gem suggests what is actually typed by the user: [<tt>1c52c88</tt>](https://github.com/
|
107
|
-
- Fixed features that didn't work on JRuby 9.1.0.0: [<tt>dc48dde</tt>](https://github.com/
|
244
|
+
- Fixed a bug where the gem suggests what is actually typed by the user: [<tt>1c52c88</tt>](https://github.com/ruby/did_you_mean/commit/1c52c887c62b0921e799f94bcc4a846dc7cbc057)
|
245
|
+
- Fixed features that didn't work on JRuby 9.1.0.0: [<tt>dc48dde</tt>](https://github.com/ruby/did_you_mean/commit/dc48dde1b2a8f05aab1fcf897e1cb3075a206f53), [<tt>4de23f8</tt>](https://github.com/ruby/did_you_mean/commit/4de23f880502c80c5f321371d39c08bb0fa34040), [<tt>00e3059</tt>](https://github.com/ruby/did_you_mean/commit/00e305971060d150fae4817b5e895d6478b37579). The local variable name correction is still disabled. Also see: [jruby/jruby#3480](https://github.com/jruby/jruby/issues/3480)
|
108
246
|
|
109
|
-
## [v1.0.0](https://github.com/
|
247
|
+
## [v1.0.0](https://github.com/ruby/did_you_mean/tree/v1.0.0)
|
110
248
|
|
111
249
|
_<sup>released at 2015-12-25 05:13:04 UTC</sup>_
|
112
250
|
|
113
251
|
#### Features
|
114
252
|
|
115
|
-
- Introduced a [verbose formatter](https://github.com/
|
116
|
-
- Introduced an easy way to enabling [experimental features](https://github.com/
|
253
|
+
- Introduced a [verbose formatter](https://github.com/ruby/did_you_mean#verbose-formatter)
|
254
|
+
- Introduced an easy way to enabling [experimental features](https://github.com/ruby/did_you_mean#experimental-features)
|
117
255
|
|
118
256
|
#### Bug Fixes
|
119
257
|
|
120
|
-
- Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes [#58](https://github.com/
|
258
|
+
- Fixed a bug where the Jaro-Winkler implementation returns the wrong distance when 2 identical strings are given. fixes [#58](https://github.com/ruby/did_you_mean/pull/58)
|
121
259
|
|
122
260
|
#### Internal Changes
|
123
261
|
|
124
|
-
- Slightly changed the spell checking algorithm. Take a look at [<tt>e2f5b24</tt>](https://github.com/
|
262
|
+
- Slightly changed the spell checking algorithm. Take a look at [<tt>e2f5b24</tt>](https://github.com/ruby/did_you_mean/commit/e2f5b2437f967565e4830eab6077f73ae166e0a7) for more details. fixes [#60](https://github.com/ruby/did_you_mean/issues/60)
|
125
263
|
|
126
|
-
## [v1.0.0.rc1](https://github.com/
|
264
|
+
## [v1.0.0.rc1](https://github.com/ruby/did_you_mean/tree/v1.0.0.rc1)
|
127
265
|
|
128
266
|
_<sup>released at 2015-12-25 05:02:25 UTC</sup>_
|
129
267
|
|
130
268
|
#### Internal Changes
|
131
269
|
|
132
|
-
- No longer uses `TracePoint` API by default. fixes [#55](https://github.com/
|
270
|
+
- No longer uses `TracePoint` API by default. fixes [#55](https://github.com/ruby/did_you_mean/issues/55) and [#56](https://github.com/ruby/did_you_mean/issues/56)
|
133
271
|
|
134
|
-
## [v1.0.0.beta3](https://github.com/
|
272
|
+
## [v1.0.0.beta3](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta3)
|
135
273
|
|
136
274
|
_<sup>released at 2015-12-25 04:56:13 UTC</sup>_
|
137
275
|
|
@@ -141,7 +279,7 @@ _<sup>released at 2015-12-25 04:56:13 UTC</sup>_
|
|
141
279
|
- Use the `NameError#receiver` method in `DidYouMean:: ClassNameChecker` to know the namespace where the constant call is made
|
142
280
|
- Refactored the `SpellCheckerTest`
|
143
281
|
|
144
|
-
## [v1.0.0.beta2](https://github.com/
|
282
|
+
## [v1.0.0.beta2](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta2)
|
145
283
|
|
146
284
|
_<sup>released at 2015-12-25 04:50:36 UTC</sup>_
|
147
285
|
|
@@ -149,7 +287,7 @@ _<sup>released at 2015-12-25 04:50:36 UTC</sup>_
|
|
149
287
|
|
150
288
|
- Fixed a bug where the gem doesn't install properly on Ruby 2.3.0dev
|
151
289
|
|
152
|
-
## [v1.0.0.beta1](https://github.com/
|
290
|
+
## [v1.0.0.beta1](https://github.com/ruby/did_you_mean/tree/v1.0.0.beta1)
|
153
291
|
|
154
292
|
_<sup>released at 2015-12-25 05:27:53 UTC</sup>_
|
155
293
|
|
@@ -163,7 +301,7 @@ _<sup>released at 2015-12-25 05:27:53 UTC</sup>_
|
|
163
301
|
- The interception gem has been removed from the dependencies
|
164
302
|
- Removed code that was needed to support multiple Ruby implementations
|
165
303
|
|
166
|
-
## [v0.10.0](https://github.com/
|
304
|
+
## [v0.10.0](https://github.com/ruby/did_you_mean/tree/v0.10.0)
|
167
305
|
|
168
306
|
_<sup>released at 2015-08-21 06:44:11 UTC</sup>_
|
169
307
|
|
@@ -181,28 +319,28 @@ _<sup>released at 2015-08-21 06:44:11 UTC</sup>_
|
|
181
319
|
```
|
182
320
|
|
183
321
|
- Support for JRuby 9.0.0.0
|
184
|
-
- Prefix-based correction ( [@tjohn](https://github.com/tjohn), [#50](https://github.com/
|
322
|
+
- Prefix-based correction ( [@tjohn](https://github.com/tjohn), [#50](https://github.com/ruby/did_you_mean/issues/50 "Match start of method name"), [#49](https://github.com/ruby/did_you_mean/issues/49 "Use Jaro distance instead of Jaro-Winkler distance"))
|
185
323
|
- Correction search is about 75% faster than 0.9.10
|
186
324
|
|
187
325
|
#### Breaking Changes
|
188
326
|
|
189
327
|
- The ActiveRecord integration has been removed
|
190
328
|
|
191
|
-
## [v0.9.10](https://github.com/
|
329
|
+
## [v0.9.10](https://github.com/ruby/did_you_mean/tree/v0.9.10)
|
192
330
|
|
193
331
|
_<sup>released at 2015-05-14 03:04:47 UTC</sup>_
|
194
332
|
|
195
333
|
#### Bug Fixes
|
196
334
|
|
197
|
-
- Fixed a bug where a duplicate "did you mean?" message was appended each time `#to_s` is called ( [@danfinnie](https://github.com/danfinnie), [#51](https://github.com/
|
335
|
+
- Fixed a bug where a duplicate "did you mean?" message was appended each time `#to_s` is called ( [@danfinnie](https://github.com/danfinnie), [#51](https://github.com/ruby/did_you_mean/issues/51 "Duplicate output for constants in separate gem"))
|
198
336
|
|
199
|
-
## [v0.9.9](https://github.com/
|
337
|
+
## [v0.9.9](https://github.com/ruby/did_you_mean/tree/v0.9.9)
|
200
338
|
|
201
339
|
_<sup>released at 2015-05-13 03:48:19 UTC</sup>_
|
202
340
|
|
203
341
|
#### Features
|
204
342
|
|
205
|
-
- Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/
|
343
|
+
- Order word suggestions based on Levenshtein distance ( [@tleish](https://github.com/tleish), [#31](https://github.com/ruby/did_you_mean/pull/31))
|
206
344
|
|
207
345
|
#### Internal Changes
|
208
346
|
|
@@ -210,7 +348,7 @@ _<sup>released at 2015-05-13 03:48:19 UTC</sup>_
|
|
210
348
|
- Speed up Levenshtein distance calculation by about 40%
|
211
349
|
- The Java extension has been replaced with a pure JRuby implementation
|
212
350
|
|
213
|
-
## [v0.9.8](https://github.com/
|
351
|
+
## [v0.9.8](https://github.com/ruby/did_you_mean/tree/v0.9.8)
|
214
352
|
|
215
353
|
_<sup>released at 2015-04-12 01:55:27 UTC</sup>_
|
216
354
|
|
@@ -218,7 +356,7 @@ _<sup>released at 2015-04-12 01:55:27 UTC</sup>_
|
|
218
356
|
|
219
357
|
- Speed up Levenshtein by 50% and reduce 97% of memory usage
|
220
358
|
|
221
|
-
## [v0.9.7](https://github.com/
|
359
|
+
## [v0.9.7](https://github.com/ruby/did_you_mean/tree/v0.9.7)
|
222
360
|
|
223
361
|
_<sup>released at 2015-04-02 04:20:26 UTC</sup>_
|
224
362
|
|
@@ -226,23 +364,23 @@ _<sup>released at 2015-04-02 04:20:26 UTC</sup>_
|
|
226
364
|
|
227
365
|
- Fixed an issue where _did\_you\_mean_ doesn't install on JRuby properly.
|
228
366
|
|
229
|
-
## [v0.9.6](https://github.com/
|
367
|
+
## [v0.9.6](https://github.com/ruby/did_you_mean/tree/v0.9.6)
|
230
368
|
|
231
369
|
_<sup>released at 2015-01-24 23:19:27 UTC</sup>_
|
232
370
|
|
233
371
|
#### Bug Fixes
|
234
372
|
|
235
|
-
- Fixed a bug where did\_you\_mean incorrectly suggests protected methods when it just isn't callable ( [@glittershark](https://github.com/glittershark), [#34](https://github.com/
|
373
|
+
- Fixed a bug where did\_you\_mean incorrectly suggests protected methods when it just isn't callable ( [@glittershark](https://github.com/glittershark), [#34](https://github.com/ruby/did_you_mean/issues/34 "Did\_you\_mean incorrectly called when attempting to call protected/private method"))
|
236
374
|
|
237
|
-
## [v0.9.5](https://github.com/
|
375
|
+
## [v0.9.5](https://github.com/ruby/did_you_mean/tree/v0.9.5)
|
238
376
|
|
239
377
|
_<sup>released at 2015-01-07 12:41:23 UTC</sup>_
|
240
378
|
|
241
379
|
#### Bug Fixes
|
242
380
|
|
243
|
-
- Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/
|
381
|
+
- Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/ruby/did_you_mean/issues/19 "Significant Slowdown when Using Debugger"), [#20](https://github.com/ruby/did_you_mean/pull/20 "Whitelisting safe\_constantize (ActiveSupport::Inflector) method"))
|
244
382
|
|
245
|
-
## [v0.9.4](https://github.com/
|
383
|
+
## [v0.9.4](https://github.com/ruby/did_you_mean/tree/v0.9.4)
|
246
384
|
|
247
385
|
_<sup>released at 2014-11-19 20:00:00 UTC</sup>_
|
248
386
|
|
@@ -250,7 +388,7 @@ _<sup>released at 2014-11-19 20:00:00 UTC</sup>_
|
|
250
388
|
|
251
389
|
- Fixed a bug where no suggestions will be made on JRuby
|
252
390
|
|
253
|
-
## [v0.9.3](https://github.com/
|
391
|
+
## [v0.9.3](https://github.com/ruby/did_you_mean/tree/v0.9.3)
|
254
392
|
|
255
393
|
_<sup>released at 2014-11-18 03:50:11 UTC</sup>_
|
256
394
|
|
@@ -260,15 +398,15 @@ _<sup>released at 2014-11-18 03:50:11 UTC</sup>_
|
|
260
398
|
|
261
399
|
- Replaced the crazy C extension with a so much better one (thanks to [@nobu](https://github.com/nobu)!)
|
262
400
|
|
263
|
-
## [v0.9.2](https://github.com/
|
401
|
+
## [v0.9.2](https://github.com/ruby/did_you_mean/tree/v0.9.2)
|
264
402
|
|
265
403
|
_<sup>released at 2014-11-17 15:32:33 UTC</sup>_
|
266
404
|
|
267
405
|
#### Bug Fixes
|
268
406
|
|
269
|
-
- Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/
|
407
|
+
- Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/ruby/did_you_mean/issues/16 "Gem building failed on Debian 6.0.10 x86\_64"))
|
270
408
|
|
271
|
-
## [v0.9.1](https://github.com/
|
409
|
+
## [v0.9.1](https://github.com/ruby/did_you_mean/tree/v0.9.1)
|
272
410
|
|
273
411
|
_<sup>released at 2014-11-16 18:54:24 UTC</sup>_
|
274
412
|
|
@@ -277,15 +415,15 @@ _<sup>released at 2014-11-16 18:54:24 UTC</sup>_
|
|
277
415
|
#### Internal Changes
|
278
416
|
|
279
417
|
- Shrink the gem size by removing unneeded ruby header files.
|
280
|
-
- Now it forces everyone to upgrade the gem when they upgrade Ruby to a new version. This avoids introducing a bug like [#14](https://github.com/
|
418
|
+
- Now it forces everyone to upgrade the gem when they upgrade Ruby to a new version. This avoids introducing a bug like [#14](https://github.com/ruby/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem").
|
281
419
|
|
282
|
-
## [v0.9.0](https://github.com/
|
420
|
+
## [v0.9.0](https://github.com/ruby/did_you_mean/tree/v0.9.0)
|
283
421
|
|
284
422
|
_<sup>released at 2014-11-09 01:26:31 UTC</sup>_
|
285
423
|
|
286
424
|
#### Features
|
287
425
|
|
288
|
-
- did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/
|
426
|
+
- did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/ruby/did_you_mean/issues/12 "Suggest instance- and class-vars"), [<tt>39d1e2b</tt>](https://github.com/ruby/did_you_mean/commit/39d1e2bd66d6ff8acbc4dd5da922fc7e5fcefb20))
|
289
427
|
|
290
428
|
```ruby
|
291
429
|
@full_name = "Yuki Nishijima"
|
@@ -298,10 +436,10 @@ first_name, last_name = full_name.split(" ")
|
|
298
436
|
|
299
437
|
#### Bug Fixes
|
300
438
|
|
301
|
-
- Fixed a bug where did\_you\_mean changes some behaviours of Ruby 2.1.3/2.1.4 installed on Max OS X ( [#14](https://github.com/
|
302
|
-
- Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/
|
439
|
+
- Fixed a bug where did\_you\_mean changes some behaviours of Ruby 2.1.3/2.1.4 installed on Max OS X ( [#14](https://github.com/ruby/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem"), [<tt>44c451f</tt>](https://github.com/ruby/did_you_mean/commit/44c451f8c38b11763ba28ddf1ceb9696707ccea0), [<tt>9ebde21</tt>](https://github.com/ruby/did_you_mean/commit/9ebde211e92eac8494e704f627c62fea7fdbee16))
|
440
|
+
- Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/ruby/did_you_mean/commit/9865cc5a9ce926dd9ad4c20d575b710e5f257a4b))
|
303
441
|
|
304
|
-
## [v0.8.0](https://github.com/
|
442
|
+
## [v0.8.0](https://github.com/ruby/did_you_mean/tree/v0.8.0)
|
305
443
|
|
306
444
|
_<sup>released at 2014-10-27 02:03:13 UTC</sup>_
|
307
445
|
|
@@ -315,9 +453,9 @@ _<sup>released at 2014-10-27 02:03:13 UTC</sup>_
|
|
315
453
|
|
316
454
|
- Fixed a bug where did\_you\_mean unexpectedly disables [better\_errors](https://github.com/charliesome/better_errors)'s REPL
|
317
455
|
- Replaced [binding\_of\_caller](https://github.com/banister/binding_of_caller) dependency with [interception](https://github.com/ConradIrwin/interception)
|
318
|
-
- Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/
|
456
|
+
- Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/ruby/did_you_mean/pull/2 "Fix bug of DidYouMean::Levenshtein#min3."), [@fortissimo1997](https://github.com/fortissimo1997))
|
319
457
|
|
320
|
-
## [v0.7.0](https://github.com/
|
458
|
+
## [v0.7.0](https://github.com/ruby/did_you_mean/tree/v0.7.0)
|
321
459
|
|
322
460
|
_<sup>released at 2014-09-26 03:37:18 UTC</sup>_
|
323
461
|
|
@@ -335,7 +473,7 @@ _<sup>released at 2014-09-26 03:37:18 UTC</sup>_
|
|
335
473
|
|
336
474
|
- A lot of internal refactoring
|
337
475
|
|
338
|
-
## [v0.6.0](https://github.com/
|
476
|
+
## [v0.6.0](https://github.com/ruby/did_you_mean/tree/v0.6.0)
|
339
477
|
|
340
478
|
_<sup>released at 2014-05-18 00:23:24 UTC</sup>_
|
341
479
|
|
@@ -357,7 +495,7 @@ _<sup>released at 2014-05-18 00:23:24 UTC</sup>_
|
|
357
495
|
|
358
496
|
- Fixed a bug where did\_you\_mean segfaults on Ruby head(2.2.0dev)
|
359
497
|
|
360
|
-
## [v0.5.0](https://github.com/
|
498
|
+
## [v0.5.0](https://github.com/ruby/did_you_mean/tree/v0.5.0)
|
361
499
|
|
362
500
|
_<sup>released at 2014-05-10 17:59:54 UTC</sup>_
|
363
501
|
|
@@ -365,7 +503,7 @@ _<sup>released at 2014-05-10 17:59:54 UTC</sup>_
|
|
365
503
|
|
366
504
|
- Added support for Ruby 2.1.2
|
367
505
|
|
368
|
-
## [v0.4.0](https://github.com/
|
506
|
+
## [v0.4.0](https://github.com/ruby/did_you_mean/tree/v0.4.0)
|
369
507
|
|
370
508
|
_<sup>released at 2014-04-20 02:10:31 UTC</sup>_
|
371
509
|
|
@@ -385,7 +523,7 @@ User.new(flrst_name: "wrong flrst name")
|
|
385
523
|
|
386
524
|
- Fixed a bug where did\_you\_mean doesn't work with `ActiveRecord::UnknownAttributeError`
|
387
525
|
|
388
|
-
## [v0.3.1](https://github.com/
|
526
|
+
## [v0.3.1](https://github.com/ruby/did_you_mean/tree/v0.3.1)
|
389
527
|
|
390
528
|
_<sup>released at 2014-03-20 23:16:20 UTC</sup>_
|
391
529
|
|
@@ -394,7 +532,7 @@ _<sup>released at 2014-03-20 23:16:20 UTC</sup>_
|
|
394
532
|
- Changed output for readability.
|
395
533
|
- Made the spell checking algorithm slight better to find the correct method.
|
396
534
|
|
397
|
-
## [v0.3.0](https://github.com/
|
535
|
+
## [v0.3.0](https://github.com/ruby/did_you_mean/tree/v0.3.0)
|
398
536
|
|
399
537
|
_<sup>released at 2014-03-20 23:13:13 UTC</sup>_
|
400
538
|
|
@@ -402,7 +540,7 @@ _<sup>released at 2014-03-20 23:13:13 UTC</sup>_
|
|
402
540
|
|
403
541
|
- Added support for Ruby 2.1.1 and 2.2.0(head).
|
404
542
|
|
405
|
-
## [v0.2.0](https://github.com/
|
543
|
+
## [v0.2.0](https://github.com/ruby/did_you_mean/tree/v0.2.0)
|
406
544
|
|
407
545
|
_<sup>released on 2014-03-20 23:12:13 UTC</sup>_
|
408
546
|
|
@@ -414,7 +552,7 @@ _<sup>released on 2014-03-20 23:12:13 UTC</sup>_
|
|
414
552
|
|
415
553
|
- dropped support for JRuby and Rubbinious.
|
416
554
|
|
417
|
-
## [v0.1.0: First Release](https://github.com/
|
555
|
+
## [v0.1.0: First Release](https://github.com/ruby/did_you_mean/tree/v0.1.0)
|
418
556
|
|
419
557
|
_<sup>released on 2014-03-20 23:11:14 UTC</sup>_
|
420
558
|
|