did_you_mean 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/did_you_mean/finders/similar_method_finder.rb +3 -1
- data/lib/did_you_mean/version.rb +1 -1
- data/test/similar_method_finder_test.rb +12 -1
- metadata +2 -3
- data/CHANGELOG.md +0 -182
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c2e7741b6bedc61c7cc58e92c91865569048a9
|
4
|
+
data.tar.gz: 7e59a32ec4e252139f8d263f24b43c9b200ae533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67d987ee1812e17a2a4c06ff9c59d614fd2eb8d9bcc71e7ebceaa5a3b4591deaa854543656d1a84ff3e00b57994a7140febd203d0fbb432da2f7bb1ca72b2027
|
7
|
+
data.tar.gz: ff2c13185089c7c6f602f13e3deaf257415ceae0dadd494614989a6ffb85e61a8c9329b7ea8a87a290957ce403c70910f524daeb3ea2e7b0261492f6b0d2df87
|
data/lib/did_you_mean/version.rb
CHANGED
@@ -6,9 +6,12 @@ class SimilarMethodFinderTest < Minitest::Test
|
|
6
6
|
def first_name; end
|
7
7
|
def descendants; end
|
8
8
|
|
9
|
-
|
9
|
+
protected
|
10
|
+
def the_protected_method; end
|
10
11
|
|
12
|
+
private
|
11
13
|
def friend; end
|
14
|
+
def the_private_method; end
|
12
15
|
|
13
16
|
class << self
|
14
17
|
def load; end
|
@@ -46,4 +49,12 @@ class SimilarMethodFinderTest < Minitest::Test
|
|
46
49
|
error = assert_raises(NoMethodError){ User.new.dependents }
|
47
50
|
assert_suggestion error.finder.similar_words, :descendants
|
48
51
|
end
|
52
|
+
|
53
|
+
def test_private_methods_should_not_be_suggested
|
54
|
+
error = assert_raises(NoMethodError){ User.new.the_protected_method }
|
55
|
+
refute_includes error.finder.similar_words, 'the_protected_method'
|
56
|
+
|
57
|
+
error = assert_raises(NoMethodError){ User.new.the_private_method }
|
58
|
+
refute_includes error.finder.similar_words, 'the_private_method'
|
59
|
+
end
|
49
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: did_you_mean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki Nishijima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: interception
|
@@ -92,7 +92,6 @@ files:
|
|
92
92
|
- ".gitignore"
|
93
93
|
- ".travis.yml"
|
94
94
|
- Appraisals
|
95
|
-
- CHANGELOG.md
|
96
95
|
- Gemfile
|
97
96
|
- LICENSE.txt
|
98
97
|
- README.md
|
data/CHANGELOG.md
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
## [v0.9.5](https://github.com/yuki24/did_you_mean/tree/v0.9.5)
|
2
|
-
|
3
|
-
_<sup>released on 2015-01-07 12:41:23 UTC</sup>_
|
4
|
-
|
5
|
-
#### Bug Fixes
|
6
|
-
|
7
|
-
- Whitelist `#safe_constantize` method from `ActiveSupport::Inflector` to avoid significant performance slowdown ( [@tleish](https://github.com/tleish), [#19](https://github.com/yuki24/did_you_mean/issues/19 "Significant Slowdown when Using Debugger"), [#20](https://github.com/yuki24/did_you_mean/pull/20 "Whitelisting safe\_constantize (ActiveSupport::Inflector) method"))
|
8
|
-
|
9
|
-
## [v0.9.4](https://github.com/yuki24/did_you_mean/tree/v0.9.4)
|
10
|
-
|
11
|
-
_<sup>released on 2014-11-18 03:51:41 UTC</sup>_
|
12
|
-
|
13
|
-
#### Bug Fixes
|
14
|
-
|
15
|
-
- Fixed a bug where no suggestions will be made in JRuby
|
16
|
-
|
17
|
-
## [v0.9.3](https://github.com/yuki24/did_you_mean/tree/v0.9.3)
|
18
|
-
|
19
|
-
_<sup>released on 2014-11-18 03:19:24 UTC</sup>_
|
20
|
-
|
21
|
-
#### Internal Changes
|
22
|
-
|
23
|
-
- Replaced the crazy C extension with a so much better one (thanks to [@nobu](https://github.com/nobu)!)
|
24
|
-
|
25
|
-
## [v0.9.2](https://github.com/yuki24/did_you_mean/tree/v0.9.2)
|
26
|
-
|
27
|
-
_<sup>released on 2014-11-17 15:32:33 UTC</sup>_
|
28
|
-
|
29
|
-
#### Bug Fixes
|
30
|
-
|
31
|
-
- Fixed a bug where did\_you\_mean doesn't compile on Ruby 2.1.2/2.1.5 ( [#16](https://github.com/yuki24/did_you_mean/issues/16 "Gem building failed on Debian 6.0.10 x86\_64"))
|
32
|
-
|
33
|
-
## [v0.9.1](https://github.com/yuki24/did_you_mean/tree/v0.9.1)
|
34
|
-
|
35
|
-
_<sup>released on 2014-11-16 18:54:24 UTC</sup>_
|
36
|
-
|
37
|
-
#### Internal Changes
|
38
|
-
|
39
|
-
- Shrink the gem size by removing unneeded ruby header files.
|
40
|
-
- 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/yuki24/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem").
|
41
|
-
|
42
|
-
## [v0.9.0](https://github.com/yuki24/did_you_mean/tree/v0.9.0)
|
43
|
-
|
44
|
-
_<sup>released on 2014-11-09 01:26:31 UTC</sup>_
|
45
|
-
|
46
|
-
#### New Features
|
47
|
-
|
48
|
-
- did\_you\_mean now suggests instance variable names if `@` is missing ( [#12](https://github.com/yuki24/did_you_mean/issues/12 "Suggest instance- and class-vars"), [<tt>39d1e2b</tt>](https://github.com/yuki24/did_you_mean/commit/39d1e2bd66d6ff8acbc4dd5da922fc7e5fcefb20))
|
49
|
-
|
50
|
-
```ruby
|
51
|
-
@full_name = "Yuki Nishijima"
|
52
|
-
first_name, last_name = full_name.split(" ")
|
53
|
-
# => NameError: undefined local variable or method `full_name' for main:Object
|
54
|
-
#
|
55
|
-
# Did you mean? @full_name
|
56
|
-
#
|
57
|
-
```
|
58
|
-
|
59
|
-
#### Bug Fixes
|
60
|
-
|
61
|
-
- 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/yuki24/did_you_mean/issues/14 "Compatibility with `letter\_opener` gem"), [<tt>44c451f</tt>](https://github.com/yuki24/did_you_mean/commit/44c451f8c38b11763ba28ddf1ceb9696707ccea0), [<tt>9ebde21</tt>](https://github.com/yuki24/did_you_mean/commit/9ebde211e92eac8494e704f627c62fea7fdbee16))
|
62
|
-
- Fixed a bug where sometimes `NoMethodError` suggests duplicate method names ( [<tt>9865cc5</tt>](https://github.com/yuki24/did_you_mean/commit/9865cc5a9ce926dd9ad4c20d575b710e5f257a4b))
|
63
|
-
|
64
|
-
## [v0.8.0](https://github.com/yuki24/did_you_mean/tree/v0.8.0)
|
65
|
-
|
66
|
-
_<sup>released on 2014-10-27 02:03:13 UTC</sup>_
|
67
|
-
|
68
|
-
**This version has been yanked from rubygems.org as it has a serious bug with Ruby 2.1.3 and 2.1.4 installed on Max OS X. Please upgrade to 0.9.0 as soon as possible.**
|
69
|
-
|
70
|
-
#### New Features
|
71
|
-
|
72
|
-
- JRuby support!
|
73
|
-
|
74
|
-
#### Bug Fixes
|
75
|
-
|
76
|
-
- Fixed a bug where did\_you\_mean unexpectedly disables [better\_errors](https://github.com/charliesome/better_errors)'s REPL
|
77
|
-
- Replaced [binding\_of\_caller](https://github.com/banister/binding_of_caller) dependency with [interception](https://github.com/ConradIrwin/interception)
|
78
|
-
- Fixed the wrong implementation of Levenshtein algorithm ( [#2](https://github.com/yuki24/did_you_mean/pull/2 "Fix bug of DidYouMean::Levenshtein#min3."), [@fortissimo1997](https://github.com/fortissimo1997))
|
79
|
-
|
80
|
-
## [v0.7.0](https://github.com/yuki24/did_you_mean/tree/v0.7.0)
|
81
|
-
|
82
|
-
_<sup>released on 2014-09-26 03:37:18 UTC</sup>_
|
83
|
-
|
84
|
-
**This version has been yanked from rubygems.org as it has a serious bug with Ruby 2.1.3 and 2.1.4 installed on Max OS X. Please upgrade to 0.9.0 as soon as possible.**
|
85
|
-
|
86
|
-
#### New Features
|
87
|
-
|
88
|
-
- Added support for Ruby 2.1.3, 2.2.0-preview1 and ruby-head
|
89
|
-
- Added support for ActiveRecord 4.2.0.beta1
|
90
|
-
- Word searching is now about 40% faster than v0.6.0
|
91
|
-
- Removed `text` gem dependency
|
92
|
-
- Better output on pry and Rspec
|
93
|
-
|
94
|
-
#### Small/Internal Changes
|
95
|
-
|
96
|
-
- A lot of internal refactoring
|
97
|
-
|
98
|
-
## [v0.6.0](https://github.com/yuki24/did_you_mean/tree/v0.6.0)
|
99
|
-
|
100
|
-
_<sup>released on 2014-05-18 00:23:24 UTC</sup>_
|
101
|
-
|
102
|
-
**This version has been yanked from rubygems.org as it has a serious bug with Ruby 2.1.3 and 2.1.4 installed on Max OS X. Please upgrade to 0.9.0 as soon as possible.**
|
103
|
-
|
104
|
-
#### New Features
|
105
|
-
|
106
|
-
- Added basic support for constants. Now you'll see class name suggestions when you misspelled a class names/module names:
|
107
|
-
|
108
|
-
```ruby
|
109
|
-
> Ocject
|
110
|
-
# => NameError: uninitialized constant Ocject
|
111
|
-
#
|
112
|
-
# Did you mean? Object
|
113
|
-
#
|
114
|
-
```
|
115
|
-
|
116
|
-
#### Bug Fixes
|
117
|
-
|
118
|
-
- Fixed a bug where did\_you\_mean segfaults on Ruby head(2.2.0dev)
|
119
|
-
|
120
|
-
## [v0.5.0](https://github.com/yuki24/did_you_mean/tree/v0.5.0)
|
121
|
-
|
122
|
-
_<sup>released on 2014-05-10 17:59:54 UTC</sup>_
|
123
|
-
|
124
|
-
#### New Features
|
125
|
-
|
126
|
-
- Added support for Ruby 2.1.2
|
127
|
-
|
128
|
-
## [v0.4.0](https://github.com/yuki24/did_you_mean/tree/v0.4.0)
|
129
|
-
|
130
|
-
_<sup>released on 2014-04-20 02:10:31 UTC</sup>_
|
131
|
-
|
132
|
-
#### New Features
|
133
|
-
|
134
|
-
- did\_you\_mean now suggests a similar attribute name when you misspelled it.
|
135
|
-
|
136
|
-
```ruby
|
137
|
-
User.new(flrst_name: "wrong flrst name")
|
138
|
-
# => ActiveRecord::UnknownAttributeError: unknown attribute: flrst_name
|
139
|
-
#
|
140
|
-
# Did you mean? first_name: string
|
141
|
-
#
|
142
|
-
```
|
143
|
-
|
144
|
-
#### Bug Fixes
|
145
|
-
|
146
|
-
- Fixed a bug where did\_you\_mean doesn't work with `ActiveRecord::UnknownAttributeError`
|
147
|
-
|
148
|
-
## [v0.3.1](https://github.com/yuki24/did_you_mean/tree/v0.3.1)
|
149
|
-
|
150
|
-
_<sup>released on 2014-03-20 23:16:20 UTC</sup>_
|
151
|
-
|
152
|
-
#### Small/Internal Changes
|
153
|
-
|
154
|
-
- Changed output for readability.
|
155
|
-
- Better algorithm to find the correct method.
|
156
|
-
|
157
|
-
## [v0.3.0](https://github.com/yuki24/did_you_mean/tree/v0.3.0)
|
158
|
-
|
159
|
-
_<sup>released on 2014-03-20 23:13:13 UTC</sup>_
|
160
|
-
|
161
|
-
#### New Features
|
162
|
-
|
163
|
-
- Added support for Ruby 2.1.1 and 2.2.0(head).
|
164
|
-
|
165
|
-
## [v0.2.0](https://github.com/yuki24/did_you_mean/tree/v0.2.0)
|
166
|
-
|
167
|
-
_<sup>released on 2014-03-20 23:12:13 UTC</sup>_
|
168
|
-
|
169
|
-
#### Incompatible Changes
|
170
|
-
|
171
|
-
- dropped support for JRuby and Rubbinious.
|
172
|
-
|
173
|
-
#### New Features
|
174
|
-
|
175
|
-
- did\_you\_mean no longer makes Ruby slow.
|
176
|
-
|
177
|
-
## [v0.1.0: First Release](https://github.com/yuki24/did_you_mean/tree/v0.1.0)
|
178
|
-
|
179
|
-
_<sup>released on 2014-03-20 23:11:14 UTC</sup>_
|
180
|
-
|
181
|
-
- Now you will have "did you mean?" experience in Ruby!
|
182
|
-
- but still very experimental since this gem makes Ruby a lot slower.
|