rubocop-obsession 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubocop/cop/mixin/helpers.rb +7 -3
- data/lib/rubocop/obsession/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39eccc2042bacc3bca61a4dc992aa38dcca8d7c734e0aa7661b4091e7e1cac2c
|
4
|
+
data.tar.gz: a8f61cd4628e3340e00a144958db6e0eacf60f1505043f6c21a7868a7e4ed664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fc06812358cdcd5b26c776dd964f5b341c02a70c4e8200f7542c75fe19026d913b6626c84da8af5a8b5c7cef6b3f36a8e6c4d80b367b664d769baa6ba8d92ca
|
7
|
+
data.tar.gz: d4367dd495d6e5848ad83122214be0a7b6af21dc4ea92278a0c5e97ccc4442a12f777a98838a231cc5336715e86c18de70ae8a86a99e5a04bc0f125f591ef472
|
@@ -3,8 +3,6 @@
|
|
3
3
|
module RuboCop
|
4
4
|
module Cop
|
5
5
|
module Helpers
|
6
|
-
VERBS = File.read("#{__dir__}/files/verbs.txt").split
|
7
|
-
|
8
6
|
def rails_callback?(callback)
|
9
7
|
return true if callback == 'validate'
|
10
8
|
|
@@ -20,7 +18,13 @@ module RuboCop
|
|
20
18
|
def verb?(string)
|
21
19
|
short_string = string[2..] if string.start_with?('re')
|
22
20
|
|
23
|
-
|
21
|
+
verbs.include?(string) || verbs.include?(short_string)
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def verbs
|
27
|
+
@@verbs ||= File.read("#{__dir__}/files/verbs.txt").split
|
24
28
|
end
|
25
29
|
end
|
26
30
|
end
|