rubocop-ordered_methods 0.6 → 0.7
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/.gitignore +1 -0
- data/.rubocop.yml +3 -1
- data/.rubocop_todo.yml +9 -11
- data/CHANGELOG.md +14 -1
- data/lib/rubocop/cop/layout/ordered_methods.rb +4 -0
- data/rubocop-ordered_methods.gemspec +3 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c161660f9f4755d2e7fe826d18a1cd704d9f62071736ea5dc4f8e540ed78cd14
|
4
|
+
data.tar.gz: 6f464af4d215c37dbeb402e0d81a730dcd96f6a77ae40892d60a382a847002c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7672dbef3e4fc3d5b84a814ec08f6e372d0dadc8d1fced783c7b74a6a4abc43c9d33e53b97b2c9b4e75bba73106b9a5238daaa9709333c6a477496eb18dfa3
|
7
|
+
data.tar.gz: 73c5f91133bd0a8c1e8acd669d1c8df7e969670250a49df9698e0ea547c20ba92e0282032007fdd1406948a700c16b996c832f63269ef2014736a7165cc177d6
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,26 +1,24 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-01-05 20:47:55 UTC using RuboCop version 1.7.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
9
|
# Offense count: 1
|
10
|
-
# Configuration parameters:
|
11
|
-
# Include: **/*.gemspec
|
12
|
-
Gemspec/RequiredRubyVersion:
|
13
|
-
Exclude:
|
14
|
-
- 'rubocop-ordered_methods.gemspec'
|
15
|
-
|
16
|
-
# Offense count: 1
|
17
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
10
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
18
11
|
Metrics/MethodLength:
|
19
12
|
Max: 11
|
20
13
|
|
21
|
-
# Offense count:
|
14
|
+
# Offense count: 1
|
15
|
+
# Cop supports --auto-correct.
|
16
|
+
Style/IfUnlessModifier:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/rubocop/cop/layout/ordered_methods.rb'
|
19
|
+
|
20
|
+
# Offense count: 1
|
22
21
|
# Cop supports --auto-correct.
|
23
22
|
Style/RedundantFreeze:
|
24
23
|
Exclude:
|
25
|
-
- 'lib/rubocop/cop/correctors/ordered_methods_corrector.rb'
|
26
24
|
- 'lib/rubocop/cop/layout/ordered_methods.rb'
|
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
- nothing
|
10
|
+
|
11
|
+
## [0.7] - 2021-01-11
|
12
|
+
|
13
|
+
### Removed
|
14
|
+
|
15
|
+
- Drop Ruby 2.3 support
|
16
|
+
- Drop support for rubocop < 1.0
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- Support for rubocop >= 1.0 ([#5](https://github.com/shanecav84/rubocop-ordered_methods/pull/5)). Thanks @jaredbeck.
|
21
|
+
|
9
22
|
## [0.6] - 2020-03-01
|
10
23
|
|
11
|
-
|
24
|
+
### Security
|
12
25
|
|
13
26
|
- Upgrade rake to avoid vulnerability https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8130
|
14
27
|
- rake is a development dependency for this gem, so shouldn't have been a risk for production
|
@@ -81,6 +81,9 @@ module RuboCop
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
# We disable `Style/ExplicitBlockArgument` for performance. See
|
85
|
+
# https://github.com/shanecav84/rubocop-ordered_methods/pull/5#pullrequestreview-562957146
|
86
|
+
# rubocop:disable Style/ExplicitBlockArgument
|
84
87
|
def consecutive_methods(nodes)
|
85
88
|
filtered = filter_relevant_nodes(nodes)
|
86
89
|
filtered_and_grouped = group_methods_by_access_modifier(filtered)
|
@@ -90,6 +93,7 @@ module RuboCop
|
|
90
93
|
end
|
91
94
|
end
|
92
95
|
end
|
96
|
+
# rubocop:enable Style/ExplicitBlockArgument
|
93
97
|
|
94
98
|
def filter_relevant_nodes(nodes)
|
95
99
|
nodes.select do |node|
|
@@ -5,14 +5,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'rubocop-ordered_methods'
|
8
|
-
spec.version = '0.
|
8
|
+
spec.version = '0.7'
|
9
9
|
spec.authors = ['Shane Cavanaugh']
|
10
10
|
spec.email = ['shane@shanecav.net']
|
11
11
|
|
12
12
|
spec.summary = 'Checks that methods are ordered alphabetically.'
|
13
13
|
spec.homepage = 'https://github.com/shanecav84/rubocop-ordered_methods'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
spec.required_ruby_version = '>= 2.
|
15
|
+
spec.required_ruby_version = '>= 2.4'
|
16
16
|
|
17
17
|
# Specify which files should be added to the gem when it is released.
|
18
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ['lib']
|
28
28
|
|
29
|
-
spec.add_runtime_dependency 'rubocop', '>= 0
|
29
|
+
spec.add_runtime_dependency 'rubocop', '>= 1.0'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler'
|
32
32
|
spec.add_development_dependency 'rake', '~> 12.3.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-ordered_methods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Cavanaugh
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email:
|
71
71
|
- shane@shanecav.net
|
72
72
|
executables: []
|
@@ -97,7 +97,7 @@ homepage: https://github.com/shanecav84/rubocop-ordered_methods
|
|
97
97
|
licenses:
|
98
98
|
- MIT
|
99
99
|
metadata: {}
|
100
|
-
post_install_message:
|
100
|
+
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|
103
103
|
- lib
|
@@ -105,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
105
|
requirements:
|
106
106
|
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 2.
|
108
|
+
version: '2.4'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubygems_version: 3.1.2
|
116
|
-
signing_key:
|
116
|
+
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Checks that methods are ordered alphabetically.
|
119
119
|
test_files: []
|