datarockets-style 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/CHANGELOG.md +13 -1
- data/Gemfile.lock +21 -18
- data/config/base.yml +48 -0
- data/config/rails.yml +2 -2
- data/config/rspec.yml +3 -0
- data/datarockets-style.gemspec +2 -2
- data/doc/STYLE_GUIDE_RSPEC.md +4 -0
- data/lib/datarockets/style/formatter/todo_list_formatter.rb +2 -1
- data/lib/datarockets/style/formatter/todo_list_formatter/report_summary.rb +1 -1
- data/lib/datarockets/style/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7fafb7c948730c343855a68d07997ccd3810e8167c2a015e8d36bc62f4d131ed
|
4
|
+
data.tar.gz: 9949285276625c8fc9c699b0cf81b95d571d33d48cc01d28079bfa389a550398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 257dfbd765bb44afca6141ad304c8be3140d7b3755b8a39755a5a5d335cc01422cad573ddbd5aab99067a65703b7933a073f53bd7b0a276f8340f42a31a426a5
|
7
|
+
data.tar.gz: 54a27bdd31588eda01c775ec316886fc835f29d714b5a848f858ba828a73e8c845ea2e524231bf8dd31779bc1fb788e90e28b44de0ba94eb1574d957b97a2a31
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,19 @@
|
|
2
2
|
|
3
3
|
The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-format).
|
4
4
|
|
5
|
-
##
|
5
|
+
## 0.11.0 (2020-11-07)
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
* Update rubocop to '0.93.1'. ([@r.dubrovsky][])
|
10
|
+
* Enable new cops `Lint/BinaryOperatorWithIdenticalOperands`, `Lint/DuplicateRescueException`, `Lint/EmptyConditionalBody`, `Lint/FloatComparison`, `Lint/MissingSuper
|
11
|
+
`, `Lint/OutOfRangeRegexpRef`, `Lint/SelfAssignment`, `Lint/TopLevelReturnWithArgument`, `Lint/UnreachableLoop`, `Style/ExplicitBlockArgument`, `Style/GlobalStdStream`, `Style/OptionalBooleanParameter`, `Style/SingleArgumentDig`, `Style/SoleNestedConditional` and `Style/StringConcatenation` in version `0.89`.
|
12
|
+
* Allow to add all new lints automatically.
|
13
|
+
* Add auto-correctable count notification.
|
14
|
+
* Fix tests
|
15
|
+
* Update rubocop-rails to `2.7.1`.
|
16
|
+
* Update rubocop-rspec tp `1.43.2`.
|
17
|
+
* Disable `RSpec/MultipleMemoizedHelpers` cop.
|
6
18
|
|
7
19
|
## 0.10.0 (2020-07-17)
|
8
20
|
|
data/Gemfile.lock
CHANGED
@@ -1,30 +1,31 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
datarockets-style (0.
|
5
|
-
rubocop (~> 0.
|
6
|
-
rubocop-rails (>= 2.6.0, < 2.
|
4
|
+
datarockets-style (0.11.0)
|
5
|
+
rubocop (~> 0.93)
|
6
|
+
rubocop-rails (>= 2.6.0, < 2.8.0)
|
7
7
|
rubocop-rspec (~> 1.42)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (6.0.3.4)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 0.7, < 2)
|
15
15
|
minitest (~> 5.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
17
18
|
ast (2.4.1)
|
18
19
|
byebug (11.1.3)
|
19
20
|
coderay (1.1.2)
|
20
|
-
concurrent-ruby (1.1.
|
21
|
+
concurrent-ruby (1.1.7)
|
21
22
|
diff-lcs (1.3)
|
22
|
-
i18n (1.8.
|
23
|
+
i18n (1.8.5)
|
23
24
|
concurrent-ruby (~> 1.0)
|
24
25
|
method_source (1.0.0)
|
25
|
-
minitest (5.14.
|
26
|
+
minitest (5.14.2)
|
26
27
|
parallel (1.19.2)
|
27
|
-
parser (2.7.
|
28
|
+
parser (2.7.2.0)
|
28
29
|
ast (~> 2.4.1)
|
29
30
|
pry (0.13.1)
|
30
31
|
coderay (~> 1.1)
|
@@ -35,7 +36,7 @@ GEM
|
|
35
36
|
rack (2.2.3)
|
36
37
|
rainbow (3.0.0)
|
37
38
|
rake (13.0.1)
|
38
|
-
regexp_parser (1.
|
39
|
+
regexp_parser (1.8.2)
|
39
40
|
rexml (3.2.4)
|
40
41
|
rspec (3.9.0)
|
41
42
|
rspec-core (~> 3.9.0)
|
@@ -50,28 +51,30 @@ GEM
|
|
50
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
51
52
|
rspec-support (~> 3.9.0)
|
52
53
|
rspec-support (3.9.0)
|
53
|
-
rubocop (0.
|
54
|
+
rubocop (0.93.1)
|
54
55
|
parallel (~> 1.10)
|
55
|
-
parser (>= 2.7.1.
|
56
|
+
parser (>= 2.7.1.5)
|
56
57
|
rainbow (>= 2.2.2, < 4.0)
|
57
|
-
regexp_parser (>= 1.
|
58
|
+
regexp_parser (>= 1.8)
|
58
59
|
rexml
|
59
|
-
rubocop-ast (>= 0.
|
60
|
+
rubocop-ast (>= 0.6.0)
|
60
61
|
ruby-progressbar (~> 1.7)
|
61
62
|
unicode-display_width (>= 1.4.0, < 2.0)
|
62
|
-
rubocop-ast (
|
63
|
-
parser (>= 2.7.
|
64
|
-
rubocop-rails (2.
|
63
|
+
rubocop-ast (1.1.1)
|
64
|
+
parser (>= 2.7.1.5)
|
65
|
+
rubocop-rails (2.7.1)
|
65
66
|
activesupport (>= 4.2.0)
|
66
67
|
rack (>= 1.1)
|
67
|
-
rubocop (>= 0.82.0)
|
68
|
-
rubocop-rspec (1.42.0)
|
69
68
|
rubocop (>= 0.87.0)
|
69
|
+
rubocop-rspec (1.44.1)
|
70
|
+
rubocop (~> 0.87)
|
71
|
+
rubocop-ast (>= 0.7.1)
|
70
72
|
ruby-progressbar (1.10.1)
|
71
73
|
thread_safe (0.3.6)
|
72
74
|
tzinfo (1.2.7)
|
73
75
|
thread_safe (~> 0.1)
|
74
76
|
unicode-display_width (1.7.0)
|
77
|
+
zeitwerk (2.4.1)
|
75
78
|
|
76
79
|
PLATFORMS
|
77
80
|
ruby
|
data/config/base.yml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
require: datarockets/style
|
2
2
|
|
3
|
+
AllCops:
|
4
|
+
NewCops: enable
|
5
|
+
|
3
6
|
Bundler/DuplicatedGem:
|
4
7
|
Enabled: true
|
5
8
|
|
@@ -54,21 +57,48 @@ Layout/SpaceInsideHashLiteralBraces:
|
|
54
57
|
EnforcedStyle: no_space
|
55
58
|
EnforcedStyleForEmptyBraces: no_space
|
56
59
|
|
60
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
61
|
+
Enabled: true
|
62
|
+
|
57
63
|
Lint/DeprecatedOpenSSLConstant:
|
58
64
|
Enabled: true
|
59
65
|
|
60
66
|
Lint/DuplicateElsifCondition:
|
61
67
|
Enabled: true
|
62
68
|
|
69
|
+
Lint/DuplicateRescueException:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Lint/EmptyConditionalBody:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Lint/FloatComparison:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Lint/MissingSuper:
|
79
|
+
Enabled: true
|
80
|
+
|
63
81
|
Lint/MixedRegexpCaptureTypes:
|
64
82
|
Enabled: true
|
65
83
|
|
84
|
+
Lint/OutOfRangeRegexpRef:
|
85
|
+
Enabled: true
|
86
|
+
|
66
87
|
Lint/RaiseException:
|
67
88
|
Enabled: true
|
68
89
|
|
90
|
+
Lint/SelfAssignment:
|
91
|
+
Enabled: true
|
92
|
+
|
69
93
|
Lint/StructNewOverride:
|
70
94
|
Enabled: true
|
71
95
|
|
96
|
+
Lint/TopLevelReturnWithArgument:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
Lint/UnreachableLoop:
|
100
|
+
Enabled: true
|
101
|
+
|
72
102
|
Naming/MemoizedInstanceVariableName:
|
73
103
|
EnforcedStyleForLeadingUnderscores: required
|
74
104
|
|
@@ -93,9 +123,15 @@ Style/ClassAndModuleChildren:
|
|
93
123
|
Style/EmptyMethod:
|
94
124
|
EnforcedStyle: expanded
|
95
125
|
|
126
|
+
Style/ExplicitBlockArgument:
|
127
|
+
Enabled: true
|
128
|
+
|
96
129
|
Style/ExponentialNotation:
|
97
130
|
Enabled: true
|
98
131
|
|
132
|
+
Style/GlobalStdStream:
|
133
|
+
Enabled: true
|
134
|
+
|
99
135
|
Style/HashAsLastArrayItem:
|
100
136
|
Enabled: true
|
101
137
|
EnforcedStyle: no_braces
|
@@ -118,6 +154,9 @@ Style/FrozenStringLiteralComment:
|
|
118
154
|
Style/NestedInterpolation:
|
119
155
|
Enabled: true
|
120
156
|
|
157
|
+
Style/OptionalBooleanParameter:
|
158
|
+
Enabled: true
|
159
|
+
|
121
160
|
Style/RedundantAssignment:
|
122
161
|
Enabled: true
|
123
162
|
|
@@ -133,8 +172,17 @@ Style/RedundantRegexpCharacterClass:
|
|
133
172
|
Style/RedundantRegexpEscape:
|
134
173
|
Enabled: true
|
135
174
|
|
175
|
+
Style/SingleArgumentDig:
|
176
|
+
Enabled: true
|
177
|
+
|
136
178
|
Style/SlicingWithRange:
|
137
179
|
Enabled: true
|
138
180
|
|
181
|
+
Style/SoleNestedConditional:
|
182
|
+
Enabled: true
|
183
|
+
|
184
|
+
Style/StringConcatenation:
|
185
|
+
Enabled: true
|
186
|
+
|
139
187
|
Style/StringLiterals:
|
140
188
|
EnforcedStyle: double_quotes
|
data/config/rails.yml
CHANGED
data/config/rspec.yml
CHANGED
data/datarockets-style.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.add_dependency "rubocop", "~> 0.
|
34
|
-
spec.add_dependency "rubocop-rails", ">= 2.6.0", "< 2.
|
33
|
+
spec.add_dependency "rubocop", "~> 0.93"
|
34
|
+
spec.add_dependency "rubocop-rails", ">= 2.6.0", "< 2.8.0"
|
35
35
|
spec.add_dependency "rubocop-rspec", "~> 1.42"
|
36
36
|
end
|
data/doc/STYLE_GUIDE_RSPEC.md
CHANGED
@@ -15,6 +15,10 @@ This style guide recommends best practices for writing a clear Rspec tests and e
|
|
15
15
|
So there are not any limits for deep or nested groups.
|
16
16
|
<sup>[[link](#rspec-nested-groups)]</sup>
|
17
17
|
|
18
|
+
* <a name="rspec-let-count"></a>
|
19
|
+
We're not limiting a number of `let` blocks in describe and context blocks.
|
20
|
+
<sup>[[link](#rspec-let-count)]</sup>
|
21
|
+
|
18
22
|
* <a name="rspec-subject"></a>
|
19
23
|
Each subject should be named, and we should not use `subject` in our test cases.
|
20
24
|
Prefer to use `is_expected` that `expect(subject_name)` for small tests.
|
@@ -42,7 +42,8 @@ class TodoListFormatter < RuboCop::Formatter::ProgressFormatter
|
|
42
42
|
def finished(inspected_files)
|
43
43
|
report_summary(inspected_files.length,
|
44
44
|
@total_offense_count,
|
45
|
-
@total_correction_count
|
45
|
+
@total_correction_count,
|
46
|
+
@total_correctable_count)
|
46
47
|
output.puts
|
47
48
|
|
48
49
|
Datarockets::Style::Formatter::TodoListFormatter::ReportSummary.new(offense_list).call(output)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datarockets-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Dubrovsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07
|
11
|
+
date: 2020-11-07 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: '0.93'
|
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: '0.93'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 2.6.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 2.
|
36
|
+
version: 2.8.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.6.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 2.
|
46
|
+
version: 2.8.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rubocop-rspec
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
|
123
|
-
rubygems_version: 2.6.14
|
122
|
+
rubygems_version: 3.1.2
|
124
123
|
signing_key:
|
125
124
|
specification_version: 4
|
126
125
|
summary: Datarockets style guides and shared style configs
|