rails_best_practices 1.21.0 → 1.22.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/CHANGELOG.md +4 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +35 -33
- data/assets/result.html.erb +2 -0
- data/lib/rails_best_practices/analyzer.rb +1 -0
- data/lib/rails_best_practices/option_parser.rb +5 -0
- data/lib/rails_best_practices/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 349689325c6d2ac9c0f96f076153f1cceeb93586ff23d9ce2ac3a083befcc9dc
|
|
4
|
+
data.tar.gz: 88f23404986309df3287a5b7c7963374e7faea592b1ce48c100ba9225497c5c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e9b9b059759295ffb811c75a4a00c4a76dcf7fac01345590fd3ea7862a717535fc0faad8b1aaf0996c6e2cf86439222292649261667cb0625cab38548364700
|
|
7
|
+
data.tar.gz: 82856757223d3f764ba672b4d443c350c0ecd7f54bfe7e45fb1cd5714316077e6b8ac9c4a74a227a399a7645695bd0f51c7d68d787d1330fc86d9ddfe3dae8a2
|
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.
|
|
4
|
+
rails_best_practices (1.22.0)
|
|
5
5
|
activesupport
|
|
6
6
|
code_analyzer (>= 0.5.2)
|
|
7
7
|
erubis
|
|
@@ -13,7 +13,7 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activesupport (6.1.
|
|
16
|
+
activesupport (6.1.4.1)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
18
|
i18n (>= 1.6, < 2)
|
|
19
19
|
minitest (>= 5.1)
|
|
@@ -22,70 +22,72 @@ GEM
|
|
|
22
22
|
awesome_print (1.8.0)
|
|
23
23
|
code_analyzer (0.5.2)
|
|
24
24
|
sexp_processor
|
|
25
|
-
coderay (1.1.
|
|
26
|
-
concurrent-ruby (1.1.
|
|
25
|
+
coderay (1.1.3)
|
|
26
|
+
concurrent-ruby (1.1.9)
|
|
27
27
|
coveralls (0.8.23)
|
|
28
28
|
json (>= 1.8, < 3)
|
|
29
29
|
simplecov (~> 0.16.1)
|
|
30
30
|
term-ansicolor (~> 1.3)
|
|
31
31
|
thor (>= 0.19.4, < 2.0)
|
|
32
32
|
tins (~> 1.6)
|
|
33
|
-
diff-lcs (1.
|
|
33
|
+
diff-lcs (1.4.4)
|
|
34
34
|
docile (1.3.2)
|
|
35
35
|
erubis (2.7.0)
|
|
36
|
-
ffi (1.
|
|
37
|
-
formatador (0.
|
|
38
|
-
guard (2.
|
|
36
|
+
ffi (1.15.4)
|
|
37
|
+
formatador (0.3.0)
|
|
38
|
+
guard (2.18.0)
|
|
39
39
|
formatador (>= 0.2.4)
|
|
40
40
|
listen (>= 2.7, < 4.0)
|
|
41
41
|
lumberjack (>= 1.0.12, < 2.0)
|
|
42
42
|
nenv (~> 0.1)
|
|
43
43
|
notiffany (~> 0.0)
|
|
44
|
-
pry (>= 0.
|
|
44
|
+
pry (>= 0.13.0)
|
|
45
45
|
shellany (~> 0.0)
|
|
46
46
|
thor (>= 0.18.1)
|
|
47
|
-
guard-
|
|
47
|
+
guard-compat (1.2.1)
|
|
48
|
+
guard-rspec (4.7.3)
|
|
48
49
|
guard (~> 2.1)
|
|
49
|
-
|
|
50
|
+
guard-compat (~> 1.1)
|
|
51
|
+
rspec (>= 2.99.0, < 4.0)
|
|
50
52
|
haml (5.1.2)
|
|
51
53
|
temple (>= 0.8.0)
|
|
52
54
|
tilt
|
|
53
55
|
i18n (1.8.10)
|
|
54
56
|
concurrent-ruby (~> 1.0)
|
|
55
57
|
json (2.3.0)
|
|
56
|
-
listen (3.
|
|
58
|
+
listen (3.7.0)
|
|
57
59
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
58
60
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
59
|
-
lumberjack (1.
|
|
60
|
-
method_source (0.
|
|
61
|
+
lumberjack (1.2.8)
|
|
62
|
+
method_source (1.0.0)
|
|
61
63
|
minitest (5.14.4)
|
|
62
64
|
nenv (0.3.0)
|
|
63
65
|
notiffany (0.1.3)
|
|
64
66
|
nenv (~> 0.1)
|
|
65
67
|
shellany (~> 0.0)
|
|
66
|
-
pry (0.
|
|
67
|
-
coderay (~> 1.1
|
|
68
|
-
method_source (~>
|
|
68
|
+
pry (0.14.1)
|
|
69
|
+
coderay (~> 1.1)
|
|
70
|
+
method_source (~> 1.0)
|
|
69
71
|
rake (13.0.1)
|
|
70
|
-
rb-fsevent (0.
|
|
72
|
+
rb-fsevent (0.11.0)
|
|
71
73
|
rb-inotify (0.10.1)
|
|
72
74
|
ffi (~> 1.0)
|
|
73
75
|
require_all (3.0.0)
|
|
74
|
-
rspec (3.
|
|
75
|
-
rspec-core (~> 3.
|
|
76
|
-
rspec-expectations (~> 3.
|
|
77
|
-
rspec-mocks (~> 3.
|
|
78
|
-
rspec-core (3.
|
|
79
|
-
rspec-support (~> 3.
|
|
80
|
-
rspec-expectations (3.
|
|
76
|
+
rspec (3.10.0)
|
|
77
|
+
rspec-core (~> 3.10.0)
|
|
78
|
+
rspec-expectations (~> 3.10.0)
|
|
79
|
+
rspec-mocks (~> 3.10.0)
|
|
80
|
+
rspec-core (3.10.1)
|
|
81
|
+
rspec-support (~> 3.10.0)
|
|
82
|
+
rspec-expectations (3.10.1)
|
|
81
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
82
|
-
rspec-support (~> 3.
|
|
83
|
-
rspec-mocks (3.
|
|
84
|
+
rspec-support (~> 3.10.0)
|
|
85
|
+
rspec-mocks (3.10.2)
|
|
84
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
85
|
-
rspec-support (~> 3.
|
|
86
|
-
rspec-support (3.
|
|
87
|
+
rspec-support (~> 3.10.0)
|
|
88
|
+
rspec-support (3.10.2)
|
|
87
89
|
ruby-progressbar (1.11.0)
|
|
88
|
-
sexp_processor (4.15.
|
|
90
|
+
sexp_processor (4.15.3)
|
|
89
91
|
shellany (0.0.1)
|
|
90
92
|
simplecov (0.16.1)
|
|
91
93
|
docile (~> 1.1)
|
|
@@ -98,12 +100,12 @@ GEM
|
|
|
98
100
|
temple (0.8.2)
|
|
99
101
|
term-ansicolor (1.7.1)
|
|
100
102
|
tins (~> 1.0)
|
|
101
|
-
thor (1.0
|
|
103
|
+
thor (1.1.0)
|
|
102
104
|
tilt (2.0.10)
|
|
103
105
|
tins (1.22.2)
|
|
104
106
|
tzinfo (2.0.4)
|
|
105
107
|
concurrent-ruby (~> 1.0)
|
|
106
|
-
zeitwerk (2.
|
|
108
|
+
zeitwerk (2.5.1)
|
|
107
109
|
|
|
108
110
|
PLATFORMS
|
|
109
111
|
ruby
|
|
@@ -122,4 +124,4 @@ DEPENDENCIES
|
|
|
122
124
|
slim
|
|
123
125
|
|
|
124
126
|
BUNDLED WITH
|
|
125
|
-
2.
|
|
127
|
+
2.2.22
|
data/assets/result.html.erb
CHANGED
|
@@ -115,6 +115,8 @@
|
|
|
115
115
|
<td class='filename'>
|
|
116
116
|
<% if @github %>
|
|
117
117
|
<a href='<%= @github_name %>/blob/<%= @last_commit_id %>/<%= error.short_filename %>#L<%= error.first_line_number %>' target='_blank'><%= error.short_filename %></a>
|
|
118
|
+
<% elsif @atom %>
|
|
119
|
+
<a href='atom://core/open/file?filename=<%= File.expand_path(error.filename) %>&line=<%= error.line_number %>'><%= error.short_filename %></a>
|
|
118
120
|
<% elsif @textmate %>
|
|
119
121
|
<a href='txmt://open/?url=file://<%= File.expand_path(error.filename) %>&line=<%= error.line_number %>'><%= error.short_filename %></a>
|
|
120
122
|
<% elsif @sublime %>
|
|
@@ -249,6 +249,7 @@ module RailsBestPractices
|
|
|
249
249
|
file.puts eruby.evaluate(
|
|
250
250
|
errors: errors,
|
|
251
251
|
error_types: error_types,
|
|
252
|
+
atom: @options['with-atom'],
|
|
252
253
|
textmate: @options['with-textmate'],
|
|
253
254
|
vscode: @options['with-vscode'],
|
|
254
255
|
sublime: @options['with-sublime'],
|
|
@@ -10,6 +10,7 @@ module RailsBestPractices
|
|
|
10
10
|
# -f, --format FORMAT output format (text, html, yaml, json, xml)
|
|
11
11
|
# --output-file FILE output html file for the analyzing result
|
|
12
12
|
# --without-color only output plain text without color
|
|
13
|
+
# --with-atom open file by atom in html format
|
|
13
14
|
# --with-textmate open file by textmate in html format
|
|
14
15
|
# --with-vscode open file by vscode in html format
|
|
15
16
|
# --with-sublime open file by sublime in html format (requires subl-handler)
|
|
@@ -49,6 +50,10 @@ module RailsBestPractices
|
|
|
49
50
|
options['without-color'] = true
|
|
50
51
|
end
|
|
51
52
|
|
|
53
|
+
opts.on('--with-atom', 'open file by atom in html format') do
|
|
54
|
+
options['with-atom'] = true
|
|
55
|
+
end
|
|
56
|
+
|
|
52
57
|
opts.on('--with-textmate', 'open file by textmate in html format') do
|
|
53
58
|
options['with-textmate'] = true
|
|
54
59
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_best_practices
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.22.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Huang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -403,7 +403,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
403
403
|
- !ruby/object:Gem::Version
|
|
404
404
|
version: 1.3.6
|
|
405
405
|
requirements: []
|
|
406
|
-
rubygems_version: 3.
|
|
406
|
+
rubygems_version: 3.2.22
|
|
407
407
|
signing_key:
|
|
408
408
|
specification_version: 4
|
|
409
409
|
summary: a code metric tool for rails codes.
|