rubycritic 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -13
- data/lib/rubycritic/{quality_adapters → adapters/complexity}/flog.rb +0 -0
- data/lib/rubycritic/{smell_adapters → adapters/smell}/flay.rb +0 -0
- data/lib/rubycritic/{smell_adapters → adapters/smell}/flog.rb +0 -0
- data/lib/rubycritic/{smell_adapters → adapters/smell}/reek.rb +0 -0
- data/lib/rubycritic/analysers_runner.rb +3 -3
- data/lib/rubycritic/report_generators/assets/javascripts/application.js +34 -8
- data/lib/rubycritic/report_generators/assets/javascripts/{highcharts.src.js → highcharts.src-4.0.1.js} +0 -0
- data/lib/rubycritic/report_generators/assets/javascripts/jquery.scrollTo-1.4.11.js +186 -0
- data/lib/rubycritic/report_generators/assets/javascripts/jquery.tablesorter-2.0.js +1031 -0
- data/lib/rubycritic/report_generators/assets/javascripts/{prettify.js → prettify-4-Mar-2013.js} +0 -0
- data/lib/rubycritic/report_generators/assets/stylesheets/application.css +11 -13
- data/lib/rubycritic/report_generators/code_index_generator.rb +1 -1
- data/lib/rubycritic/report_generators/templates/code_index.html.erb +5 -3
- data/lib/rubycritic/report_generators/templates/layouts/application.html.erb +4 -2
- data/lib/rubycritic/report_generators/templates/smells_index.html.erb +3 -3
- data/lib/rubycritic/source_control_systems/git.rb +1 -1
- data/lib/rubycritic/turbulence.rb +4 -5
- data/lib/rubycritic/version.rb +1 -1
- data/test/lib/rubycritic/quality_adapters/flog_test.rb +1 -1
- data/test/lib/rubycritic/smell_adapters/flay_test.rb +1 -1
- data/test/lib/rubycritic/smell_adapters/flog_test.rb +1 -1
- data/test/lib/rubycritic/smell_adapters/reek_test.rb +1 -1
- metadata +10 -8
data/lib/rubycritic/report_generators/assets/javascripts/{prettify.js → prettify-4-Mar-2013.js}
RENAMED
File without changes
|
@@ -39,31 +39,29 @@ html {
|
|
39
39
|
margin: 0 auto;
|
40
40
|
}
|
41
41
|
|
42
|
-
.
|
43
|
-
.smells-table {
|
42
|
+
.analysis-index-table {
|
44
43
|
width: 100%;
|
45
44
|
border-collapse: collapse;
|
46
45
|
}
|
47
46
|
|
48
|
-
.
|
49
|
-
.smells-table th {
|
47
|
+
.analysis-index-table th {
|
50
48
|
text-align: left;
|
51
|
-
padding
|
49
|
+
padding: 8px 10px;
|
52
50
|
border-bottom: 1px solid silver;
|
53
51
|
font-size: 1.55em;
|
54
52
|
font-weight: normal;
|
55
53
|
}
|
56
54
|
|
57
|
-
.
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
.sortable-table th:hover {
|
56
|
+
background-color: #ECECEC;
|
57
|
+
cursor: pointer;
|
58
|
+
}
|
59
|
+
|
60
|
+
.analysis-index-table td {
|
61
|
+
padding: 12px 10px;
|
61
62
|
}
|
62
63
|
|
63
|
-
.
|
64
|
-
.code-table tr th:first-child,
|
65
|
-
.smells-table tr td:first-child,
|
66
|
-
.smells-table tr th:first-child {
|
64
|
+
.analysis-index-table .first-cell {
|
67
65
|
padding-left: 60px;
|
68
66
|
}
|
69
67
|
|
@@ -7,7 +7,7 @@ module Rubycritic
|
|
7
7
|
TEMPLATE = erb_template("code_index.html.erb")
|
8
8
|
|
9
9
|
def initialize(source_pathnames, smelly_pathnames)
|
10
|
-
@source_pathnames = source_pathnames
|
10
|
+
@source_pathnames = source_pathnames
|
11
11
|
@smelly_pathnames = smelly_pathnames
|
12
12
|
end
|
13
13
|
|
@@ -1,14 +1,16 @@
|
|
1
|
-
<table
|
1
|
+
<table id="js-code-table" class="analysis-index-table sortable-table">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th>Name</th>
|
4
|
+
<th class="first-cell">Name</th>
|
5
5
|
<th>Smells</th>
|
6
6
|
</tr>
|
7
7
|
</thead>
|
8
8
|
<tbody>
|
9
9
|
<% @source_pathnames.each do |pathname| %>
|
10
10
|
<tr>
|
11
|
-
<td
|
11
|
+
<td class="first-cell">
|
12
|
+
<a href="<%= file_path(pathname) %>"><%= analysed_file_name(pathname) %></a>
|
13
|
+
</td>
|
12
14
|
<td><%= smells_count(pathname) %></td>
|
13
15
|
</tr>
|
14
16
|
<% end %>
|
@@ -19,8 +19,10 @@
|
|
19
19
|
</header>
|
20
20
|
<%= yield %>
|
21
21
|
<script src="<%= javascript_path(:'jquery-2.1.0') %>"></script>
|
22
|
-
<script src="<%= javascript_path(:'
|
23
|
-
<script src="<%= javascript_path(:
|
22
|
+
<script src="<%= javascript_path(:'jquery.tablesorter-2.0') %>"></script>
|
23
|
+
<script src="<%= javascript_path(:'highcharts.src-4.0.1') %>"></script>
|
24
|
+
<script src="<%= javascript_path(:'jquery.scrollTo-1.4.11') %>"></script>
|
25
|
+
<script src="<%= javascript_path(:'prettify-4-Mar-2013') %>"></script>
|
24
26
|
<script src="<%= javascript_path(:application) %>"></script>
|
25
27
|
</body>
|
26
28
|
</html>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
<table class="
|
1
|
+
<table class="analysis-index-table">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th>Smell</th>
|
4
|
+
<th class="first-cell">Smell</th>
|
5
5
|
<th>Locations</th>
|
6
6
|
</tr>
|
7
7
|
</thead>
|
8
8
|
<tbody>
|
9
9
|
<% @smells.each do |smell| %>
|
10
10
|
<tr>
|
11
|
-
<td><%= smell.type %></td>
|
11
|
+
<td class="first-cell"><%= smell.type %></td>
|
12
12
|
<td>
|
13
13
|
<% smell.locations.each do |location| %>
|
14
14
|
<a href="<%= smell_location_path(location) %>"><%= location.file_name %></a>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require "rubycritic/analysers/churn"
|
2
|
-
require "rubycritic/
|
3
|
-
require "rubycritic/quality_adapters/flog"
|
2
|
+
require "rubycritic/adapters/complexity/flog"
|
4
3
|
|
5
4
|
module Rubycritic
|
6
5
|
|
@@ -13,9 +12,9 @@ module Rubycritic
|
|
13
12
|
def data
|
14
13
|
@paths.zip(churn, complexity).map do |path_info|
|
15
14
|
{
|
16
|
-
name
|
17
|
-
x
|
18
|
-
y
|
15
|
+
:name => path_info[0],
|
16
|
+
:x => path_info[1],
|
17
|
+
:y => path_info[2]
|
19
18
|
}
|
20
19
|
end
|
21
20
|
end
|
data/lib/rubycritic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubycritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -141,6 +141,10 @@ files:
|
|
141
141
|
- bin/rubycritic
|
142
142
|
- lib/rubycritic.rb
|
143
143
|
- lib/rubycritic/active_support/methods.rb
|
144
|
+
- lib/rubycritic/adapters/complexity/flog.rb
|
145
|
+
- lib/rubycritic/adapters/smell/flay.rb
|
146
|
+
- lib/rubycritic/adapters/smell/flog.rb
|
147
|
+
- lib/rubycritic/adapters/smell/reek.rb
|
144
148
|
- lib/rubycritic/analysers/churn.rb
|
145
149
|
- lib/rubycritic/analysers/config.reek
|
146
150
|
- lib/rubycritic/analysers/flay.rb
|
@@ -150,11 +154,12 @@ files:
|
|
150
154
|
- lib/rubycritic/cli.rb
|
151
155
|
- lib/rubycritic/configuration.rb
|
152
156
|
- lib/rubycritic/location.rb
|
153
|
-
- lib/rubycritic/quality_adapters/flog.rb
|
154
157
|
- lib/rubycritic/report_generators/assets/javascripts/application.js
|
155
|
-
- lib/rubycritic/report_generators/assets/javascripts/highcharts.src.js
|
158
|
+
- lib/rubycritic/report_generators/assets/javascripts/highcharts.src-4.0.1.js
|
156
159
|
- lib/rubycritic/report_generators/assets/javascripts/jquery-2.1.0.js
|
157
|
-
- lib/rubycritic/report_generators/assets/javascripts/
|
160
|
+
- lib/rubycritic/report_generators/assets/javascripts/jquery.scrollTo-1.4.11.js
|
161
|
+
- lib/rubycritic/report_generators/assets/javascripts/jquery.tablesorter-2.0.js
|
162
|
+
- lib/rubycritic/report_generators/assets/javascripts/prettify-4-Mar-2013.js
|
158
163
|
- lib/rubycritic/report_generators/assets/stylesheets/application.css
|
159
164
|
- lib/rubycritic/report_generators/assets/stylesheets/prettify.custom_theme.css
|
160
165
|
- lib/rubycritic/report_generators/base_generator.rb
|
@@ -174,9 +179,6 @@ files:
|
|
174
179
|
- lib/rubycritic/report_generators/view_helpers.rb
|
175
180
|
- lib/rubycritic/revision_comparator.rb
|
176
181
|
- lib/rubycritic/smell.rb
|
177
|
-
- lib/rubycritic/smell_adapters/flay.rb
|
178
|
-
- lib/rubycritic/smell_adapters/flog.rb
|
179
|
-
- lib/rubycritic/smell_adapters/reek.rb
|
180
182
|
- lib/rubycritic/smells_serializer.rb
|
181
183
|
- lib/rubycritic/smells_status_setter.rb
|
182
184
|
- lib/rubycritic/source_control_systems/git.rb
|