datarockets-style 0.6.1 → 0.9.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/.github/ISSUE_TEMPLATE/update-dependencies.md +1 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- data/.github/workflows/main.yml +41 -0
- data/.rubocop.yml +10 -1
- data/CHANGELOG.md +81 -8
- data/Gemfile.lock +42 -21
- data/Makefile +10 -0
- data/README.md +18 -3
- data/config/base.yml +57 -9
- data/config/rails.yml +7 -0
- data/config/rspec.yml +3 -0
- data/datarockets-style.gemspec +4 -3
- data/doc/STYLE_GUIDE.md +44 -25
- data/doc/STYLE_GUIDE_RAILS.md +27 -1
- data/doc/STYLE_GUIDE_RSPEC.md +63 -2
- data/lib/datarockets/style.rb +3 -0
- data/lib/datarockets/style/cop/layout/array_alignment_extended.rb +83 -0
- data/lib/datarockets/style/cop/style/nested_interpolation.rb +37 -0
- data/lib/datarockets/style/formatter/todo_list_formatter/report_summary.rb +2 -2
- data/lib/datarockets/style/version.rb +1 -1
- data/manual/cops_layout.md +74 -0
- metadata +26 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e242588724f25da2f7b419cdaa056a5bfaf6124f
|
4
|
+
data.tar.gz: 8f9a0dee26834329998c453b204be71e8f9de398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b304b6c5bf560780de884e8cbc0fbe4e9b6fbe8760284561e5b5548c281bc34122a6750c987de5a467d56ac99396f3c03ccd7e496ca5c3bd8d6d7a29f3ced32
|
7
|
+
data.tar.gz: d7f847d65457edf80911a60f205697f53c410d3a59364a12899e6e1e9151d6294a7d78ae7b98006da726c44f3f69234a4e647889efc74fe08c0afcca7faef19d
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Before you submit a pull request, please make sure you have to follow:
|
2
2
|
|
3
|
-
- [ ] read and know items from the [Contributing Guide](CONTRIBUTING.md#pull-requests)
|
3
|
+
- [ ] read and know items from the [Contributing Guide](https://github.com/datarockets/datarockets-style/blob/master/CONTRIBUTING.md#pull-requests)
|
4
4
|
- [ ] add a description of the problem you're trying to solve (short summary from related issue)
|
5
5
|
- [ ] verified that cops are ordered by alphabet
|
6
6
|
- [ ] add a note to the style guide docs (if it needs)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: Run tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- 'master'
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- 'master'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v1
|
17
|
+
|
18
|
+
- uses: actions/cache@v1
|
19
|
+
with:
|
20
|
+
path: vendor/bundle
|
21
|
+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
22
|
+
restore-keys: |
|
23
|
+
${{ runner.os }}-gem-
|
24
|
+
|
25
|
+
- name: Set up Ruby 2.6
|
26
|
+
uses: actions/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: 2.6.x
|
29
|
+
|
30
|
+
- name: Install and run bundler
|
31
|
+
run: |
|
32
|
+
gem install bundler
|
33
|
+
bundle config path vendor/bundle
|
34
|
+
bundle install --jobs 4 --retry 3
|
35
|
+
|
36
|
+
- name: Run linter
|
37
|
+
run: make lint
|
38
|
+
|
39
|
+
- name: Run tests
|
40
|
+
run: make test
|
41
|
+
|
data/.rubocop.yml
CHANGED
@@ -2,5 +2,14 @@ inherit_from:
|
|
2
2
|
- config/ruby.yml
|
3
3
|
- config/rspec.yml
|
4
4
|
|
5
|
+
inherit_mode:
|
6
|
+
merge:
|
7
|
+
- Exclude
|
8
|
+
|
5
9
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
10
|
+
TargetRubyVersion: 2.4
|
11
|
+
|
12
|
+
# for checking cops with interpolation
|
13
|
+
Lint/InterpolationCheck:
|
14
|
+
Exclude:
|
15
|
+
- 'spec/**/*.rb'
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,78 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-
|
|
4
4
|
|
5
5
|
## master (unreleased)
|
6
6
|
|
7
|
+
## 0.9.0 (2020-05-27)
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
|
11
|
+
* **(Breaking)** Drop support for Ruby 2.3. ([@r.dubrovsky][])
|
12
|
+
|
13
|
+
* Update rubocop to '0.84.0'. ([@r.dubrovsky][])
|
14
|
+
* Enable new cops `Lint/RaiseException` and `Lint/StructNewOverride`. Cops were added in version `0.81`.
|
15
|
+
* Enable new cops `Layout/SpaceAroundMethodCallOperator` and `Style/ExponentialNotation`. Cops were added in version `0.82`.
|
16
|
+
* Enable new cops `Layout/EmptyLinesAroundAttributeAccessor` and `Style/SlicingWithRange`. Cops were added in version `0.83`.
|
17
|
+
* Enable new cop `Lint/DeprecatedOpenSSLConstant`. Cop was added in version `0.84`.
|
18
|
+
|
19
|
+
* Update rubocop-rails to `2.5.2`.
|
20
|
+
* Update rubocop-rspec to `1.39`.
|
21
|
+
* Update `activesupport` for fixing security issues.
|
22
|
+
|
23
|
+
## 0.8.1 (2020-03-02)
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
* Update rubocop to `0.80.1`.
|
28
|
+
|
29
|
+
## 0.8.0 (2020-02-20)
|
30
|
+
|
31
|
+
### Added
|
32
|
+
|
33
|
+
* Add `Style/NestedInterpolation` cop. ([@r.dubrovsky][])
|
34
|
+
|
35
|
+
### Changed
|
36
|
+
|
37
|
+
* Update rubocop to `0.80.0`. ([@r.dubrovsky][])
|
38
|
+
* Add `Style/HashEachMethods`, `Style/HashTransformKey`, `Style/HashTransformValues` cops.
|
39
|
+
* [#7641](https://github.com/rubocop-hq/rubocop/issues/7641): Remove `Style/BracesAroundHashParameters` cop.
|
40
|
+
|
41
|
+
* Update rubocop-rspec to `1.38.1`.
|
42
|
+
* Add RSpec/RepeatedExampleGroupBody cop. ([@ula][])
|
43
|
+
* Add RSpec/RepeatedExampleGroupDescription cop. ([@ula][])
|
44
|
+
|
45
|
+
* Enable `rubocop-rails` cops for rails config. ([@ula][])
|
46
|
+
* Setup `Style/Documentation` for rails config. ([@r.dubrovsky][])
|
47
|
+
* Setup `Style/ClassAndModuleChildren` cop. ([@r.dubrovsky][])
|
48
|
+
* Enable `RSpec/LetSetup` cop. ([@r.dubrovsky][])
|
49
|
+
|
50
|
+
## 0.7.0 (2020-01-27)
|
51
|
+
|
52
|
+
### Added
|
53
|
+
|
54
|
+
* [#130](https://github.com/datarockets/datarockets-style/issues/130): Add Layout/ArrayAlignmentExtended cop ([@nikitasakov][])
|
55
|
+
|
56
|
+
### Changed
|
57
|
+
|
58
|
+
* Update rubocop to `0.79.0`.
|
59
|
+
* Update rubocop-rspec to `1.37.1`.
|
60
|
+
* Add notes for setting up Rspec configuration for fixing Rspec internal style issues. ([@r.dubrovsky][])
|
61
|
+
* [#58](https://github.com/datarockets/datarockets-style/issues/58): Disable `RSpec/LetSetup` cop by default. ([@ula][])
|
62
|
+
|
63
|
+
### Fixed
|
64
|
+
|
65
|
+
* [#80](https://github.com/datarockets/datarockets-style/issues/80): Allows adding additional files and directories to excluding block for rubocop. ([@nikitasakov][])
|
66
|
+
* Fix documentation issues. ([@ula][])
|
67
|
+
|
68
|
+
|
69
|
+
## 0.6.2 (2019-12-05)
|
70
|
+
|
71
|
+
### Changed
|
72
|
+
|
73
|
+
* Update rubocop to `0.77.0`.
|
74
|
+
|
75
|
+
## Fixed
|
76
|
+
|
77
|
+
* [#137](https://github.com/datarockets/datarockets-style/issues/137): Usage of rubocop 0.77.0 version causes errors. ([@d.kachur][])
|
78
|
+
|
7
79
|
## 0.6.1 (2019-11-06)
|
8
80
|
|
9
81
|
### Fixed
|
@@ -41,11 +113,11 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-
|
|
41
113
|
### Changed
|
42
114
|
|
43
115
|
* Update rubocop-rspec to `1.35.0`. ([@r.dubrovsky][])
|
44
|
-
* Use
|
116
|
+
* Use context-dependent style for curly braces around hash params. ([@v.kuzmik][])
|
45
117
|
* Use leading underscores in cached instance variable name (cop: `Naming/MemoizedInstanceVariableName`). ([@ula][])
|
46
|
-
* Allow use `for`
|
47
|
-
* Change `Layout/AlignArguments` and `Layout/IndentFirstHashElement` cops for
|
48
|
-
* Enable `Layout/MultilineMethodCallIndentation` cop for
|
118
|
+
* Allow use `for` with `RSpec/ContextWording` cop. ([@r.dubrovsky][])
|
119
|
+
* Change `Layout/AlignArguments` and `Layout/IndentFirstHashElement` cops for aligning arguments with fixed indentation. ([@r.dubrovsky][])
|
120
|
+
* Enable `Layout/MultilineMethodCallIndentation` cop for aligning arguments with fixed indentation. ([@r.dubrovsky][], [@ula][])
|
49
121
|
|
50
122
|
## 0.3.0 (2019-08-02)
|
51
123
|
|
@@ -67,7 +139,7 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-
|
|
67
139
|
### Changed
|
68
140
|
|
69
141
|
* Update rubocop to `0.73.0`. ([@r.dubrovsky][])
|
70
|
-
* Use
|
142
|
+
* Use preferred variable name in rescued exceptions (cop: `Naming/RescuedExceptionsVariableName`). ([@ula][])
|
71
143
|
* Disable `RSpec/ImplicitSubject` cop for rspec files. ([@r.dubrovsky][])
|
72
144
|
|
73
145
|
## 0.1.0 (2019-06-27)
|
@@ -86,16 +158,17 @@ The format is described in [Contributing notes](CONTRIBUTING.md#changelog-entry-
|
|
86
158
|
* Change the limit for size of line to 120 symbols. ([@r.dubrovsky][])
|
87
159
|
* Disable `Metrics/BlockLength` cop for rspec files. ([@r.dubrovsky][])
|
88
160
|
* Exclude rubocop checking for some config directories. ([@r.dubrovsky][])
|
89
|
-
* Enable
|
90
|
-
* Do not add spaces
|
161
|
+
* Enable preferring double quotes for string literals. ([@r.dubrovsky][])
|
162
|
+
* Do not add spaces between hash literal braces (cop `Layout/SpaceInsideHashLiteralBraces`). ([@r.dubrovsky][])
|
91
163
|
* Prefer normal style for `Layout/IndentationConsistency` cop for Rails apps too. ([@r.dubrovsky][])
|
92
164
|
* Change style to `variable` for `Layout/EndAlignment` cop. ([@r.dubrovsky][])
|
93
165
|
* Change style to `with_fixed_indentation` with indentation width 2 for `Layout/AlignParameter` cop. ([@r.dubrovsky][])
|
94
|
-
* Always
|
166
|
+
* Always ignore hash aligning for key word arguments. (cop: `Layout/AlignHash`) ([@r.dubrovsky][])
|
95
167
|
|
96
168
|
[@r.dubrovsky]: https://github.com/roman-dubrovsky
|
97
169
|
[@aleks]: https://github.com/AleksSenkou
|
98
170
|
[@ula]: https://github.com/lazycoder9
|
99
171
|
[@v.kuzmik]: https://github.com/TheBlackArroVV/
|
100
172
|
[@a.branzeanu]: https://github.com/texpert
|
173
|
+
[@nikitasakov]: https://github.com/nikitasakov
|
101
174
|
|
data/Gemfile.lock
CHANGED
@@ -1,30 +1,41 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
datarockets-style (0.
|
5
|
-
rubocop (~> 0.
|
6
|
-
rubocop-
|
4
|
+
datarockets-style (0.9.0)
|
5
|
+
rubocop (~> 0.84)
|
6
|
+
rubocop-rails (~> 2.5.2)
|
7
|
+
rubocop-rspec (~> 1.39)
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
12
|
+
activesupport (5.2.4.3)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 0.7, < 2)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
tzinfo (~> 1.1)
|
11
17
|
ast (2.4.0)
|
12
|
-
byebug (11.
|
18
|
+
byebug (11.1.3)
|
13
19
|
coderay (1.1.2)
|
20
|
+
concurrent-ruby (1.1.6)
|
14
21
|
diff-lcs (1.3)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
22
|
+
i18n (1.8.2)
|
23
|
+
concurrent-ruby (~> 1.0)
|
24
|
+
method_source (1.0.0)
|
25
|
+
minitest (5.14.1)
|
26
|
+
parallel (1.19.1)
|
27
|
+
parser (2.7.1.3)
|
19
28
|
ast (~> 2.4.0)
|
20
|
-
pry (0.
|
21
|
-
coderay (~> 1.1
|
22
|
-
method_source (~>
|
23
|
-
pry-byebug (3.
|
29
|
+
pry (0.13.1)
|
30
|
+
coderay (~> 1.1)
|
31
|
+
method_source (~> 1.0)
|
32
|
+
pry-byebug (3.9.0)
|
24
33
|
byebug (~> 11.0)
|
25
|
-
pry (~> 0.
|
34
|
+
pry (~> 0.13.0)
|
35
|
+
rack (2.2.2)
|
26
36
|
rainbow (3.0.0)
|
27
|
-
rake (13.0.
|
37
|
+
rake (13.0.1)
|
38
|
+
rexml (3.2.4)
|
28
39
|
rspec (3.9.0)
|
29
40
|
rspec-core (~> 3.9.0)
|
30
41
|
rspec-expectations (~> 3.9.0)
|
@@ -38,17 +49,27 @@ GEM
|
|
38
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
50
|
rspec-support (~> 3.9.0)
|
40
51
|
rspec-support (3.9.0)
|
41
|
-
rubocop (0.
|
42
|
-
jaro_winkler (~> 1.5.1)
|
52
|
+
rubocop (0.84.0)
|
43
53
|
parallel (~> 1.10)
|
44
|
-
parser (>= 2.
|
54
|
+
parser (>= 2.7.0.1)
|
45
55
|
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
rexml
|
57
|
+
rubocop-ast (>= 0.0.3)
|
46
58
|
ruby-progressbar (~> 1.7)
|
47
|
-
unicode-display_width (>= 1.4.0, <
|
48
|
-
rubocop-
|
59
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
60
|
+
rubocop-ast (0.0.3)
|
61
|
+
parser (>= 2.7.0.1)
|
62
|
+
rubocop-rails (2.5.2)
|
63
|
+
activesupport
|
64
|
+
rack (>= 1.1)
|
65
|
+
rubocop (>= 0.72.0)
|
66
|
+
rubocop-rspec (1.39.0)
|
49
67
|
rubocop (>= 0.68.1)
|
50
68
|
ruby-progressbar (1.10.1)
|
51
|
-
|
69
|
+
thread_safe (0.3.6)
|
70
|
+
tzinfo (1.2.7)
|
71
|
+
thread_safe (~> 0.1)
|
72
|
+
unicode-display_width (1.7.0)
|
52
73
|
|
53
74
|
PLATFORMS
|
54
75
|
ruby
|
@@ -60,4 +81,4 @@ DEPENDENCIES
|
|
60
81
|
rspec (~> 3.7)
|
61
82
|
|
62
83
|
BUNDLED WITH
|
63
|
-
1.
|
84
|
+
2.1.4
|
data/Makefile
ADDED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Datarockets::Style [](https://badge.fury.io/rb/datarockets-style)
|
2
2
|
|
3
|
-
Datarockets shared style configs and notes of code-style
|
3
|
+
Datarockets shared style configs and notes of code-style conventions. Based on the [Rubocop](https://github.com/rubocop-hq/rubocop) util.
|
4
4
|
|
5
5
|
This config enforces many of the guidelines outlined in the datarockets [Ruby Style Guide](doc/STYLE_GUIDE.md).
|
6
6
|
|
@@ -76,6 +76,11 @@ There are some areas in which there is no clear consensus in datarockets team re
|
|
76
76
|
In such scenarios, all popular styles are acknowledged and it’s up to you to pick one and apply it consistently.
|
77
77
|
For that just set up these cops before starting of usage.
|
78
78
|
|
79
|
+
#### RSpec/LetSetup
|
80
|
+
|
81
|
+
[This cop](https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecletsetup) is enabled by default and we suggest not to use unreferenced `let` variables in your test cases.
|
82
|
+
However, if it feels like the cop should be enabled and tests can't be written w/o them, please create an issue with your cases so that we can re-thinking our solution about enabling this cop.
|
83
|
+
|
79
84
|
#### Style/StringLiterals
|
80
85
|
|
81
86
|
There are two popular styles in the Ruby community, both of which are considered good - single quotes by default and double quotes by default.
|
@@ -86,13 +91,17 @@ P.S. The string literals in this gem are using double quotes by default.
|
|
86
91
|
|
87
92
|
##### Tips
|
88
93
|
|
89
|
-
For an existing project, we suggest
|
94
|
+
For an existing project, we suggest running rubocop with both styles and choose which has fewer offenses (which is more popular in the current project).
|
95
|
+
|
96
|
+
### Custom cops
|
97
|
+
|
98
|
+
We have custom cops. You can find specification for them [here](manual).
|
90
99
|
|
91
100
|
## Formatters
|
92
101
|
|
93
102
|
### ToDo list formatter
|
94
103
|
|
95
|
-
This formatter allows us to get list of files for some offense and with number of offenses in each file. This file can be useful if you need to fix a large some cop
|
104
|
+
This formatter allows us to get list of files for some offense and with number of offenses in each file. This file can be useful if you need to fix a large some cop step by step.
|
96
105
|
|
97
106
|
Result of the formatter is compatible with rubocop config or rubocop todo file.
|
98
107
|
|
@@ -148,6 +157,12 @@ Style/Documentation:
|
|
148
157
|
- 'lib/datarockets/style/formatter/todo_list_formatter.rb' # 1
|
149
158
|
```
|
150
159
|
|
160
|
+
## Non-goals of RuboCop
|
161
|
+
|
162
|
+
### Rspec configuration
|
163
|
+
|
164
|
+
RSpec-core library provides some configuration rules which provides some linting rules itself. Read more about it in [RuboCop Rspec non-goals topic](https://github.com/rubocop-hq/rubocop-rspec#non-goals-of-rubocop-rspec).
|
165
|
+
|
151
166
|
## Changelog
|
152
167
|
|
153
168
|
Datarockets Style's changelog is available [here](CHANGELOG.md).
|
data/config/base.yml
CHANGED
@@ -1,37 +1,67 @@
|
|
1
|
+
require: datarockets/style
|
2
|
+
|
1
3
|
Bundler/DuplicatedGem:
|
2
4
|
Enabled: true
|
3
5
|
|
4
6
|
Bundler/OrderedGems:
|
5
7
|
TreatCommentsAsGroupSeparators: true
|
6
8
|
|
7
|
-
Layout/
|
9
|
+
Layout/ArgumentAlignment:
|
10
|
+
EnforcedStyle: with_fixed_indentation
|
11
|
+
|
12
|
+
Layout/ArrayAlignment:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Layout/ArrayAlignmentExtended:
|
16
|
+
Description: >-
|
17
|
+
Align the elements of an array literal if they span more than
|
18
|
+
one line.
|
8
19
|
EnforcedStyle: with_fixed_indentation
|
20
|
+
SupportedStyles:
|
21
|
+
- with_first_parameter
|
22
|
+
- with_fixed_indentation
|
23
|
+
IndentationWidth: ~
|
9
24
|
|
10
|
-
Layout/
|
25
|
+
Layout/HashAlignment:
|
11
26
|
EnforcedLastArgumentHashStyle: always_ignore
|
12
27
|
|
13
|
-
Layout/
|
28
|
+
Layout/ParameterAlignment:
|
14
29
|
EnforcedStyle: with_fixed_indentation
|
15
30
|
IndentationWidth: 2
|
16
31
|
|
32
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
33
|
+
Enabled: true
|
34
|
+
|
17
35
|
Layout/EndAlignment:
|
18
36
|
EnforcedStyleAlignWith: variable
|
19
37
|
|
20
38
|
Layout/IndentationConsistency:
|
21
39
|
EnforcedStyle: normal
|
22
40
|
|
23
|
-
Layout/
|
41
|
+
Layout/LineLength:
|
42
|
+
Max: 120
|
43
|
+
|
44
|
+
Layout/FirstHashElementIndentation:
|
24
45
|
EnforcedStyle: consistent
|
25
46
|
|
26
47
|
Layout/MultilineMethodCallIndentation:
|
27
|
-
|
48
|
+
EnforcedStyle: indented
|
49
|
+
|
50
|
+
Layout/SpaceAroundMethodCallOperator:
|
51
|
+
Enabled: true
|
28
52
|
|
29
53
|
Layout/SpaceInsideHashLiteralBraces:
|
30
54
|
EnforcedStyle: no_space
|
31
55
|
EnforcedStyleForEmptyBraces: no_space
|
32
56
|
|
33
|
-
|
34
|
-
|
57
|
+
Lint/DeprecatedOpenSSLConstant:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Lint/RaiseException:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Lint/StructNewOverride:
|
64
|
+
Enabled: true
|
35
65
|
|
36
66
|
Naming/MemoizedInstanceVariableName:
|
37
67
|
EnforcedStyleForLeadingUnderscores: required
|
@@ -39,14 +69,32 @@ Naming/MemoizedInstanceVariableName:
|
|
39
69
|
Naming/RescuedExceptionsVariableName:
|
40
70
|
PreferredName: error
|
41
71
|
|
42
|
-
Style/
|
43
|
-
EnforcedStyle:
|
72
|
+
Style/ClassAndModuleChildren:
|
73
|
+
EnforcedStyle: nested
|
44
74
|
|
45
75
|
Style/EmptyMethod:
|
46
76
|
EnforcedStyle: expanded
|
47
77
|
|
78
|
+
Style/ExponentialNotation:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Style/HashEachMethods:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Style/HashTransformKeys:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Style/HashTransformValues:
|
88
|
+
Enabled: true
|
89
|
+
|
48
90
|
Style/FrozenStringLiteralComment:
|
49
91
|
Enabled: false
|
50
92
|
|
93
|
+
Style/NestedInterpolation:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
Style/SlicingWithRange:
|
97
|
+
Enabled: true
|
98
|
+
|
51
99
|
Style/StringLiterals:
|
52
100
|
EnforcedStyle: double_quotes
|
data/config/rails.yml
CHANGED
data/config/rspec.yml
CHANGED
data/datarockets-style.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.homepage = "https://github.com/datarockets/datarockets-style"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
|
-
spec.required_ruby_version = ">= 2.
|
15
|
+
spec.required_ruby_version = ">= 2.4.0"
|
16
16
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
@@ -30,6 +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-
|
33
|
+
spec.add_dependency "rubocop", "~> 0.84"
|
34
|
+
spec.add_dependency "rubocop-rails", "~> 2.5.2"
|
35
|
+
spec.add_dependency "rubocop-rspec", "~> 1.39"
|
35
36
|
end
|
data/doc/STYLE_GUIDE.md
CHANGED
@@ -18,11 +18,11 @@ This is a small list of differences which we have when compared with community s
|
|
18
18
|
## Bundler
|
19
19
|
|
20
20
|
* <a name="bundler-add-once"></a>
|
21
|
-
A Gem's requirements should be listed only once in a Gemfile
|
21
|
+
A Gem's requirements should be listed only once in a Gemfile.
|
22
22
|
<sup>[[link](#bundler-add-once)]</sup>
|
23
23
|
|
24
24
|
* <a name="bundler-ordering"></a>
|
25
|
-
Gems should be alphabetically sorted within groups. Also you can use a line comment as a group separator.
|
25
|
+
Gems should be alphabetically sorted within groups. Also, you can use a line comment as a group separator.
|
26
26
|
<sup>[[link](#bundler-ordering)]</sup>
|
27
27
|
|
28
28
|
## Style
|
@@ -35,8 +35,21 @@ This is a small list of differences which we have when compared with community s
|
|
35
35
|
Adopt a consistent string literal quoting style.
|
36
36
|
<sup>[[link](#style-string-quotes)]</sup>
|
37
37
|
|
38
|
+
* <a name="style-nested-interpolation"></a>
|
39
|
+
Avoid using nested interpolation.
|
40
|
+
<sup>[[link](#style-nested-interpolation)]</sup>
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
# bad
|
44
|
+
"Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}"
|
45
|
+
|
46
|
+
# good
|
47
|
+
user_name = user.blank? ? 'guest' : "dear #{user.name}"
|
48
|
+
"Hello, #{user_name}"
|
49
|
+
```
|
50
|
+
|
38
51
|
* <a name="style-hash-aligning"></a>
|
39
|
-
If elements of a hash literal span more than one line we're aligning them by keys.
|
52
|
+
If elements of a hash literal span more than one line, we're aligning them by keys.
|
40
53
|
Also, the first hash key is aligned by an indentation level.
|
41
54
|
<sup>[[link](#style-hash-aligning)]</sup>
|
42
55
|
|
@@ -89,7 +102,7 @@ method_call({
|
|
89
102
|
|
90
103
|
* <a name="style-arguments-aligning"></a>
|
91
104
|
All arguments on a multi-line method definition are aligning by an indentation level.
|
92
|
-
This rule works as for
|
105
|
+
This rule works as for keyword arguments, as for usual arguments.
|
93
106
|
<sup>[[link](#style-arguments-aligning)]</sup>
|
94
107
|
|
95
108
|
```ruby
|
@@ -151,7 +164,28 @@ def foo(
|
|
151
164
|
end
|
152
165
|
```
|
153
166
|
|
154
|
-
* <a name="style-
|
167
|
+
* <a name="style-array-aligning"></a>
|
168
|
+
The elements of a multi-line array are aligning by an indentation level.
|
169
|
+
<sup>[[link](#style-array-aligning)]</sup>
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
# bad
|
173
|
+
|
174
|
+
array = [1, 2, 3,
|
175
|
+
4, 5, 6]
|
176
|
+
|
177
|
+
# bad
|
178
|
+
|
179
|
+
array = [1, 2, 3,
|
180
|
+
4, 5, 6]
|
181
|
+
|
182
|
+
# good
|
183
|
+
|
184
|
+
array = [1, 2, 3,
|
185
|
+
4, 5, 6]
|
186
|
+
```
|
187
|
+
|
188
|
+
* <a name="style-multiline-method-call-indentation"></a>
|
155
189
|
The indentation of the method name part in method calls that span more than one line are aligning by an indentation level.
|
156
190
|
<sup>[[link](#style-multiline-method-call-indentation)]</sup>
|
157
191
|
|
@@ -227,7 +261,7 @@ end
|
|
227
261
|
```
|
228
262
|
|
229
263
|
* <a name="style-method-indentations"></a>
|
230
|
-
We're
|
264
|
+
We're preferring a ruby style for methods indentations, not rails. You can check it [here](https://github.com/rubocop-hq/ruby-style-guide#indent-public-private-protected).
|
231
265
|
<sup>[[link](#style-method-indentations)]</sup>
|
232
266
|
|
233
267
|
```ruby
|
@@ -285,7 +319,7 @@ end
|
|
285
319
|
```
|
286
320
|
|
287
321
|
* <a name="style-hash-spaces"></a>
|
288
|
-
For hash literals not to add
|
322
|
+
For hash literals not to add spaces after `{` or before `}`. We want to have the advantage of adding visual difference between block and hash literals.
|
289
323
|
<sup>[[link](#style-hash-spaces)]</sup>
|
290
324
|
|
291
325
|
```ruby
|
@@ -338,7 +372,7 @@ end
|
|
338
372
|
```
|
339
373
|
|
340
374
|
* <a name="style-cached-instance-variable-name"></a>
|
341
|
-
Use leading underscores in cached instance variable name
|
375
|
+
Use leading underscores in cached instance variable name.
|
342
376
|
<sup>[[link](#style-cached-instance-variable-name)]</sup>
|
343
377
|
|
344
378
|
```ruby
|
@@ -359,22 +393,7 @@ end
|
|
359
393
|
```
|
360
394
|
|
361
395
|
* <a name="style-magic-link"></a>
|
362
|
-
There are not any
|
363
|
-
Set up [this cop](https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment) depends
|
396
|
+
There are not any required rules for `frozen_string_literal` magic url.
|
397
|
+
Set up [this cop](https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment) depends on the project.
|
364
398
|
So set up it on the local rubocop config manually.
|
365
399
|
<sup>[[link](#style-magic-link)]</sup>
|
366
|
-
|
367
|
-
* <a name="style-braces-around-hash-params"></a>
|
368
|
-
Not to use braces around the last hash literal parameter.
|
369
|
-
But requires braces if the second to last parameter is also a hash literal.
|
370
|
-
<sup>[[link](#style-braces-around-hash-params)]</sup>
|
371
|
-
|
372
|
-
```ruby
|
373
|
-
# bad
|
374
|
-
some_method(x, y, {a: 1, b: 2})
|
375
|
-
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)
|
376
|
-
|
377
|
-
# good
|
378
|
-
some_method(x, y, a: 1, b: 2)
|
379
|
-
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})
|
380
|
-
```
|
data/doc/STYLE_GUIDE_RAILS.md
CHANGED
@@ -4,6 +4,32 @@ This style is based on rules from [Ruby Style Guide](docs/STYLE_GUIDE.md). Also,
|
|
4
4
|
|
5
5
|
This is a small list of differences which we have when compared with community and our Ruby style guides:
|
6
6
|
|
7
|
-
##
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
* [Style](#Style)
|
10
|
+
|
11
|
+
## Style
|
12
|
+
|
13
|
+
* <a name="documentation"></a>
|
14
|
+
Documentation is requeried for all files except `app` directory.
|
15
|
+
<sup>[[link](#documentation)]</sup>
|
16
|
+
|
17
|
+
* <a name="nested-style-and-modules"></a>
|
18
|
+
Prefer to use nested style of children definitions at classes and modules.
|
19
|
+
<sup>[[link](#nested-style-and-modules)]</sup>
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# bad
|
23
|
+
class Api::V1::UsersController
|
24
|
+
end
|
25
|
+
|
26
|
+
# good
|
27
|
+
module Api
|
28
|
+
module V1
|
29
|
+
class UsersController
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
8
34
|
|
9
35
|
[1]: https://github.com/rubocop-hq/rails-style-guide
|
data/doc/STYLE_GUIDE_RSPEC.md
CHANGED
@@ -16,7 +16,7 @@ This style guide recommends best practices for writing a clear Rspec tests and e
|
|
16
16
|
<sup>[[link](#rspec-nested-groups)]</sup>
|
17
17
|
|
18
18
|
* <a name="rspec-subject"></a>
|
19
|
-
Each subject should be named and we should not use `subject` in our test cases.
|
19
|
+
Each subject should be named, and we should not use `subject` in our test cases.
|
20
20
|
Prefer to use `is_expected` that `expect(subject_name)` for small tests.
|
21
21
|
<sup>[[link](#rspec-subject)]</sup>
|
22
22
|
|
@@ -60,7 +60,7 @@ end
|
|
60
60
|
```
|
61
61
|
|
62
62
|
* <a name="rspec-example-length"></a>
|
63
|
-
A long example is usually more difficult to understand. Consider extracting out some
|
63
|
+
A long example is usually more difficult to understand. Consider extracting out some behavior, e.g. with a `let` block, or a helper method.
|
64
64
|
|
65
65
|
<sup>[[link](#rspec-example-length)]</sup>
|
66
66
|
|
@@ -121,3 +121,64 @@ foo.bar
|
|
121
121
|
foo.bar
|
122
122
|
expect(foo).to have_received(:bar)
|
123
123
|
```
|
124
|
+
|
125
|
+
* <a name="rspec-prefer-expect"></a>
|
126
|
+
Prefer using `expect` instead of `should` matchers.
|
127
|
+
<sup>[[link](#rspec-prefer-expect)]</sup>
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
# bad
|
131
|
+
calculator.compute(line_item).should == 5
|
132
|
+
|
133
|
+
# good
|
134
|
+
expect(calculator.compute(line_item)).to eq(5)
|
135
|
+
```
|
136
|
+
|
137
|
+
**Note:** this is a Part of Rspec configuration. Read more [by link](https://github.com/rubocop-hq/rubocop-rspec#enforcing-should-vs-expect-syntax).
|
138
|
+
|
139
|
+
* <a name="rspec-top-rspec"></a>
|
140
|
+
Not to use `Rspec.describe` in your test and just write `describe` instead.
|
141
|
+
<sup>[[link](#rspec-top-rspec)]</sup>
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
# bad
|
145
|
+
RSpec.describe MyClass do
|
146
|
+
# ...
|
147
|
+
end
|
148
|
+
|
149
|
+
# good
|
150
|
+
describe MyClass do
|
151
|
+
# ...
|
152
|
+
end
|
153
|
+
```
|
154
|
+
|
155
|
+
**Note:** this is a Part of Rspec configuration. Read more [by link](https://github.com/rubocop-hq/rubocop-rspec#enforcing-an-explicit-rspec-receiver-for-top-level-methods-disabling-monkey-patching).
|
156
|
+
|
157
|
+
* <a name="rspec-let-setup"></a>
|
158
|
+
We allow using let! in your test, but suggest not to use it for setting up testing data.
|
159
|
+
<sup>[[link](#rspec-let-setup)]</sup>
|
160
|
+
|
161
|
+
```ruby
|
162
|
+
# ok
|
163
|
+
let!(:my_widget) { create(:widget) }
|
164
|
+
|
165
|
+
it "counts widgets" do
|
166
|
+
expect(Widget.count).to eq(1)
|
167
|
+
end
|
168
|
+
|
169
|
+
# better
|
170
|
+
before do
|
171
|
+
create(:widget)
|
172
|
+
end
|
173
|
+
|
174
|
+
it "counts widgets" do
|
175
|
+
expect(Widget.count).to eq(1)
|
176
|
+
end
|
177
|
+
|
178
|
+
# good
|
179
|
+
let!(:my_widget) { create(:widget) }
|
180
|
+
|
181
|
+
it "returns the last widget" do
|
182
|
+
expect(Widget.last).to eq my_widget
|
183
|
+
end
|
184
|
+
```
|
data/lib/datarockets/style.rb
CHANGED
@@ -3,6 +3,9 @@ require "datarockets/style/formatter/todo_list_formatter"
|
|
3
3
|
|
4
4
|
require "datarockets/style/version"
|
5
5
|
|
6
|
+
require "datarockets/style/cop/layout/array_alignment_extended"
|
7
|
+
require "datarockets/style/cop/style/nested_interpolation"
|
8
|
+
|
6
9
|
module Datarockets
|
7
10
|
# Datarickors sharable config
|
8
11
|
module Style
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Datarockets
|
4
|
+
module Style
|
5
|
+
module Cop
|
6
|
+
module Layout
|
7
|
+
# Here we check if the elements of a multi-line array literal are
|
8
|
+
# aligned.
|
9
|
+
#
|
10
|
+
# @example EnforcedStyle: with_first_argument (default)
|
11
|
+
# # good
|
12
|
+
#
|
13
|
+
# array = [1, 2, 3,
|
14
|
+
# 4, 5, 6]
|
15
|
+
# array = ['run',
|
16
|
+
# 'forrest',
|
17
|
+
# 'run']
|
18
|
+
#
|
19
|
+
# # bad
|
20
|
+
#
|
21
|
+
# array = [1, 2, 3,
|
22
|
+
# 4, 5, 6]
|
23
|
+
# array = ['run',
|
24
|
+
# 'forrest',
|
25
|
+
# 'run']
|
26
|
+
#
|
27
|
+
# @example EnforcedStyle: with_fixed_indentation
|
28
|
+
# # good
|
29
|
+
#
|
30
|
+
# array = [1, 2, 3,
|
31
|
+
# 4, 5, 6]
|
32
|
+
#
|
33
|
+
# # bad
|
34
|
+
#
|
35
|
+
# array = [1, 2, 3,
|
36
|
+
# 4, 5, 6]
|
37
|
+
class ArrayAlignmentExtended < RuboCop::Cop::Cop
|
38
|
+
include RuboCop::Cop::Alignment
|
39
|
+
|
40
|
+
ALIGN_PARAMS_MSG = "Align the elements of an array literal if they span more than one line."
|
41
|
+
|
42
|
+
FIXED_INDENT_MSG = "Use one level of indentation for elements " \
|
43
|
+
"following the first line of a multi-line array."
|
44
|
+
|
45
|
+
def on_array(node)
|
46
|
+
return if node.children.size < 2
|
47
|
+
|
48
|
+
check_alignment(node.children, base_column(node, node.children))
|
49
|
+
end
|
50
|
+
|
51
|
+
def autocorrect(node)
|
52
|
+
RuboCop::Cop::AlignmentCorrector.correct(processed_source, node, column_delta)
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def message(_node)
|
58
|
+
fixed_indentation? ? FIXED_INDENT_MSG : ALIGN_PARAMS_MSG
|
59
|
+
end
|
60
|
+
|
61
|
+
def fixed_indentation?
|
62
|
+
cop_config["EnforcedStyle"] == "with_fixed_indentation"
|
63
|
+
end
|
64
|
+
|
65
|
+
def base_column(node, args)
|
66
|
+
fixed_indentation? ? line_indentation(node) : display_column(args.first.source_range)
|
67
|
+
end
|
68
|
+
|
69
|
+
def line_indentation(node)
|
70
|
+
lineno = target_method_lineno(node)
|
71
|
+
line = node.source_range.source_buffer.source_line(lineno)
|
72
|
+
line_indentation = /\S.*/.match(line).begin(0)
|
73
|
+
line_indentation + configured_indentation_width
|
74
|
+
end
|
75
|
+
|
76
|
+
def target_method_lineno(node)
|
77
|
+
node.loc.line
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Datarockets
|
2
|
+
module Style
|
3
|
+
module Cop
|
4
|
+
module Style
|
5
|
+
# This cop checks nested interpolations
|
6
|
+
#
|
7
|
+
# @example
|
8
|
+
#
|
9
|
+
# # bad
|
10
|
+
# "Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}"
|
11
|
+
#
|
12
|
+
# # good
|
13
|
+
# user_name = user.blank? ? 'guest' : "dear #{user.name}"
|
14
|
+
# "Hello, #{user_name}"
|
15
|
+
class NestedInterpolation < RuboCop::Cop::Cop
|
16
|
+
include RuboCop::Cop::Interpolation
|
17
|
+
|
18
|
+
MSG = "Redundant nested interpolation.".freeze
|
19
|
+
|
20
|
+
def on_interpolation(node)
|
21
|
+
node.each_descendant(:dstr) do |descendant_node|
|
22
|
+
detect_double_interpolation(descendant_node)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def detect_double_interpolation(node)
|
29
|
+
node.each_child_node(:begin) do |begin_node|
|
30
|
+
add_offense(begin_node)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -13,9 +13,9 @@ module Datarockets
|
|
13
13
|
class ReportSummary
|
14
14
|
attr_reader :offense_list
|
15
15
|
|
16
|
-
FileGroup = Struct.new(:file, :
|
16
|
+
FileGroup = Struct.new(:file, :offenses_count) do
|
17
17
|
def print(output)
|
18
|
-
output.puts " - '#{file}' # #{
|
18
|
+
output.puts " - '#{file}' # #{offenses_count}"
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Layout
|
2
|
+
|
3
|
+
## Layout/ArrayAlignmentExtended
|
4
|
+
|
5
|
+
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|
6
|
+
--- | --- | --- | --- | ---
|
7
|
+
Enabled | Yes | Yes | 0.7.0 | -
|
8
|
+
|
9
|
+
Here we check if the elements of a multi-line array literal are
|
10
|
+
aligned.
|
11
|
+
|
12
|
+
### Examples
|
13
|
+
|
14
|
+
#### EnforcedStyle: with_fixed_indentation (default)
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
# good
|
18
|
+
|
19
|
+
array = [1, 2, 3,
|
20
|
+
4, 5, 6]
|
21
|
+
|
22
|
+
# bad
|
23
|
+
|
24
|
+
array = [1, 2, 3,
|
25
|
+
4, 5, 6]
|
26
|
+
```
|
27
|
+
|
28
|
+
#### EnforcedStyle: with_first_argument
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
# good
|
32
|
+
|
33
|
+
array = [1, 2, 3,
|
34
|
+
4, 5, 6]
|
35
|
+
array = ['run',
|
36
|
+
'forrest',
|
37
|
+
'run']
|
38
|
+
|
39
|
+
# bad
|
40
|
+
|
41
|
+
array = [1, 2, 3,
|
42
|
+
4, 5, 6]
|
43
|
+
array = ['run',
|
44
|
+
'forrest',
|
45
|
+
'run']
|
46
|
+
```
|
47
|
+
|
48
|
+
### Configurable attributes
|
49
|
+
|
50
|
+
Name | Default value | Configurable values
|
51
|
+
--- | --- | ---
|
52
|
+
EnforcedStyle | `with_first_parameter` | `with_first_parameter`, `with_fixed_indentation`
|
53
|
+
IndentationWidth | `<none>` | Integer
|
54
|
+
|
55
|
+
# Style
|
56
|
+
|
57
|
+
## Style/NestedInterpolation
|
58
|
+
|
59
|
+
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
|
60
|
+
--- | --- | --- | --- | ---
|
61
|
+
Enabled | Yes | No | 0.8.0 | -
|
62
|
+
|
63
|
+
This cop checks nested interpolations
|
64
|
+
|
65
|
+
### Example
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
# bad
|
69
|
+
"Hello, #{user.blank? ? 'guest' : "dear #{user.name}"}"
|
70
|
+
|
71
|
+
# good
|
72
|
+
user_name = user.blank? ? 'guest' : "dear #{user.name}"
|
73
|
+
"Hello, #{user_name}"
|
74
|
+
```
|
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.9.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:
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.84'
|
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.84'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.5.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.5.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rubocop-rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
47
|
+
version: '1.39'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
54
|
+
version: '1.39'
|
41
55
|
description:
|
42
56
|
email:
|
43
57
|
- r.dubrovsky@datarockets.com
|
@@ -48,6 +62,7 @@ files:
|
|
48
62
|
- ".github/ISSUE_TEMPLATE/new-issue.md"
|
49
63
|
- ".github/ISSUE_TEMPLATE/update-dependencies.md"
|
50
64
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
65
|
+
- ".github/workflows/main.yml"
|
51
66
|
- ".gitignore"
|
52
67
|
- ".rspec"
|
53
68
|
- ".rubocop.yml"
|
@@ -57,6 +72,7 @@ files:
|
|
57
72
|
- Gemfile
|
58
73
|
- Gemfile.lock
|
59
74
|
- LICENSE.txt
|
75
|
+
- Makefile
|
60
76
|
- README.md
|
61
77
|
- RELEASING.md
|
62
78
|
- Rakefile
|
@@ -71,9 +87,12 @@ files:
|
|
71
87
|
- doc/STYLE_GUIDE_RAILS.md
|
72
88
|
- doc/STYLE_GUIDE_RSPEC.md
|
73
89
|
- lib/datarockets/style.rb
|
90
|
+
- lib/datarockets/style/cop/layout/array_alignment_extended.rb
|
91
|
+
- lib/datarockets/style/cop/style/nested_interpolation.rb
|
74
92
|
- lib/datarockets/style/formatter/todo_list_formatter.rb
|
75
93
|
- lib/datarockets/style/formatter/todo_list_formatter/report_summary.rb
|
76
94
|
- lib/datarockets/style/version.rb
|
95
|
+
- manual/cops_layout.md
|
77
96
|
homepage: https://github.com/datarockets/datarockets-style
|
78
97
|
licenses:
|
79
98
|
- MIT
|
@@ -87,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
106
|
requirements:
|
88
107
|
- - ">="
|
89
108
|
- !ruby/object:Gem::Version
|
90
|
-
version: 2.
|
109
|
+
version: 2.4.0
|
91
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
111
|
requirements:
|
93
112
|
- - ">="
|