rubycritic 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +3 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/Rakefile +2 -1
- data/features/step_definitions/rake_task_steps.rb +1 -0
- data/features/step_definitions/rubycritic_steps.rb +1 -0
- data/features/step_definitions/sample_file_steps.rb +1 -0
- data/features/support/env.rb +1 -0
- data/lib/rubycritic.rb +1 -0
- data/lib/rubycritic/analysers/attributes.rb +1 -0
- data/lib/rubycritic/analysers/churn.rb +1 -0
- data/lib/rubycritic/analysers/complexity.rb +1 -0
- data/lib/rubycritic/analysers/helpers/ast_node.rb +2 -1
- data/lib/rubycritic/analysers/helpers/flay.rb +1 -0
- data/lib/rubycritic/analysers/helpers/flog.rb +1 -0
- data/lib/rubycritic/analysers/helpers/methods_counter.rb +1 -0
- data/lib/rubycritic/analysers/helpers/modules_locator.rb +1 -0
- data/lib/rubycritic/analysers/helpers/parser.rb +1 -0
- data/lib/rubycritic/analysers/helpers/reek.rb +1 -0
- data/lib/rubycritic/analysers/smells/flay.rb +1 -0
- data/lib/rubycritic/analysers/smells/flog.rb +1 -0
- data/lib/rubycritic/analysers/smells/reek.rb +1 -0
- data/lib/rubycritic/analysers_runner.rb +1 -0
- data/lib/rubycritic/analysis_summary.rb +1 -1
- data/lib/rubycritic/browser.rb +1 -0
- data/lib/rubycritic/cli/application.rb +1 -0
- data/lib/rubycritic/cli/options.rb +2 -1
- data/lib/rubycritic/colorize.rb +1 -0
- data/lib/rubycritic/command_factory.rb +1 -0
- data/lib/rubycritic/commands/base.rb +1 -0
- data/lib/rubycritic/commands/ci.rb +1 -0
- data/lib/rubycritic/commands/default.rb +1 -0
- data/lib/rubycritic/commands/help.rb +1 -0
- data/lib/rubycritic/commands/status_reporter.rb +1 -0
- data/lib/rubycritic/commands/version.rb +1 -0
- data/lib/rubycritic/configuration.rb +1 -0
- data/lib/rubycritic/core/analysed_module.rb +1 -0
- data/lib/rubycritic/core/analysed_modules_collection.rb +1 -0
- data/lib/rubycritic/core/location.rb +1 -0
- data/lib/rubycritic/core/rating.rb +1 -0
- data/lib/rubycritic/core/smell.rb +1 -0
- data/lib/rubycritic/generators/console_report.rb +1 -0
- data/lib/rubycritic/generators/html/assets/stylesheets/application.css +4 -0
- data/lib/rubycritic/generators/html/base.rb +1 -0
- data/lib/rubycritic/generators/html/code_file.rb +1 -0
- data/lib/rubycritic/generators/html/code_index.rb +1 -0
- data/lib/rubycritic/generators/html/line.rb +1 -0
- data/lib/rubycritic/generators/html/overview.rb +1 -0
- data/lib/rubycritic/generators/html/smells_index.rb +1 -0
- data/lib/rubycritic/generators/html/templates/smelly_line.html.erb +2 -2
- data/lib/rubycritic/generators/html/turbulence.rb +1 -0
- data/lib/rubycritic/generators/html/view_helpers.rb +1 -0
- data/lib/rubycritic/generators/html_report.rb +1 -0
- data/lib/rubycritic/generators/json/simple.rb +1 -0
- data/lib/rubycritic/generators/json_report.rb +1 -0
- data/lib/rubycritic/generators/text/list.rb +1 -0
- data/lib/rubycritic/rake_task.rb +1 -0
- data/lib/rubycritic/reporter.rb +1 -0
- data/lib/rubycritic/serializer.rb +1 -0
- data/lib/rubycritic/smells_status_setter.rb +1 -0
- data/lib/rubycritic/source_control_systems/base.rb +1 -0
- data/lib/rubycritic/source_control_systems/double.rb +1 -0
- data/lib/rubycritic/source_control_systems/git.rb +1 -0
- data/lib/rubycritic/source_control_systems/mercurial.rb +1 -0
- data/lib/rubycritic/source_control_systems/perforce.rb +1 -0
- data/lib/rubycritic/version.rb +1 -1
- data/rubycritic.gemspec +2 -1
- data/test/analysers_test_helper.rb +1 -0
- data/test/lib/rubycritic/analysers/churn_test.rb +1 -0
- data/test/lib/rubycritic/analysers/complexity_test.rb +1 -0
- data/test/lib/rubycritic/analysers/helpers/methods_counter_test.rb +1 -0
- data/test/lib/rubycritic/analysers/helpers/modules_locator_test.rb +1 -0
- data/test/lib/rubycritic/analysers/smells/flay_test.rb +1 -0
- data/test/lib/rubycritic/analysers/smells/flog_test.rb +1 -0
- data/test/lib/rubycritic/analysers/smells/reek_test.rb +1 -0
- data/test/lib/rubycritic/analysis_summary_test.rb +4 -3
- data/test/lib/rubycritic/browser_test.rb +1 -0
- data/test/lib/rubycritic/commands/status_reporter_test.rb +1 -0
- data/test/lib/rubycritic/configuration_test.rb +1 -0
- data/test/lib/rubycritic/core/analysed_module_test.rb +1 -0
- data/test/lib/rubycritic/core/analysed_modules_collection_test.rb +4 -3
- data/test/lib/rubycritic/core/location_test.rb +1 -0
- data/test/lib/rubycritic/core/smell_test.rb +1 -0
- data/test/lib/rubycritic/core/smells_array_test.rb +1 -0
- data/test/lib/rubycritic/generators/console_report_test.rb +1 -0
- data/test/lib/rubycritic/generators/json_report_test.rb +1 -0
- data/test/lib/rubycritic/generators/turbulence_test.rb +1 -0
- data/test/lib/rubycritic/generators/view_helpers_test.rb +1 -0
- data/test/lib/rubycritic/revision_comparator_test.rb +1 -0
- data/test/lib/rubycritic/smells_status_setter_test.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/base_test.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/double_test.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/git_test.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/interfaces/basic.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/interfaces/time_travel.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/mercurial_test.rb +1 -0
- data/test/lib/rubycritic/source_control_systems/perforce_test.rb +1 -0
- data/test/lib/rubycritic/source_locator_test.rb +1 -0
- data/test/lib/rubycritic/version_test.rb +1 -0
- data/test/test_helper.rb +1 -0
- metadata +4 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61112a2ab4b0874d396e788776e9c7fb78cb2f1d
|
4
|
+
data.tar.gz: eb4a83e2c42fe2b8e0e80beae87fd4848782c14e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9940478bc6a654fb3d8dc84691f8af39acc3b8bb09c6d3c8cf6cfbfe335ad7f3c4e1985675852f4d4ae1b141f825658335aba6ad14db6f8784794b698e4170fe
|
7
|
+
data.tar.gz: e87a9979ab682b815542030926535b2888aa264abc865bacb02c22487048d7b4264966a380bdb88109e6bcde103223acab43f76e2f0a018fc4a8b578c3165eef
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# master (unreleased)
|
2
2
|
|
3
|
+
# 3.2.1 / 2017-05-13 [(commits)](https://github.com/whitesmith/rubycritic/compare/v3.2.0...v3.2.1)
|
4
|
+
|
5
|
+
* [CHANGE] Update `rubocop` to 0.48.x from 0.47.1 (by [@koic]() and [@Onumis][])
|
6
|
+
* [BUGFIX] Nest ordered list so we don't render errors as line numbers (by [@georgedrummond][])
|
7
|
+
|
3
8
|
# 3.2.0 / 2017-03-24
|
4
9
|
|
5
10
|
* [CHANGE] Update `rubocop` to 0.47.1 from 0.42.0 (by [@jdickey][])
|
@@ -197,3 +202,5 @@
|
|
197
202
|
[@hoshinotsuyoshi]: https://github.com/hoshinotsuyoshi
|
198
203
|
[@thedrow]: https://github.com/thedrow
|
199
204
|
[@jdickey]: https://github.com/jdickey
|
205
|
+
[@koic]: https://github.com/koic
|
206
|
+
[@georgedrummond]: https://github.com/georgedrummond
|
data/Gemfile
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'bundler/gem_tasks'
|
3
4
|
require 'rake/testtask'
|
4
5
|
require 'rubocop/rake_task'
|
@@ -24,4 +25,4 @@ RubyCritic::RakeTask.new do |task|
|
|
24
25
|
task.paths = FileList['lib/**/*.rb']
|
25
26
|
end
|
26
27
|
|
27
|
-
task default: [
|
28
|
+
task default: %i[test features reek rubocop]
|
data/features/support/env.rb
CHANGED
data/lib/rubycritic.rb
CHANGED
data/lib/rubycritic/browser.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'optparse'
|
3
4
|
require 'rubycritic/browser'
|
4
5
|
|
@@ -21,7 +22,7 @@ module RubyCritic
|
|
21
22
|
|
22
23
|
opts.on(
|
23
24
|
'-f', '--format [FORMAT]',
|
24
|
-
[
|
25
|
+
%i[html json console],
|
25
26
|
'Report smells in the given format:',
|
26
27
|
' html (default; will open in a browser)',
|
27
28
|
' json',
|
data/lib/rubycritic/colorize.rb
CHANGED
data/lib/rubycritic/rake_task.rb
CHANGED
data/lib/rubycritic/reporter.rb
CHANGED
data/lib/rubycritic/version.rb
CHANGED
data/rubycritic.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
lib = File.expand_path('../lib', __FILE__)
|
4
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'rubycritic/version'
|
@@ -37,5 +38,5 @@ Gem::Specification.new do |spec|
|
|
37
38
|
spec.add_development_dependency 'minitest', '~> 5.3', '>= 5.3.0'
|
38
39
|
spec.add_development_dependency 'mocha', '~> 1.1', '>= 1.1.0'
|
39
40
|
spec.add_development_dependency 'rake', '~> 11.0', '>= 11.0.0'
|
40
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
41
|
+
spec.add_development_dependency 'rubocop', '~> 0.48.0'
|
41
42
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'test_helper'
|
3
4
|
require 'rubycritic/analysis_summary'
|
4
5
|
|
@@ -7,10 +8,10 @@ module RubyCritic
|
|
7
8
|
before do
|
8
9
|
analysed_modules = AnalysedModulesCollectionDouble.new(
|
9
10
|
[
|
10
|
-
AnalysedModuleDouble.new(rating: 'A', churn: 2, smells: [
|
11
|
+
AnalysedModuleDouble.new(rating: 'A', churn: 2, smells: %i[a b c]),
|
11
12
|
AnalysedModuleDouble.new(rating: 'A', churn: 3, smells: [:b]),
|
12
|
-
AnalysedModuleDouble.new(rating: 'A', churn: 4, smells: [
|
13
|
-
AnalysedModuleDouble.new(rating: 'B', churn: 5, smells: [
|
13
|
+
AnalysedModuleDouble.new(rating: 'A', churn: 4, smells: %i[x y]),
|
14
|
+
AnalysedModuleDouble.new(rating: 'B', churn: 5, smells: %i[a z])
|
14
15
|
]
|
15
16
|
)
|
16
17
|
@summary = RubyCritic::AnalysisSummary.generate(analysed_modules)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'test_helper'
|
3
4
|
require 'rubycritic/core/analysed_modules_collection'
|
4
5
|
|
@@ -15,7 +16,7 @@ describe RubyCritic::AnalysedModulesCollection do
|
|
15
16
|
end
|
16
17
|
|
17
18
|
context 'with a list of files' do
|
18
|
-
let(:paths) { %w
|
19
|
+
let(:paths) { %w[test/samples/doesnt_exist.rb test/samples/unparsable.rb test/samples/empty.rb] }
|
19
20
|
|
20
21
|
it 'registers one AnalysedModule element per existent file' do
|
21
22
|
subject.count.must_equal 2
|
@@ -32,7 +33,7 @@ describe RubyCritic::AnalysedModulesCollection do
|
|
32
33
|
end
|
33
34
|
|
34
35
|
context 'with redundant paths' do
|
35
|
-
let(:paths) { %w
|
36
|
+
let(:paths) { %w[test/samples/flog test/samples/flog/complex.rb] }
|
36
37
|
|
37
38
|
it 'returns a redundant collection' do
|
38
39
|
subject.count.must_equal 3
|
@@ -64,7 +65,7 @@ describe RubyCritic::AnalysedModulesCollection do
|
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
67
|
-
let(:paths) { %w
|
68
|
+
let(:paths) { %w[test/samples/flog test/samples/flay] }
|
68
69
|
|
69
70
|
context 'with perfect modules' do
|
70
71
|
let(:costs) { [0.0, 0.0, 0.0, 0.0] }
|
data/test/test_helper.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: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flay
|
@@ -268,20 +268,14 @@ dependencies:
|
|
268
268
|
requirements:
|
269
269
|
- - "~>"
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version:
|
272
|
-
- - ">="
|
273
|
-
- !ruby/object:Gem::Version
|
274
|
-
version: 0.47.1
|
271
|
+
version: 0.48.0
|
275
272
|
type: :development
|
276
273
|
prerelease: false
|
277
274
|
version_requirements: !ruby/object:Gem::Requirement
|
278
275
|
requirements:
|
279
276
|
- - "~>"
|
280
277
|
- !ruby/object:Gem::Version
|
281
|
-
version:
|
282
|
-
- - ">="
|
283
|
-
- !ruby/object:Gem::Version
|
284
|
-
version: 0.47.1
|
278
|
+
version: 0.48.0
|
285
279
|
description: RubyCritic is a tool that wraps around various static analysis gems to
|
286
280
|
provide a quality report of your Ruby code.
|
287
281
|
email:
|