rails_best_practices 1.23.1 → 1.23.3
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/workflows/main.yml +3 -20
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +25 -23
- data/README.md +5 -8
- data/lib/rails_best_practices/core/check.rb +1 -1
- data/lib/rails_best_practices/version.rb +1 -1
- data/rails_best_practices.gemspec +6 -2
- data/spec/rails_best_practices/analyzer_spec.rb +4 -4
- metadata +8 -10
- data/Gemfile.ruby-2.6 +0 -11
- data/Gemfile.ruby-2.6.lock +0 -130
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45bd3e5bf9771d0f9c35424c5af13a11a0e0e05bfe571a1401f6f2e9f72e4ff0
|
|
4
|
+
data.tar.gz: e3f26d99ef59919f95bd125a96055bd99fea9042bb05fceebacc6a679d4ead67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6164cb8d9f456dd5d3b99cfd824b721804ebd71d4b404d09767bbdb80e265a488bcc375606a6209d834a0292d428f62273268da37294efc7b97331f1feab138
|
|
7
|
+
data.tar.gz: d49f88f137c66a616758b06172f501e4f162730b4ee2665de8d19f06ae9ff0649c72dbacbc2054fd8fd469abb3ffc63a8827d73b584c7522fc594e56d1434db6
|
data/.github/workflows/main.yml
CHANGED
|
@@ -14,31 +14,14 @@ on:
|
|
|
14
14
|
branches: [ master ]
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
|
-
|
|
17
|
+
test:
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
strategy:
|
|
20
20
|
matrix:
|
|
21
|
-
ruby-version: ['2.
|
|
22
|
-
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
|
23
|
-
BUNDLE_GEMFILE: Gemfile.ruby-2.6
|
|
21
|
+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
|
|
24
22
|
|
|
25
23
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
27
|
-
- name: Set up Ruby
|
|
28
|
-
uses: ruby/setup-ruby@v1
|
|
29
|
-
with:
|
|
30
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
31
|
-
bundler-cache: true
|
|
32
|
-
- name: Run tests
|
|
33
|
-
run: bundle exec rspec spec
|
|
34
|
-
test_ruby_2_7_above:
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
|
-
strategy:
|
|
37
|
-
matrix:
|
|
38
|
-
ruby-version: ['2.7', '3.0', '3.1']
|
|
39
|
-
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/checkout@v2
|
|
24
|
+
- uses: actions/checkout@v4
|
|
42
25
|
- name: Set up Ruby
|
|
43
26
|
uses: ruby/setup-ruby@v1
|
|
44
27
|
with:
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.7
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rails_best_practices (1.23.
|
|
4
|
+
rails_best_practices (1.23.3)
|
|
5
5
|
activesupport
|
|
6
6
|
code_analyzer (~> 0.5.5)
|
|
7
7
|
erubis
|
|
@@ -13,7 +13,7 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activesupport (7.0.
|
|
16
|
+
activesupport (7.0.4)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
18
|
i18n (>= 1.6, < 2)
|
|
19
19
|
minitest (>= 5.1)
|
|
@@ -22,15 +22,14 @@ GEM
|
|
|
22
22
|
code_analyzer (0.5.5)
|
|
23
23
|
sexp_processor
|
|
24
24
|
coderay (1.1.3)
|
|
25
|
-
concurrent-ruby (1.1.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
tins (~> 1.6)
|
|
25
|
+
concurrent-ruby (1.1.10)
|
|
26
|
+
coveralls_reborn (0.24.0)
|
|
27
|
+
simplecov (>= 0.18.1, < 0.22.0)
|
|
28
|
+
term-ansicolor (~> 1.6)
|
|
29
|
+
thor (>= 0.20.3, < 2.0)
|
|
30
|
+
tins (~> 1.16)
|
|
32
31
|
diff-lcs (1.4.4)
|
|
33
|
-
docile (1.
|
|
32
|
+
docile (1.4.0)
|
|
34
33
|
erubis (2.7.0)
|
|
35
34
|
ffi (1.15.4)
|
|
36
35
|
formatador (0.3.0)
|
|
@@ -51,15 +50,15 @@ GEM
|
|
|
51
50
|
haml (5.1.2)
|
|
52
51
|
temple (>= 0.8.0)
|
|
53
52
|
tilt
|
|
54
|
-
i18n (1.
|
|
53
|
+
i18n (1.12.0)
|
|
55
54
|
concurrent-ruby (~> 1.0)
|
|
56
|
-
json (2.
|
|
55
|
+
json (2.6.2)
|
|
57
56
|
listen (3.7.0)
|
|
58
57
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
59
58
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
60
59
|
lumberjack (1.2.8)
|
|
61
60
|
method_source (1.0.0)
|
|
62
|
-
minitest (5.
|
|
61
|
+
minitest (5.16.3)
|
|
63
62
|
nenv (0.3.0)
|
|
64
63
|
notiffany (0.1.3)
|
|
65
64
|
nenv (~> 0.1)
|
|
@@ -86,23 +85,26 @@ GEM
|
|
|
86
85
|
rspec-support (~> 3.10.0)
|
|
87
86
|
rspec-support (3.10.2)
|
|
88
87
|
ruby-progressbar (1.11.0)
|
|
89
|
-
sexp_processor (4.16.
|
|
88
|
+
sexp_processor (4.16.1)
|
|
90
89
|
shellany (0.0.1)
|
|
91
|
-
simplecov (0.
|
|
90
|
+
simplecov (0.21.2)
|
|
92
91
|
docile (~> 1.1)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
simplecov-html (0.
|
|
92
|
+
simplecov-html (~> 0.11)
|
|
93
|
+
simplecov_json_formatter (~> 0.1)
|
|
94
|
+
simplecov-html (0.12.3)
|
|
95
|
+
simplecov_json_formatter (0.1.4)
|
|
96
96
|
slim (4.0.1)
|
|
97
97
|
temple (>= 0.7.6, < 0.9)
|
|
98
98
|
tilt (>= 2.0.6, < 2.1)
|
|
99
|
+
sync (0.5.0)
|
|
99
100
|
temple (0.8.2)
|
|
100
101
|
term-ansicolor (1.7.1)
|
|
101
102
|
tins (~> 1.0)
|
|
102
|
-
thor (1.1
|
|
103
|
+
thor (1.2.1)
|
|
103
104
|
tilt (2.0.10)
|
|
104
|
-
tins (1.
|
|
105
|
-
|
|
105
|
+
tins (1.31.1)
|
|
106
|
+
sync
|
|
107
|
+
tzinfo (2.0.5)
|
|
106
108
|
concurrent-ruby (~> 1.0)
|
|
107
109
|
|
|
108
110
|
PLATFORMS
|
|
@@ -111,7 +113,7 @@ PLATFORMS
|
|
|
111
113
|
DEPENDENCIES
|
|
112
114
|
awesome_print
|
|
113
115
|
bundler
|
|
114
|
-
|
|
116
|
+
coveralls_reborn
|
|
115
117
|
guard
|
|
116
118
|
guard-rspec
|
|
117
119
|
haml
|
|
@@ -122,4 +124,4 @@ DEPENDENCIES
|
|
|
122
124
|
slim
|
|
123
125
|
|
|
124
126
|
BUNDLED WITH
|
|
125
|
-
2.
|
|
127
|
+
2.6.9
|
data/README.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# rails_best_practices
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/rails_best_practices)
|
|
4
|
-
[](https://github.com/flyerhzm/rails_best_practices/actions/workflows/main.yml)
|
|
5
5
|
[](https://coveralls.io/r/railsbp/rails_best_practices)
|
|
6
6
|
[](https://awesomecode.io/repos/flyerhzm/rails_best_practices)
|
|
7
7
|
|
|
8
|
-
[](http://coderwall.com/flyerhzm)
|
|
9
|
-
[](https://pledgie.com/campaigns/12057)
|
|
10
|
-
|
|
11
8
|
rails_best_practices is a code metric tool to check the quality of Rails code.
|
|
12
9
|
|
|
13
10
|
It supports the following ORM/ODMs:
|
|
@@ -90,15 +87,15 @@ To see the full list of command-line options, run:
|
|
|
90
87
|
|
|
91
88
|
Homepage: <http://rails-bestpractices.com>
|
|
92
89
|
|
|
93
|
-
GitHub: <http://github.com/
|
|
90
|
+
GitHub: <http://github.com/flyerhzm/rails_best_practices>
|
|
94
91
|
|
|
95
92
|
Team Blog <http://rails-bestpractices.com>
|
|
96
93
|
|
|
97
94
|
Google Group: <https://groups.google.com/group/rails_best_practices>
|
|
98
95
|
|
|
99
|
-
Wiki: <http://github.com/
|
|
96
|
+
Wiki: <http://github.com/flyerhzm/rails_best_practices/wiki>
|
|
100
97
|
|
|
101
|
-
Issue Tracker: <http://github.com/
|
|
98
|
+
Issue Tracker: <http://github.com/flyerhzm/rails_best_practices/issues>
|
|
102
99
|
|
|
103
100
|
## Install
|
|
104
101
|
|
|
@@ -287,4 +284,4 @@ Send us email: <team@railsbp.com>
|
|
|
287
284
|
Copyright © 2009 - 2022 Richard Huang (flyerhzm@gmail.com), released under the MIT license
|
|
288
285
|
|
|
289
286
|
|
|
290
|
-
[1]: https://github.com/
|
|
287
|
+
[1]: https://github.com/flyerhzm/rails_best_practices/wiki/How-to-write-your-own-check-list
|
|
@@ -10,12 +10,16 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.platform = Gem::Platform::RUBY
|
|
11
11
|
spec.authors = ['Richard Huang']
|
|
12
12
|
spec.email = ['flyerhzm@gmail.com']
|
|
13
|
-
spec.homepage = '
|
|
13
|
+
spec.homepage = 'https://github.com/flyerhzm/rails_best_practices'
|
|
14
14
|
spec.summary = 'a code metric tool for rails codes.'
|
|
15
15
|
spec.description = 'a code metric tool for rails codes, written in Ruby.'
|
|
16
|
+
spec.metadata = {
|
|
17
|
+
'changelog_uri' => 'https://github.com/flyerhzm/rails_best_practices/blob/main/CHANGELOG.md',
|
|
18
|
+
'source_code_uri' => 'https://github.com/flyerhzm/rails_best_practices'
|
|
19
|
+
}
|
|
16
20
|
spec.license = 'MIT'
|
|
17
21
|
|
|
18
|
-
spec.required_ruby_version = '>=
|
|
22
|
+
spec.required_ruby_version = '>= 2.3.0'
|
|
19
23
|
spec.required_rubygems_version = '>= 1.3.6'
|
|
20
24
|
|
|
21
25
|
spec.add_runtime_dependency('activesupport')
|
|
@@ -77,10 +77,10 @@ module RailsBestPractices
|
|
|
77
77
|
subject { described_class.new('.', 'format' => format) }
|
|
78
78
|
|
|
79
79
|
before do
|
|
80
|
-
subject.
|
|
81
|
-
subject.
|
|
82
|
-
subject.
|
|
83
|
-
subject.
|
|
80
|
+
allow(subject).to receive(:output_terminal_errors)
|
|
81
|
+
allow(subject).to receive(:output_html_errors)
|
|
82
|
+
allow(subject).to receive(:output_yaml_errors)
|
|
83
|
+
allow(subject).to receive(:output_xml_errors)
|
|
84
84
|
|
|
85
85
|
subject.output
|
|
86
86
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_best_practices
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.23.
|
|
4
|
+
version: 1.23.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Huang
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -207,8 +206,6 @@ files:
|
|
|
207
206
|
- CHANGELOG.md
|
|
208
207
|
- Gemfile
|
|
209
208
|
- Gemfile.lock
|
|
210
|
-
- Gemfile.ruby-2.6
|
|
211
|
-
- Gemfile.ruby-2.6.lock
|
|
212
209
|
- Guardfile
|
|
213
210
|
- MIT_LICENSE
|
|
214
211
|
- README.md
|
|
@@ -373,10 +370,12 @@ files:
|
|
|
373
370
|
- spec/rails_best_practices/reviews/use_scope_access_review_spec.rb
|
|
374
371
|
- spec/rails_best_practices/reviews/use_turbo_sprockets_rails3_review_spec.rb
|
|
375
372
|
- spec/spec_helper.rb
|
|
376
|
-
homepage:
|
|
373
|
+
homepage: https://github.com/flyerhzm/rails_best_practices
|
|
377
374
|
licenses:
|
|
378
375
|
- MIT
|
|
379
|
-
metadata:
|
|
376
|
+
metadata:
|
|
377
|
+
changelog_uri: https://github.com/flyerhzm/rails_best_practices/blob/main/CHANGELOG.md
|
|
378
|
+
source_code_uri: https://github.com/flyerhzm/rails_best_practices
|
|
380
379
|
post_install_message: |
|
|
381
380
|
********************************************************************************
|
|
382
381
|
|
|
@@ -399,15 +398,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
399
398
|
requirements:
|
|
400
399
|
- - ">="
|
|
401
400
|
- !ruby/object:Gem::Version
|
|
402
|
-
version:
|
|
401
|
+
version: 2.3.0
|
|
403
402
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
403
|
requirements:
|
|
405
404
|
- - ">="
|
|
406
405
|
- !ruby/object:Gem::Version
|
|
407
406
|
version: 1.3.6
|
|
408
407
|
requirements: []
|
|
409
|
-
rubygems_version: 3.
|
|
410
|
-
signing_key:
|
|
408
|
+
rubygems_version: 3.6.9
|
|
411
409
|
specification_version: 4
|
|
412
410
|
summary: a code metric tool for rails codes.
|
|
413
411
|
test_files:
|
data/Gemfile.ruby-2.6
DELETED
data/Gemfile.ruby-2.6.lock
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
rails_best_practices (1.23.1)
|
|
5
|
-
activesupport
|
|
6
|
-
code_analyzer (~> 0.5.5)
|
|
7
|
-
erubis
|
|
8
|
-
i18n
|
|
9
|
-
json
|
|
10
|
-
require_all (~> 3.0)
|
|
11
|
-
ruby-progressbar
|
|
12
|
-
|
|
13
|
-
GEM
|
|
14
|
-
remote: https://rubygems.org/
|
|
15
|
-
specs:
|
|
16
|
-
activesupport (6.1.4.6)
|
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
|
-
i18n (>= 1.6, < 2)
|
|
19
|
-
minitest (>= 5.1)
|
|
20
|
-
tzinfo (~> 2.0)
|
|
21
|
-
zeitwerk (~> 2.3)
|
|
22
|
-
awesome_print (1.9.2)
|
|
23
|
-
code_analyzer (0.5.5)
|
|
24
|
-
sexp_processor
|
|
25
|
-
coderay (1.1.3)
|
|
26
|
-
concurrent-ruby (1.1.9)
|
|
27
|
-
coveralls (0.8.23)
|
|
28
|
-
json (>= 1.8, < 3)
|
|
29
|
-
simplecov (~> 0.16.1)
|
|
30
|
-
term-ansicolor (~> 1.3)
|
|
31
|
-
thor (>= 0.19.4, < 2.0)
|
|
32
|
-
tins (~> 1.6)
|
|
33
|
-
diff-lcs (1.5.0)
|
|
34
|
-
docile (1.4.0)
|
|
35
|
-
erubis (2.7.0)
|
|
36
|
-
ffi (1.15.5)
|
|
37
|
-
formatador (1.1.0)
|
|
38
|
-
guard (2.18.0)
|
|
39
|
-
formatador (>= 0.2.4)
|
|
40
|
-
listen (>= 2.7, < 4.0)
|
|
41
|
-
lumberjack (>= 1.0.12, < 2.0)
|
|
42
|
-
nenv (~> 0.1)
|
|
43
|
-
notiffany (~> 0.0)
|
|
44
|
-
pry (>= 0.13.0)
|
|
45
|
-
shellany (~> 0.0)
|
|
46
|
-
thor (>= 0.18.1)
|
|
47
|
-
guard-compat (1.2.1)
|
|
48
|
-
guard-rspec (4.7.3)
|
|
49
|
-
guard (~> 2.1)
|
|
50
|
-
guard-compat (~> 1.1)
|
|
51
|
-
rspec (>= 2.99.0, < 4.0)
|
|
52
|
-
haml (5.2.2)
|
|
53
|
-
temple (>= 0.8.0)
|
|
54
|
-
tilt
|
|
55
|
-
i18n (1.9.1)
|
|
56
|
-
concurrent-ruby (~> 1.0)
|
|
57
|
-
json (2.6.1)
|
|
58
|
-
listen (3.7.1)
|
|
59
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
60
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
|
61
|
-
lumberjack (1.2.8)
|
|
62
|
-
method_source (1.0.0)
|
|
63
|
-
minitest (5.15.0)
|
|
64
|
-
nenv (0.3.0)
|
|
65
|
-
notiffany (0.1.3)
|
|
66
|
-
nenv (~> 0.1)
|
|
67
|
-
shellany (~> 0.0)
|
|
68
|
-
pry (0.14.1)
|
|
69
|
-
coderay (~> 1.1)
|
|
70
|
-
method_source (~> 1.0)
|
|
71
|
-
rake (13.0.6)
|
|
72
|
-
rb-fsevent (0.11.1)
|
|
73
|
-
rb-inotify (0.10.1)
|
|
74
|
-
ffi (~> 1.0)
|
|
75
|
-
require_all (3.0.0)
|
|
76
|
-
rspec (3.11.0)
|
|
77
|
-
rspec-core (~> 3.11.0)
|
|
78
|
-
rspec-expectations (~> 3.11.0)
|
|
79
|
-
rspec-mocks (~> 3.11.0)
|
|
80
|
-
rspec-core (3.11.0)
|
|
81
|
-
rspec-support (~> 3.11.0)
|
|
82
|
-
rspec-expectations (3.11.0)
|
|
83
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
84
|
-
rspec-support (~> 3.11.0)
|
|
85
|
-
rspec-mocks (3.11.0)
|
|
86
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
87
|
-
rspec-support (~> 3.11.0)
|
|
88
|
-
rspec-support (3.11.0)
|
|
89
|
-
ruby-progressbar (1.11.0)
|
|
90
|
-
sexp_processor (4.16.0)
|
|
91
|
-
shellany (0.0.1)
|
|
92
|
-
simplecov (0.16.1)
|
|
93
|
-
docile (~> 1.1)
|
|
94
|
-
json (>= 1.8, < 3)
|
|
95
|
-
simplecov-html (~> 0.10.0)
|
|
96
|
-
simplecov-html (0.10.2)
|
|
97
|
-
slim (4.1.0)
|
|
98
|
-
temple (>= 0.7.6, < 0.9)
|
|
99
|
-
tilt (>= 2.0.6, < 2.1)
|
|
100
|
-
sync (0.5.0)
|
|
101
|
-
temple (0.8.2)
|
|
102
|
-
term-ansicolor (1.7.1)
|
|
103
|
-
tins (~> 1.0)
|
|
104
|
-
thor (1.2.1)
|
|
105
|
-
tilt (2.0.10)
|
|
106
|
-
tins (1.31.0)
|
|
107
|
-
sync
|
|
108
|
-
tzinfo (2.0.4)
|
|
109
|
-
concurrent-ruby (~> 1.0)
|
|
110
|
-
zeitwerk (2.5.4)
|
|
111
|
-
|
|
112
|
-
PLATFORMS
|
|
113
|
-
ruby
|
|
114
|
-
|
|
115
|
-
DEPENDENCIES
|
|
116
|
-
activesupport (~> 6.1.4)
|
|
117
|
-
awesome_print
|
|
118
|
-
bundler
|
|
119
|
-
coveralls
|
|
120
|
-
guard
|
|
121
|
-
guard-rspec
|
|
122
|
-
haml
|
|
123
|
-
pry
|
|
124
|
-
rails_best_practices!
|
|
125
|
-
rake
|
|
126
|
-
rspec
|
|
127
|
-
slim
|
|
128
|
-
|
|
129
|
-
BUNDLED WITH
|
|
130
|
-
1.17.3
|