sevencop 0.48.1 → 0.49.1
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/.rubocop.yml +1 -1
- data/Gemfile.lock +17 -14
- data/README.md +0 -2
- data/lib/rubocop/cop/sevencop/rails_order_field_in_order_of.rb +3 -3
- data/lib/rubocop/cop/sevencop/rails_specific_action_name.rb +34 -1
- data/lib/rubocop/cop/sevencop/rspec_describe_http_endpoint.rb +1 -1
- data/lib/sevencop/version.rb +1 -1
- data/sevencop.gemspec +1 -1
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f37a21f5f3200e1a3b4dbebeef0ddc2a33b2068b83d6a494c4d1ff7e13ed6db
|
|
4
|
+
data.tar.gz: 8c321fd4ca9ba2d71c8f52d0746fec923eb028071713a198cbf59490f6ea4d09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7d780c4973e2ce0889ae259c71d43cb6ea21f7d3b973ef3d5a2c0c506243e2e5f52593d29b5e8175729729ebc14b21f70a88cf236c8898abee3d3be6a1813b3
|
|
7
|
+
data.tar.gz: 72be4f5db61232463c25d7c4ada1b691463ae27d489e6068fb131116849cb8f4f568f91d6e350b8c9c206ecdf7791e7dbcf4396eab4bf77a295edceb8107c90f
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sevencop (0.
|
|
4
|
+
sevencop (0.49.1)
|
|
5
5
|
activesupport
|
|
6
6
|
lint_roller (>= 1.1)
|
|
7
7
|
rubocop (>= 1.72.1)
|
|
@@ -9,38 +9,40 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (
|
|
12
|
+
activesupport (8.1.4)
|
|
13
13
|
base64
|
|
14
|
-
benchmark (>= 0.3)
|
|
15
14
|
bigdecimal
|
|
16
15
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
16
|
connection_pool (>= 2.2.5)
|
|
18
17
|
drb
|
|
19
18
|
i18n (>= 1.6, < 2)
|
|
19
|
+
json
|
|
20
20
|
logger (>= 1.4.2)
|
|
21
21
|
minitest (>= 5.1)
|
|
22
22
|
securerandom (>= 0.3)
|
|
23
23
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
24
|
+
uri (>= 0.13.1)
|
|
24
25
|
ast (2.4.3)
|
|
25
26
|
base64 (0.3.0)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
connection_pool (2.5.4)
|
|
27
|
+
bigdecimal (4.1.3)
|
|
28
|
+
concurrent-ruby (1.3.8)
|
|
29
|
+
connection_pool (3.0.2)
|
|
30
30
|
diff-lcs (1.6.1)
|
|
31
31
|
drb (2.2.3)
|
|
32
|
-
i18n (1.
|
|
32
|
+
i18n (1.15.2)
|
|
33
33
|
concurrent-ruby (~> 1.0)
|
|
34
34
|
json (2.10.2)
|
|
35
35
|
language_server-protocol (3.17.0.4)
|
|
36
36
|
lint_roller (1.1.0)
|
|
37
37
|
logger (1.7.0)
|
|
38
|
-
minitest (
|
|
38
|
+
minitest (6.0.6)
|
|
39
|
+
drb (~> 2.0)
|
|
40
|
+
prism (~> 1.5)
|
|
39
41
|
parallel (1.26.3)
|
|
40
42
|
parser (3.3.7.4)
|
|
41
43
|
ast (~> 2.4.1)
|
|
42
44
|
racc
|
|
43
|
-
prism (1.
|
|
45
|
+
prism (1.9.0)
|
|
44
46
|
racc (1.8.1)
|
|
45
47
|
rainbow (3.1.1)
|
|
46
48
|
rake (13.2.1)
|
|
@@ -86,9 +88,10 @@ GEM
|
|
|
86
88
|
securerandom (0.4.1)
|
|
87
89
|
tzinfo (2.0.6)
|
|
88
90
|
concurrent-ruby (~> 1.0)
|
|
89
|
-
unicode-display_width (3.
|
|
90
|
-
unicode-emoji (~> 4.
|
|
91
|
-
unicode-emoji (4.0
|
|
91
|
+
unicode-display_width (3.3.0)
|
|
92
|
+
unicode-emoji (~> 4.3)
|
|
93
|
+
unicode-emoji (4.3.0)
|
|
94
|
+
uri (1.1.2)
|
|
92
95
|
|
|
93
96
|
PLATFORMS
|
|
94
97
|
ruby
|
|
@@ -103,4 +106,4 @@ DEPENDENCIES
|
|
|
103
106
|
sevencop!
|
|
104
107
|
|
|
105
108
|
BUNDLED WITH
|
|
106
|
-
|
|
109
|
+
4.0.20
|
data/README.md
CHANGED
|
@@ -59,7 +59,7 @@ module RuboCop
|
|
|
59
59
|
(?<column_name>[^,]+)
|
|
60
60
|
,\s*
|
|
61
61
|
\z
|
|
62
|
-
/ix
|
|
62
|
+
/ix
|
|
63
63
|
|
|
64
64
|
REGEXP_FIELD_DSTR_TAIL = /
|
|
65
65
|
\A
|
|
@@ -71,7 +71,7 @@ module RuboCop
|
|
|
71
71
|
(?<order>asc|desc)
|
|
72
72
|
)?
|
|
73
73
|
\z
|
|
74
|
-
/ix
|
|
74
|
+
/ix
|
|
75
75
|
|
|
76
76
|
REGEXP_FIELD_STR = /
|
|
77
77
|
\A
|
|
@@ -89,7 +89,7 @@ module RuboCop
|
|
|
89
89
|
)?
|
|
90
90
|
\s*
|
|
91
91
|
\z
|
|
92
|
-
/ix
|
|
92
|
+
/ix
|
|
93
93
|
|
|
94
94
|
MSG = 'Prefer `in_order_of` to MySQL `FIELD` function if possible.'
|
|
95
95
|
|
|
@@ -20,6 +20,22 @@ module RuboCop
|
|
|
20
20
|
# def index
|
|
21
21
|
# end
|
|
22
22
|
# end
|
|
23
|
+
#
|
|
24
|
+
# # good
|
|
25
|
+
# module UsersConcern
|
|
26
|
+
# class_methods do
|
|
27
|
+
# def articles
|
|
28
|
+
# end
|
|
29
|
+
# end
|
|
30
|
+
# end
|
|
31
|
+
#
|
|
32
|
+
# # good
|
|
33
|
+
# class UsersController < ApplicationController
|
|
34
|
+
# class << self
|
|
35
|
+
# def articles
|
|
36
|
+
# end
|
|
37
|
+
# end
|
|
38
|
+
# end
|
|
23
39
|
class RailsSpecificActionName < Base
|
|
24
40
|
include VisibilityHelp
|
|
25
41
|
|
|
@@ -44,7 +60,7 @@ module RuboCop
|
|
|
44
60
|
# @param node [RuboCop::AST::DefNode]
|
|
45
61
|
# @return [Boolean]
|
|
46
62
|
def action?(node)
|
|
47
|
-
node_visibility(node) == :public
|
|
63
|
+
node_visibility(node) == :public && !class_method?(node)
|
|
48
64
|
end
|
|
49
65
|
|
|
50
66
|
# @param node [RuboCop::AST::DefNode]
|
|
@@ -54,6 +70,23 @@ module RuboCop
|
|
|
54
70
|
!configured_action_name?(node)
|
|
55
71
|
end
|
|
56
72
|
|
|
73
|
+
# @param node [RuboCop::AST::DefNode]
|
|
74
|
+
# @return [Boolean]
|
|
75
|
+
def class_method?(node)
|
|
76
|
+
node.each_ancestor do |ancestor|
|
|
77
|
+
return true if class_methods_block?(ancestor) || ancestor.sclass_type?
|
|
78
|
+
return false if ancestor.type?(:class, :module)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
false
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @param node [RuboCop::AST::Node]
|
|
85
|
+
# @return [Boolean]
|
|
86
|
+
def class_methods_block?(node)
|
|
87
|
+
node.type?(:block, :numblock) && node.method?(:class_methods)
|
|
88
|
+
end
|
|
89
|
+
|
|
57
90
|
# @param node [RuboCop::AST::DefNode]
|
|
58
91
|
# @return [Boolean]
|
|
59
92
|
def configured_action_name?(node)
|
data/lib/sevencop/version.rb
CHANGED
data/sevencop.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = 'Opinionated custom cops for RuboCop.'
|
|
12
12
|
spec.homepage = 'https://github.com/r7kamura/sevencop'
|
|
13
13
|
spec.license = 'MIT'
|
|
14
|
-
spec.required_ruby_version = '>=
|
|
14
|
+
spec.required_ruby_version = '>= 3.3'
|
|
15
15
|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sevencop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.49.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -52,7 +51,6 @@ dependencies:
|
|
|
52
51
|
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
53
|
version: 1.72.1
|
|
55
|
-
description:
|
|
56
54
|
email:
|
|
57
55
|
- r7kamura@gmail.com
|
|
58
56
|
executables: []
|
|
@@ -110,7 +108,6 @@ metadata:
|
|
|
110
108
|
source_code_uri: https://github.com/r7kamura/sevencop
|
|
111
109
|
changelog_uri: https://github.com/r7kamura/sevencop/releases
|
|
112
110
|
default_lint_roller_plugin: Sevencop::Plugin
|
|
113
|
-
post_install_message:
|
|
114
111
|
rdoc_options: []
|
|
115
112
|
require_paths:
|
|
116
113
|
- lib
|
|
@@ -118,15 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
118
115
|
requirements:
|
|
119
116
|
- - ">="
|
|
120
117
|
- !ruby/object:Gem::Version
|
|
121
|
-
version: '
|
|
118
|
+
version: '3.3'
|
|
122
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
120
|
requirements:
|
|
124
121
|
- - ">="
|
|
125
122
|
- !ruby/object:Gem::Version
|
|
126
123
|
version: '0'
|
|
127
124
|
requirements: []
|
|
128
|
-
rubygems_version:
|
|
129
|
-
signing_key:
|
|
125
|
+
rubygems_version: 4.0.20
|
|
130
126
|
specification_version: 4
|
|
131
127
|
summary: Opinionated custom cops for RuboCop.
|
|
132
128
|
test_files: []
|