meowcop 2.9.0 → 2.10.0
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/config/rubocop.yml +12 -0
- data/lib/meowcop.rb +4 -1
- data/lib/meowcop/cli.rb +29 -19
- data/lib/meowcop/version.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0654c20774656a4c069be2bd8308621ea07d03cd32e2e9fbb882d54a6072ef6
|
4
|
+
data.tar.gz: c39fe83362454b177554609b3015516e307a588e937a3ed79667910b39b8fe23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec1aae3e590d152277202e3f34181df8cec3634f7af4dcf86b41441069b72185fef069673d05cc64b3f615dc715b1cb20a65bfab71aaa7883efbe05f4ccfa537
|
7
|
+
data.tar.gz: 3d61e588acb2a1d6a2b3f62499e27fc99e8d88c8a120628d8d071554bf1b7e1d4f9a60a6596aa92ecd7ee3c9bbea14ef69fb85b1a4ffba04cf731069dda0125f
|
data/config/rubocop.yml
CHANGED
@@ -106,6 +106,8 @@ Layout/EmptyLineAfterGuardClause:
|
|
106
106
|
Enabled: false
|
107
107
|
Layout/EmptyLinesAroundAccessModifier:
|
108
108
|
Enabled: false
|
109
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
110
|
+
Enabled: false
|
109
111
|
Layout/EmptyLinesAroundBeginBody:
|
110
112
|
Enabled: false
|
111
113
|
Layout/EmptyLinesAroundBlockBody:
|
@@ -180,6 +182,8 @@ Layout/SpaceAroundEqualsInParameterDefault:
|
|
180
182
|
Enabled: false
|
181
183
|
Layout/SpaceAroundKeyword:
|
182
184
|
Enabled: false
|
185
|
+
Layout/SpaceAroundMethodCallOperator:
|
186
|
+
Enabled: false
|
183
187
|
Layout/SpaceAroundOperators:
|
184
188
|
Enabled: false
|
185
189
|
Layout/SpaceBeforeBlockBraces:
|
@@ -500,6 +504,8 @@ Style/RedundantConditional:
|
|
500
504
|
Enabled: false
|
501
505
|
Style/RedundantException:
|
502
506
|
Enabled: false
|
507
|
+
Style/RedundantFetchBlock:
|
508
|
+
Enabled: false
|
503
509
|
Style/RedundantFreeze:
|
504
510
|
Enabled: false
|
505
511
|
Style/RedundantInterpolation:
|
@@ -508,6 +514,10 @@ Style/RedundantParentheses:
|
|
508
514
|
Enabled: false
|
509
515
|
Style/RedundantPercentQ:
|
510
516
|
Enabled: false
|
517
|
+
Style/RedundantRegexpCharacterClass:
|
518
|
+
Enabled: false
|
519
|
+
Style/RedundantRegexpEscape:
|
520
|
+
Enabled: false
|
511
521
|
Style/RedundantReturn:
|
512
522
|
Enabled: false
|
513
523
|
Style/RedundantSelf:
|
@@ -540,6 +550,8 @@ Style/SingleLineBlockParams:
|
|
540
550
|
Enabled: false
|
541
551
|
Style/SingleLineMethods:
|
542
552
|
Enabled: false
|
553
|
+
Style/SlicingWithRange:
|
554
|
+
Enabled: false
|
543
555
|
Style/SpecialGlobalVars:
|
544
556
|
Enabled: false
|
545
557
|
Style/StabbyLambdaParentheses:
|
data/lib/meowcop.rb
CHANGED
data/lib/meowcop/cli.rb
CHANGED
@@ -23,17 +23,24 @@
|
|
23
23
|
# THE SOFTWARE.
|
24
24
|
require 'fileutils'
|
25
25
|
|
26
|
-
module
|
26
|
+
module MeowCop
|
27
27
|
class CLI
|
28
28
|
CONFIG_FILE_NAME = ".rubocop.yml".freeze
|
29
29
|
|
30
|
+
EXIT_SUCCESS = 0
|
31
|
+
EXIT_FAILURE = 1
|
32
|
+
|
33
|
+
Options = Struct.new(:version, :help)
|
34
|
+
|
30
35
|
def self.start(args)
|
31
36
|
action_name = args.shift || 'help'
|
32
37
|
|
33
38
|
instance = self.new
|
39
|
+
|
34
40
|
unless instance.public_methods(false).include?(action_name.to_sym)
|
35
|
-
puts "Could not find command #{action_name}."
|
36
|
-
|
41
|
+
puts "Could not find command '#{action_name}'."
|
42
|
+
instance.help(args)
|
43
|
+
return EXIT_FAILURE
|
37
44
|
end
|
38
45
|
|
39
46
|
instance.public_send(action_name, args)
|
@@ -44,30 +51,33 @@ module Meowcop
|
|
44
51
|
FileUtils.copy_file(config_file_path, CONFIG_FILE_NAME)
|
45
52
|
puts "Meow! #{CONFIG_FILE_NAME} has been #{action} successfully."
|
46
53
|
|
47
|
-
|
54
|
+
EXIT_SUCCESS
|
48
55
|
end
|
49
56
|
|
50
57
|
def run(args)
|
51
58
|
require 'rubocop'
|
52
59
|
|
53
|
-
|
54
|
-
args = [
|
55
|
-
'--config', config_file_path,
|
56
|
-
*args
|
57
|
-
]
|
58
|
-
cli.run(args)
|
60
|
+
RuboCop::CLI.new.run(['--config', config_file_path, *args])
|
59
61
|
end
|
60
62
|
|
61
63
|
def help(_args)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
64
|
+
puts <<-END
|
65
|
+
Usage: meowcop <command>
|
66
|
+
|
67
|
+
Commands:
|
68
|
+
init Setup .rubocop.yml
|
69
|
+
run Run RuboCop with MeowCop
|
70
|
+
version Show version
|
71
|
+
help Show help
|
72
|
+
END
|
73
|
+
|
74
|
+
EXIT_SUCCESS
|
75
|
+
end
|
76
|
+
|
77
|
+
def version(_args)
|
78
|
+
puts VERSION
|
79
|
+
|
80
|
+
EXIT_SUCCESS
|
71
81
|
end
|
72
82
|
|
73
83
|
private
|
data/lib/meowcop/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
2
|
-
VERSION = "2.
|
1
|
+
module MeowCop
|
2
|
+
VERSION = "2.10.0".freeze
|
3
3
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meowcop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sleeek Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.86.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.86.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
rubygems_version: 3.1.
|
140
|
+
rubygems_version: 3.1.4
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: A RuboCop configuration focusing Lint
|