meowcop 2.6.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f69749bc8f59e9e1a3350bd24b3d3962ddaad861747c552b9205b2d98f56834c
4
- data.tar.gz: 3c3bb7c8567778603cd89bceaf0ee551fce02d621bf8ee7ee5d9212d54cd80f3
3
+ metadata.gz: 6af4586799a4365eee7df8faf40e6b482e19169a4b2882ec887a9e108258bcf1
4
+ data.tar.gz: 4cf6a4a6a71df7486dae9e9f37501b241b1ed58b90a9b7bfda8096f8dc08f405
5
5
  SHA512:
6
- metadata.gz: 28e7ee3e953fddc40b232b33ab167465bef620a7cc16f12193ad2af9d584ed8270c7d1bd292320e93f5ec30d20f0f86490f4ac9bdc5cccc0f3fb9c1a9ca4ccf9
7
- data.tar.gz: 66215da747d6668968d5c69e8546f85c893d79585754b2db7e46069203925b09c62b1b8055678163d5e3de6925b42d124bb7c81cb97bd90e0d90c0f9a68d13cc
6
+ metadata.gz: 6bb2f6605da88a6c21fd4ec53563a9fb65b48a45c8011c359206f08dd72636bc8ffc297c34b755978890c7501bef45466052c56ba35e5a32714e0b1fbc65837c
7
+ data.tar.gz: 474108e27c31a33da8221bdc8c25cfe92c849e30aae117108c5b0b74f57d3e277fca46e5742f0502ebf046143427bc59ee3477cbc571b2b53abcc380d3032475
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/meowcop.svg)](https://badge.fury.io/rb/meowcop)
4
4
 
5
5
  MeowCop is a gem for shareable [RuboCop](https://www.rubocop.org) configuration, it focuses [Lint](https://en.wikipedia.org/wiki/Lint_(software)).
6
- It's recommended by Sider, Inc.
6
+ It's recommended by Sider.
7
7
 
8
8
  ## Design
9
9
 
@@ -55,8 +55,6 @@ Metrics/ClassLength:
55
55
  Enabled: false
56
56
  Metrics/CyclomaticComplexity:
57
57
  Max: 10
58
- Metrics/LineLength:
59
- Max: 200
60
58
  Metrics/MethodLength:
61
59
  Enabled: false
62
60
  Metrics/ModuleLength:
@@ -108,6 +106,8 @@ Layout/EmptyLineAfterGuardClause:
108
106
  Enabled: false
109
107
  Layout/EmptyLinesAroundAccessModifier:
110
108
  Enabled: false
109
+ Layout/EmptyLinesAroundAttributeAccessor:
110
+ Enabled: false
111
111
  Layout/EmptyLinesAroundBeginBody:
112
112
  Enabled: false
113
113
  Layout/EmptyLinesAroundBlockBody:
@@ -146,6 +146,8 @@ Layout/InitialIndentation:
146
146
  Enabled: false
147
147
  Layout/LeadingCommentSpace:
148
148
  Enabled: false
149
+ Layout/LineLength:
150
+ Max: 200
149
151
  Layout/MultilineArrayBraceLayout:
150
152
  Enabled: false
151
153
  Layout/MultilineAssignmentLayout:
@@ -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:
@@ -256,6 +260,8 @@ Naming/MethodParameterName:
256
260
  # === Disabled cops: BEGIN ===
257
261
  Style/AccessModifierDeclarations:
258
262
  Enabled: false
263
+ Style/AccessorGrouping:
264
+ Enabled: false
259
265
  Style/Alias:
260
266
  Enabled: false
261
267
  Style/AndOr:
@@ -272,12 +278,12 @@ Style/BarePercentLiterals:
272
278
  Enabled: false
273
279
  Style/BeginBlock:
274
280
  Enabled: false
281
+ Style/BisectedAttrAccessor:
282
+ Enabled: false
275
283
  Style/BlockComments:
276
284
  Enabled: false
277
285
  Style/BlockDelimiters:
278
286
  Enabled: false
279
- Style/BracesAroundHashParameters:
280
- Enabled: false
281
287
  Style/CaseEquality:
282
288
  Enabled: false
283
289
  Style/CharacterLiteral:
@@ -314,6 +320,8 @@ Style/DefWithParentheses:
314
320
  Enabled: false
315
321
  Style/Dir:
316
322
  Enabled: false
323
+ Style/DisableCopsWithinSourceCodeDirective:
324
+ Enabled: false
317
325
  Style/Documentation:
318
326
  Enabled: false
319
327
  Style/DocumentationMethod:
@@ -348,6 +356,8 @@ Style/EvenOdd:
348
356
  Enabled: false
349
357
  Style/ExpandPathArguments:
350
358
  Enabled: false
359
+ Style/ExponentialNotation:
360
+ Enabled: false
351
361
  Style/FloatDivision:
352
362
  Enabled: false
353
363
  Style/For:
@@ -362,8 +372,14 @@ Style/GlobalVars:
362
372
  Enabled: false
363
373
  Style/GuardClause:
364
374
  Enabled: false
375
+ Style/HashEachMethods:
376
+ Enabled: false
365
377
  Style/HashSyntax:
366
378
  Enabled: false
379
+ Style/HashTransformKeys:
380
+ Enabled: false
381
+ Style/HashTransformValues:
382
+ Enabled: false
367
383
  Style/IdenticalConditionalBranches:
368
384
  Enabled: false
369
385
  Style/IfInsideElse:
@@ -482,6 +498,8 @@ Style/RaiseArgs:
482
498
  Enabled: false
483
499
  Style/RandomWithOffset:
484
500
  Enabled: false
501
+ Style/RedundantAssignment:
502
+ Enabled: false
485
503
  Style/RedundantBegin:
486
504
  Enabled: false
487
505
  Style/RedundantCapitalW:
@@ -490,7 +508,7 @@ Style/RedundantCondition:
490
508
  Enabled: false
491
509
  Style/RedundantConditional:
492
510
  Enabled: false
493
- Style/RedundantException:
511
+ Style/RedundantFetchBlock:
494
512
  Enabled: false
495
513
  Style/RedundantFreeze:
496
514
  Enabled: false
@@ -500,6 +518,10 @@ Style/RedundantParentheses:
500
518
  Enabled: false
501
519
  Style/RedundantPercentQ:
502
520
  Enabled: false
521
+ Style/RedundantRegexpCharacterClass:
522
+ Enabled: false
523
+ Style/RedundantRegexpEscape:
524
+ Enabled: false
503
525
  Style/RedundantReturn:
504
526
  Enabled: false
505
527
  Style/RedundantSelf:
@@ -532,6 +554,8 @@ Style/SingleLineBlockParams:
532
554
  Enabled: false
533
555
  Style/SingleLineMethods:
534
556
  Enabled: false
557
+ Style/SlicingWithRange:
558
+ Enabled: false
535
559
  Style/SpecialGlobalVars:
536
560
  Enabled: false
537
561
  Style/StabbyLambdaParentheses:
@@ -566,6 +590,8 @@ Style/TrailingCommaInArguments:
566
590
  Enabled: false
567
591
  Style/TrailingCommaInArrayLiteral:
568
592
  Enabled: false
593
+ Style/TrailingCommaInBlockArgs:
594
+ Enabled: false
569
595
  Style/TrailingCommaInHashLiteral:
570
596
  Enabled: false
571
597
  Style/TrailingMethodEndStatement:
@@ -1,6 +1,9 @@
1
1
  require "meowcop/version"
2
2
  require 'meowcop/cli'
3
3
 
4
- module Meowcop
4
+ module MeowCop
5
5
  # Your code goes here...
6
6
  end
7
+
8
+ # Ensure backward compatibility
9
+ Meowcop = MeowCop
@@ -23,17 +23,24 @@
23
23
  # THE SOFTWARE.
24
24
  require 'fileutils'
25
25
 
26
- module Meowcop
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
- action_name = 'help'
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
- return 0
54
+ EXIT_SUCCESS
48
55
  end
49
56
 
50
57
  def run(args)
51
58
  require 'rubocop'
52
59
 
53
- cli = RuboCop::CLI.new
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
- msg = <<-END
63
- MeowCop commands:
64
- init - Setup .rubocop.yml
65
- help - Show this message
66
- run - Run RuboCop with MeowCop
67
- END
68
- puts msg
69
-
70
- return 0
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
@@ -1,3 +1,3 @@
1
- module Meowcop
2
- VERSION = "2.6.0".freeze
1
+ module MeowCop
2
+ VERSION = "2.11.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.6.0
4
+ version: 2.11.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: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2020-07-08 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.77.0
19
+ version: 0.87.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.77.0
29
+ version: 0.87.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
@@ -36,32 +36,26 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.12'
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '3.0'
39
+ version: '2.1'
43
40
  type: :development
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
- version: '1.12'
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '3.0'
46
+ version: '2.1'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rake
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
- - - "~>"
51
+ - - ">="
58
52
  - !ruby/object:Gem::Version
59
53
  version: '13.0'
60
54
  type: :development
61
55
  prerelease: false
62
56
  version_requirements: !ruby/object:Gem::Requirement
63
57
  requirements:
64
- - - "~>"
58
+ - - ">="
65
59
  - !ruby/object:Gem::Version
66
60
  version: '13.0'
67
61
  - !ruby/object:Gem::Dependency
@@ -70,43 +64,43 @@ dependencies:
70
64
  requirements:
71
65
  - - ">="
72
66
  - !ruby/object:Gem::Version
73
- version: 5.11.3
67
+ version: '5.14'
74
68
  type: :development
75
69
  prerelease: false
76
70
  version_requirements: !ruby/object:Gem::Requirement
77
71
  requirements:
78
72
  - - ">="
79
73
  - !ruby/object:Gem::Version
80
- version: 5.11.3
74
+ version: '5.14'
81
75
  - !ruby/object:Gem::Dependency
82
76
  name: minitest-reporters
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
85
79
  - - ">="
86
80
  - !ruby/object:Gem::Version
87
- version: 1.3.8
81
+ version: '1.4'
88
82
  type: :development
89
83
  prerelease: false
90
84
  version_requirements: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - ">="
93
87
  - !ruby/object:Gem::Version
94
- version: 1.3.8
88
+ version: '1.4'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: activesupport
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
- - - "<"
93
+ - - ">="
100
94
  - !ruby/object:Gem::Version
101
- version: 6.0.0
95
+ version: '5.2'
102
96
  type: :development
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
- - - "<"
100
+ - - ">="
107
101
  - !ruby/object:Gem::Version
108
- version: 6.0.0
109
- description: MeowCop is a RuboCop configuration recommended by Sider, Inc.
102
+ version: '5.2'
103
+ description: MeowCop is a RuboCop configuration recommended by Sider.
110
104
  email: support@sider.review
111
105
  executables:
112
106
  - meowcop
@@ -136,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
130
  requirements:
137
131
  - - ">="
138
132
  - !ruby/object:Gem::Version
139
- version: 2.3.0
133
+ version: 2.4.0
140
134
  required_rubygems_version: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - ">="
143
137
  - !ruby/object:Gem::Version
144
138
  version: '0'
145
139
  requirements: []
146
- rubygems_version: 3.0.3
140
+ rubygems_version: 3.1.4
147
141
  signing_key:
148
142
  specification_version: 4
149
143
  summary: A RuboCop configuration focusing Lint