rails_best_practices 1.21.0 → 1.22.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
- data/rails_best_practices.gemspec +10 -8
- 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: 36bdd893273a363e797a90d58df2426f0429f94637171cdf803d4cfe3a3c0033
|
4
|
+
data.tar.gz: c2fc8eb82530d50615ecfd423da421c056fb309fd4edcdde91ea5cbe4c9ed2c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 158478715edfea916abf0666e24665ac0da4aa5e6784df370a78f44654f2b817d415866ec363503bb7081011ace66edb0e32197d9d384c394f59cb429dc8d0ee
|
7
|
+
data.tar.gz: c785c39a4050af719e2513241dcff648dec9fe0d6c8bda3717e50da991fbc8d0d03cc1159fff946ad06d2c7378a5b9247146266e1e94d7d85178cbe50181e067
|
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.1)
|
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
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'rails_best_practices/version'
|
4
6
|
|
5
7
|
Gem::Specification.new do |spec|
|
6
8
|
spec.name = 'rails_best_practices'
|
@@ -16,13 +18,13 @@ Gem::Specification.new do |spec|
|
|
16
18
|
spec.required_ruby_version = '>= 1.9.0'
|
17
19
|
spec.required_rubygems_version = '>= 1.3.6'
|
18
20
|
|
19
|
-
spec.
|
20
|
-
spec.
|
21
|
-
spec.
|
22
|
-
spec.
|
23
|
-
spec.
|
24
|
-
spec.
|
25
|
-
spec.
|
21
|
+
spec.add_runtime_dependency('activesupport')
|
22
|
+
spec.add_runtime_dependency('code_analyzer', '>= 0.5.2')
|
23
|
+
spec.add_runtime_dependency('erubis')
|
24
|
+
spec.add_runtime_dependency('i18n')
|
25
|
+
spec.add_runtime_dependency('json')
|
26
|
+
spec.add_runtime_dependency('require_all', '~> 3.0')
|
27
|
+
spec.add_runtime_dependency('ruby-progressbar')
|
26
28
|
|
27
29
|
spec.add_development_dependency('awesome_print')
|
28
30
|
spec.add_development_dependency('bundler')
|
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.1
|
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.
|