meowcop 2.9.0 → 2.10.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: 171cbe2c181520b8965ba51940c5743e829b1a6503e76fa13a91dfb8c494bfce
4
- data.tar.gz: b35be57e13884213d67dace11f5f20c0a4109dfa1d6397ae618a7b74d6b0f822
3
+ metadata.gz: c0654c20774656a4c069be2bd8308621ea07d03cd32e2e9fbb882d54a6072ef6
4
+ data.tar.gz: c39fe83362454b177554609b3015516e307a588e937a3ed79667910b39b8fe23
5
5
  SHA512:
6
- metadata.gz: c003b19be3d59fdd5998c60d813ece37b836aed045812023ce86594cb2ea4cc3c8482db0c09dada3a89954d286892f7133caea1891792ad74ba9fb64fb2b6413
7
- data.tar.gz: 760f0f57edc42f6e840b7cb0f0b5a84f2d784093a8982875e074d57c8effff6c16b88cc4899dfc6bbf236c76d0a28654ebcf60b12d11a5c83c76a0f2e8fd8c01
6
+ metadata.gz: ec1aae3e590d152277202e3f34181df8cec3634f7af4dcf86b41441069b72185fef069673d05cc64b3f615dc715b1cb20a65bfab71aaa7883efbe05f4ccfa537
7
+ data.tar.gz: 3d61e588acb2a1d6a2b3f62499e27fc99e8d88c8a120628d8d071554bf1b7e1d4f9a60a6596aa92ecd7ee3c9bbea14ef69fb85b1a4ffba04cf731069dda0125f
@@ -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:
@@ -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.9.0".freeze
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.9.0
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-04-17 00:00:00.000000000 Z
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.82.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.82.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.2
140
+ rubygems_version: 3.1.4
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: A RuboCop configuration focusing Lint