thanx-style 0.0.22 → 0.0.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11c70ef2dc47d090b5edc4dc3834a9d8672e44257ae00357da099835bce566f5
4
- data.tar.gz: 1b8a169597129918bf0c001d480513db7b14c75393cba61d51fa55fccd43141d
3
+ metadata.gz: c505e9aba2da7daa103731b72d05b3434da51429d2b49c0409f4224692e72a8f
4
+ data.tar.gz: f55a20599f5bf2dd89d8796089e076faccd2bd412d5c2f70fcfcf568df339fdd
5
5
  SHA512:
6
- metadata.gz: 36b03eb20ac30016e2213f27b00c820c022d91bb9debec787e3d75cac72709833bfda7ec2e1f0324ac5c02bcc1e5987b1d8965390a44beb6f3ec2d36d514d7f0
7
- data.tar.gz: 304abec880be26f4e44b5d3bc386a636ef979d24b8106c9123e7782a8da42bd500ec1216f220feaf70267b778ecfc81578d9a958a8a270f332673274c8d3d666
6
+ metadata.gz: f9c2c3bad3de30da39034dea9487696bd711e1fbcfd6f8e477d60ed6c07149100b9e9d967688c3f653da10ae6a5f22986e9b4837faff3469463edf7be0b35ebf
7
+ data.tar.gz: 8c90a68b33a1e3889a68911d914aafcb778a520e2a938cb770b0a424a388a701b9d81e2dac3aa8b3c4289b6e390945d2e128c7886c370419edea212184596a02
@@ -1,5 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'danger'
5
+ rescue LoadError
6
+ puts 'danger is not installed'
7
+ exit(-1)
8
+ end
9
+
3
10
  system <<~CMD
4
11
  bundle exec danger --dangerfile=$(bundle show thanx-style)/.danger/rspec
5
12
  CMD
@@ -1,5 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'danger'
5
+ rescue LoadError
6
+ puts 'danger is not installed'
7
+ exit(-1)
8
+ end
9
+
3
10
  system <<~CMD
4
11
  bundle exec danger --dangerfile=$(bundle show thanx-style)/.danger/rubocop
5
12
  CMD
data/bin/thanx-rspec CHANGED
@@ -1,5 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'rspec'
5
+ rescue LoadError
6
+ puts 'rspec is not installed'
7
+ exit(-1)
8
+ end
9
+
3
10
  exit system <<~COMMAND
4
11
  bundle exec rspec \
5
12
  --color \
data/bin/thanx-rubocop CHANGED
@@ -1,11 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- formatter = '$(bundle show rubocop-junit-formatter)'
4
- formatter += '/lib/rubocop/formatter/junit_formatter.rb'
3
+ begin
4
+ require 'rubocop'
5
+ rescue LoadError
6
+ puts 'rubocop is not installed'
7
+ exit(-1)
8
+ end
9
+
10
+ has_formatter = Gem::Specification.find_all_by_name('rubocop-junit-formatter').any?
5
11
 
6
12
  exit system <<~COMMAND
7
13
  bundle exec rubocop \
8
- --require #{formatter} \
14
+ #{has_formatter ? '--require $(bundle show rubocop-junit-formatter)/lib/rubocop/formatter/junit_formatter.rb' : ''} \
9
15
  --format RuboCop::Formatter::JUnitFormatter \
10
16
  --out test-results/rubocop/results.xml \
11
17
  --format progress \
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Thanx # rubocop:disable Style/ClassAndModuleChildren
4
4
  module Style
5
- VERSION = '0.0.22'
5
+ VERSION = '0.0.29'
6
6
  end
7
7
  end
data/rubocop-rails.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  Rails/SafeNavigation:
2
2
  Description: Converts usages of try! or try to &..
3
- ConvertTry: true
3
+ ConvertTry: false
4
4
 
5
5
  Rails/SkipsModelValidations:
6
6
  Exclude:
@@ -12,4 +12,5 @@ Rails/UnknownEnv:
12
12
  - test
13
13
  - production
14
14
  - staging
15
+ - sandbox
15
16
  - demo
data/rubocop-ruby.yml CHANGED
@@ -10,61 +10,11 @@ Layout/AccessModifierIndentation:
10
10
  # But it can be overridden by setting this parameter
11
11
  IndentationWidth: ~
12
12
 
13
- # Align the elements of a hash literal if they span more than one line.
14
- Layout/AlignHash:
15
- # Alignment of entries using hash rocket as separator. Valid values are:
16
- #
17
- # key - left alignment of keys
18
- # 'a' => 2
19
- # 'bb' => 3
20
- # separator - alignment of hash rockets, keys are right aligned
21
- # 'a' => 2
22
- # 'bb' => 3
23
- # table - left alignment of keys, hash rockets, and values
24
- # 'a' => 2
25
- # 'bb' => 3
26
- EnforcedHashRocketStyle: table
27
- SupportedHashRocketStyles:
28
- - key
29
- - separator
30
- - table
31
- # Alignment of entries using colon as separator. Valid values are:
32
- #
33
- # key - left alignment of keys
34
- # a: 0
35
- # bb: 1
36
- # separator - alignment of colons, keys are right aligned
37
- # a: 0
38
- # bb: 1
39
- # table - left alignment of keys and values
40
- # a: 0
41
- # bb: 1
42
- EnforcedColonStyle: table
43
- SupportedColonStyles:
44
- - key
45
- - separator
46
- - table
47
-
48
- Layout/AlignParameters:
49
- # Alignment of parameters in multi-line method calls.
50
- #
51
- # The `with_first_parameter` style aligns the following lines along the same
52
- # column as the first parameter.
53
- #
54
- # method_call(a,
55
- # b)
56
- #
57
- # The `with_fixed_indentation` style aligns the following lines with one
58
- # level of indentation relative to the start of the line with the method call.
59
- #
60
- # method_call(a,
61
- # b)
13
+ Layout/ArgumentAlignment:
62
14
  EnforcedStyle: with_fixed_indentation
63
15
  SupportedStyles:
64
16
  - with_first_parameter
65
17
  - with_fixed_indentation
66
- # By default, the indentation width from Layout/IndentationWidth is used
67
- # But it can be overridden by setting this parameter
68
18
  IndentationWidth: ~
69
19
 
70
20
  # Indentation of `when`.
@@ -79,6 +29,11 @@ Layout/CaseIndentation:
79
29
  # This only matters if `IndentOneStep` is `true`
80
30
  IndentationWidth: ~
81
31
 
32
+ # This is generally a good idea, but it breaks a lot of our existing code
33
+ # and isn't worth enforcing in all cases.
34
+ Layout/EmptyLineAfterGuardClause:
35
+ Enabled: false
36
+
82
37
  # Align ends correctly.
83
38
  Layout/EndAlignment:
84
39
  # The value `keyword` means that `end` should be aligned with the matching
@@ -97,7 +52,7 @@ Layout/EndAlignment:
97
52
  Severity: warning
98
53
 
99
54
  # Checks the indentation of the first element in an array literal.
100
- Layout/IndentArray:
55
+ Layout/FirstArrayElementIndentation:
101
56
  # The value `special_inside_parentheses` means that array literals with
102
57
  # brackets that have their opening bracket on the same line as a surrounding
103
58
  # opening round parenthesis, shall have their first element indented relative
@@ -119,7 +74,7 @@ Layout/IndentArray:
119
74
  IndentationWidth: ~
120
75
 
121
76
  # Checks the indentation of the first key in a hash literal.
122
- Layout/IndentHash:
77
+ Layout/FirstHashElementIndentation:
123
78
  # The value `special_inside_parentheses` means that hash literals with braces
124
79
  # that have their opening brace on the same line as a surrounding opening
125
80
  # round parenthesis, shall have their first key indented relative to the
@@ -140,6 +95,62 @@ Layout/IndentHash:
140
95
  # But it can be overridden by setting this parameter
141
96
  IndentationWidth: ~
142
97
 
98
+ # Align the elements of a hash literal if they span more than one line.
99
+ Layout/HashAlignment:
100
+ # Alignment of entries using hash rocket as separator. Valid values are:
101
+ #
102
+ # key - left alignment of keys
103
+ # 'a' => 2
104
+ # 'bb' => 3
105
+ # separator - alignment of hash rockets, keys are right aligned
106
+ # 'a' => 2
107
+ # 'bb' => 3
108
+ # table - left alignment of keys, hash rockets, and values
109
+ # 'a' => 2
110
+ # 'bb' => 3
111
+ EnforcedHashRocketStyle: table
112
+ SupportedHashRocketStyles:
113
+ - key
114
+ - separator
115
+ - table
116
+ # Alignment of entries using colon as separator. Valid values are:
117
+ #
118
+ # key - left alignment of keys
119
+ # a: 0
120
+ # bb: 1
121
+ # separator - alignment of colons, keys are right aligned
122
+ # a: 0
123
+ # bb: 1
124
+ # table - left alignment of keys and values
125
+ # a: 0
126
+ # bb: 1
127
+ EnforcedColonStyle: table
128
+ SupportedColonStyles:
129
+ - key
130
+ - separator
131
+ - table
132
+
133
+ Layout/LineLength:
134
+ Max: 80
135
+ # To make it possible to copy or click on URIs in the code, we allow lines
136
+ # containing a URI to be longer than Max.
137
+ AllowHeredoc: true
138
+ AllowURI: true
139
+ URISchemes:
140
+ - http
141
+ - https
142
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
143
+ # directives like '# rubocop: enable ...' when calculating a line's length.
144
+ IgnoreCopDirectives: false
145
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
146
+ # elements. Strings will be converted to Regexp objects. A line that matches
147
+ # any regular expression listed in this option will be ignored by LineLength.
148
+ IgnoredPatterns: []
149
+ Exclude:
150
+ - 'db/migrate/*'
151
+ - '**/config/**/*'
152
+ - 'spec/factories.rb'
153
+
143
154
  Layout/MultilineMethodCallIndentation:
144
155
  EnforcedStyle: indented
145
156
  SupportedStyles:
@@ -150,6 +161,28 @@ Layout/MultilineMethodCallIndentation:
150
161
  # But it can be overridden by setting this parameter
151
162
  IndentationWidth: ~
152
163
 
164
+ Layout/ParameterAlignment:
165
+ # Alignment of parameters in multi-line method calls.
166
+ #
167
+ # The `with_first_parameter` style aligns the following lines along the same
168
+ # column as the first parameter.
169
+ #
170
+ # method_call(a,
171
+ # b)
172
+ #
173
+ # The `with_fixed_indentation` style aligns the following lines with one
174
+ # level of indentation relative to the start of the line with the method call.
175
+ #
176
+ # method_call(a,
177
+ # b)
178
+ EnforcedStyle: with_fixed_indentation
179
+ SupportedStyles:
180
+ - with_first_parameter
181
+ - with_fixed_indentation
182
+ # By default, the indentation width from Layout/IndentationWidth is used
183
+ # But it can be overridden by setting this parameter
184
+ IndentationWidth: ~
185
+
153
186
  # Checks that the equals signs in parameter default assignments have or don't
154
187
  # have surrounding space depending on configuration.
155
188
  Layout/SpaceAroundEqualsInParameterDefault:
@@ -160,7 +193,7 @@ Layout/SpaceAroundEqualsInParameterDefault:
160
193
 
161
194
  #################### Naming ##########################
162
195
 
163
- Naming/UncommunicativeMethodParamName:
196
+ Naming/MethodParameterName:
164
197
  # Parameter names may be equal to or greater than this value
165
198
  MinNameLength: 3
166
199
  AllowNamesEndingInNumbers: true
@@ -262,20 +295,10 @@ Style/BlockDelimiters:
262
295
  - expect
263
296
  Exclude:
264
297
  - 'spec/factories.rb'
265
-
266
- Style/BracesAroundHashParameters:
267
- EnforcedStyle: context_dependent
268
- SupportedStyles:
269
- # The `braces` style enforces braces around all method parameters that are
270
- # hashes.
271
- - braces
272
- # The `no_braces` style checks that the last parameter doesn't have braces
273
- # around it.
274
- - no_braces
275
- # The `context_dependent` style checks that the last parameter doesn't have
276
- # braces around it, but requires braces if the second to last parameter is
277
- # also a hash literal.
278
- - context_dependent
298
+ BracesRequiredMethods:
299
+ # Require braces for sorbet sigs to reduce noise.
300
+ # See https://github.com/rubocop-hq/rubocop/pull/7660
301
+ - 'sig'
279
302
 
280
303
  Style/ClassAndModuleChildren:
281
304
  # Checks the style of children definitions at classes and modules.
@@ -322,8 +345,6 @@ Style/Lambda:
322
345
  Description: 'Use the new lambda literal syntax for single-line blocks.'
323
346
  StyleGuide: '#lambda-multi-line'
324
347
  Enabled: true
325
- VersionAdded: '0.9'
326
- VersionChanged: '0.40'
327
348
  EnforcedStyle: literal
328
349
  SupportedStyles:
329
350
  - line_count_dependent
@@ -418,27 +439,6 @@ Metrics/ClassLength:
418
439
  Metrics/CyclomaticComplexity:
419
440
  Max: 10
420
441
 
421
- Metrics/LineLength:
422
- Max: 80
423
- # To make it possible to copy or click on URIs in the code, we allow lines
424
- # containing a URI to be longer than Max.
425
- AllowHeredoc: true
426
- AllowURI: true
427
- URISchemes:
428
- - http
429
- - https
430
- # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
431
- # directives like '# rubocop: enable ...' when calculating a line's length.
432
- IgnoreCopDirectives: false
433
- # The IgnoredPatterns option is a list of !ruby/regexp and/or string
434
- # elements. Strings will be converted to Regexp objects. A line that matches
435
- # any regular expression listed in this option will be ignored by LineLength.
436
- IgnoredPatterns: []
437
- Exclude:
438
- - 'db/migrate/*'
439
- - '**/config/**/*'
440
- - 'spec/factories.rb'
441
-
442
442
  Metrics/MethodLength:
443
443
  CountComments: false # count full line comments?
444
444
  Max: 20
data/rubocop.yml CHANGED
@@ -12,16 +12,21 @@ AllCops:
12
12
  DefaultFormatter: progress
13
13
  DisplayCopNames: true
14
14
  ExtraDetails: true
15
+ # Disable new cops by default since they'll cause noise on version upgrades.
16
+ # We can always enable them later.
17
+ NewCops: disable
15
18
 
16
19
  Rails:
17
20
  Enabled: true
18
21
 
19
- require: rubocop-rspec
22
+ require:
23
+ - rubocop-rspec
24
+ - rubocop-rails
20
25
 
21
26
  inherit_from:
22
27
  - rubocop-ruby.yml
23
28
  - rubocop-rspec.yml
24
29
  - rubocop-rails.yml
25
30
 
26
- Documentation:
31
+ Style/Documentation:
27
32
  Enabled: false
metadata CHANGED
@@ -1,183 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thanx-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eng @ Thanx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: danger
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 5.6.2
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 5.6.2
27
- - !ruby/object:Gem::Dependency
28
- name: danger-junit
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.7.4
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.7.4
41
- - !ruby/object:Gem::Dependency
42
- name: danger-rubocop_junit_parser
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.0.1
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.0.1
55
- - !ruby/object:Gem::Dependency
56
- name: danger-simplecov_json
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.3.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.3.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.58.2
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.58.2
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop-junit-formatter
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.1.4
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.1.4
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop-rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.27.0
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.27.0
111
- - !ruby/object:Gem::Dependency
112
- name: rspec_junit_formatter
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 0.4.1
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 0.4.1
125
- - !ruby/object:Gem::Dependency
126
- name: simplecov
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 0.16.1
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 0.16.1
139
- - !ruby/object:Gem::Dependency
140
- name: simplecov-json
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.2'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.2'
153
- - !ruby/object:Gem::Dependency
154
- name: simplecov-lcov
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '0.7'
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '0.7'
167
- - !ruby/object:Gem::Dependency
168
- name: bundler
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: '1.16'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '1.16'
11
+ date: 2021-04-03 00:00:00.000000000 Z
12
+ dependencies: []
181
13
  description: |
182
14
  Provides Ruby, Rails, and RSpec rubocop rules. Also provides helpers for
183
15
  properly formatting CI output.
@@ -223,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
55
  version: '0'
224
56
  requirements: []
225
57
  rubyforge_project:
226
- rubygems_version: 2.7.6
58
+ rubygems_version: 2.7.3
227
59
  signing_key:
228
60
  specification_version: 4
229
61
  summary: Quick install of ruby Thanx code style rules