rubycritic 2.9.2 → 2.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +6 -0
- data/.todo.reek +111 -108
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/bin/rubycritic +1 -1
- data/features/command_line_interface/minimum_score.feature +1 -1
- data/features/command_line_interface/options.feature +2 -2
- data/features/rake_task.feature +5 -5
- data/features/step_definitions/rubycritic_steps.rb +4 -4
- data/features/support/env.rb +2 -2
- data/lib/rubycritic/analysers/attributes.rb +1 -1
- data/lib/rubycritic/analysers/churn.rb +1 -1
- data/lib/rubycritic/analysers/complexity.rb +1 -1
- data/lib/rubycritic/analysers/helpers/ast_node.rb +1 -1
- data/lib/rubycritic/analysers/helpers/flay.rb +1 -1
- data/lib/rubycritic/analysers/helpers/flog.rb +1 -1
- data/lib/rubycritic/analysers/helpers/methods_counter.rb +1 -1
- data/lib/rubycritic/analysers/helpers/modules_locator.rb +1 -1
- data/lib/rubycritic/analysers/helpers/parser.rb +1 -1
- data/lib/rubycritic/analysers/helpers/reek.rb +1 -1
- data/lib/rubycritic/analysers/smells/flay.rb +1 -1
- data/lib/rubycritic/analysers/smells/flog.rb +1 -1
- data/lib/rubycritic/analysers/smells/reek.rb +1 -1
- data/lib/rubycritic/analysers_runner.rb +1 -1
- data/lib/rubycritic/browser.rb +1 -1
- data/lib/rubycritic/cli/application.rb +2 -2
- data/lib/rubycritic/cli/options.rb +1 -1
- data/lib/rubycritic/colorize.rb +1 -1
- data/lib/rubycritic/command_factory.rb +1 -1
- data/lib/rubycritic/commands/base.rb +2 -2
- data/lib/rubycritic/commands/ci.rb +1 -1
- data/lib/rubycritic/commands/default.rb +1 -1
- data/lib/rubycritic/commands/help.rb +1 -1
- data/lib/rubycritic/commands/status_reporter.rb +1 -1
- data/lib/rubycritic/commands/version.rb +1 -1
- data/lib/rubycritic/configuration.rb +5 -1
- data/lib/rubycritic/core/analysed_module.rb +2 -2
- data/lib/rubycritic/core/analysed_modules_collection.rb +1 -1
- data/lib/rubycritic/core/location.rb +1 -1
- data/lib/rubycritic/core/rating.rb +1 -1
- data/lib/rubycritic/core/smell.rb +1 -1
- data/lib/rubycritic/generators/console_report.rb +1 -1
- data/lib/rubycritic/generators/html/assets/javascripts/jquery-2.1.0.js +1 -1
- data/lib/rubycritic/generators/html/base.rb +1 -1
- data/lib/rubycritic/generators/html/code_file.rb +1 -1
- data/lib/rubycritic/generators/html/code_index.rb +1 -1
- data/lib/rubycritic/generators/html/line.rb +1 -1
- data/lib/rubycritic/generators/html/overview.rb +1 -1
- data/lib/rubycritic/generators/html/smells_index.rb +1 -1
- data/lib/rubycritic/generators/html/turbulence.rb +1 -1
- data/lib/rubycritic/generators/html/view_helpers.rb +1 -1
- data/lib/rubycritic/generators/html_report.rb +2 -2
- data/lib/rubycritic/generators/json/simple.rb +13 -2
- data/lib/rubycritic/generators/json_report.rb +5 -2
- data/lib/rubycritic/generators/text/list.rb +1 -1
- data/lib/rubycritic/rake_task.rb +2 -2
- data/lib/rubycritic/reporter.rb +1 -1
- data/lib/rubycritic/revision_comparator.rb +1 -1
- data/lib/rubycritic/serializer.rb +1 -1
- data/lib/rubycritic/smells_status_setter.rb +1 -1
- data/lib/rubycritic/source_control_systems/base.rb +1 -1
- data/lib/rubycritic/source_control_systems/double.rb +1 -1
- data/lib/rubycritic/source_control_systems/git.rb +1 -1
- data/lib/rubycritic/source_control_systems/mercurial.rb +1 -1
- data/lib/rubycritic/source_locator.rb +1 -1
- data/lib/rubycritic/version.rb +2 -2
- data/lib/rubycritic.rb +1 -1
- data/rubycritic.gemspec +2 -1
- data/test/lib/rubycritic/analysers/churn_test.rb +3 -3
- data/test/lib/rubycritic/analysers/complexity_test.rb +2 -2
- data/test/lib/rubycritic/analysers/helpers/methods_counter_test.rb +4 -4
- data/test/lib/rubycritic/analysers/helpers/modules_locator_test.rb +9 -9
- data/test/lib/rubycritic/analysers/smells/flay_test.rb +4 -4
- data/test/lib/rubycritic/analysers/smells/flog_test.rb +2 -2
- data/test/lib/rubycritic/analysers/smells/reek_test.rb +2 -2
- data/test/lib/rubycritic/browser_test.rb +2 -2
- data/test/lib/rubycritic/commands/status_reporter_test.rb +7 -7
- data/test/lib/rubycritic/configuration_test.rb +9 -9
- data/test/lib/rubycritic/core/analysed_module_test.rb +9 -9
- data/test/lib/rubycritic/core/analysed_modules_collection_test.rb +3 -3
- data/test/lib/rubycritic/core/location_test.rb +7 -7
- data/test/lib/rubycritic/core/smell_test.rb +15 -15
- data/test/lib/rubycritic/core/smells_array_test.rb +12 -12
- data/test/lib/rubycritic/generators/console_report_test.rb +5 -5
- data/test/lib/rubycritic/generators/json_report_test.rb +36 -0
- data/test/lib/rubycritic/generators/turbulence_test.rb +2 -2
- data/test/lib/rubycritic/generators/view_helpers_test.rb +2 -2
- data/test/lib/rubycritic/revision_comparator_test.rb +10 -10
- data/test/lib/rubycritic/smells_status_setter_test.rb +4 -4
- data/test/lib/rubycritic/source_control_systems/base_test.rb +7 -7
- data/test/lib/rubycritic/source_control_systems/double_test.rb +1 -1
- data/test/lib/rubycritic/source_control_systems/git_test.rb +1 -1
- data/test/lib/rubycritic/source_control_systems/mercurial_test.rb +1 -1
- data/test/lib/rubycritic/source_locator_test.rb +12 -12
- data/test/lib/rubycritic/version_test.rb +2 -2
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d45634d69cea138832dc86f6c5e57a56e1c7a1a
|
4
|
+
data.tar.gz: 3786e8e320a4d6dc1a3f50eec50be3e520861f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da6f74791c9c71255c3e1150d38a8afd9fe6cc46715c5de86ff9609311818b5dc6d2aeaa38baa21fe32ee1b5615e3353ec376810844dec8a790153e7aa5804da
|
7
|
+
data.tar.gz: c532a3b2a06a996ac31fe11253168cf050f752bba5975339403867894387afba3749a1a61c429bb0b501b85940764a36e09605ef10a1c0a3cafa208cf773e854
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
data/.todo.reek
CHANGED
@@ -1,138 +1,141 @@
|
|
1
1
|
---
|
2
2
|
IrresponsibleModule:
|
3
3
|
exclude:
|
4
|
-
-
|
5
|
-
-
|
6
|
-
-
|
4
|
+
- RubyCritic::Analyser::Attributes
|
5
|
+
- RubyCritic::Analyser::Churn
|
6
|
+
- RubyCritic::Analyser::Complexity
|
7
7
|
- Parser::AST::Node
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
14
|
-
-
|
15
|
-
-
|
16
|
-
-
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
8
|
+
- RubyCritic::AST::EmptyNode
|
9
|
+
- RubyCritic::Flay
|
10
|
+
- RubyCritic::Flog
|
11
|
+
- RubyCritic::MethodsCounter
|
12
|
+
- RubyCritic::ModulesLocator
|
13
|
+
- RubyCritic::Parser
|
14
|
+
- RubyCritic::Reek
|
15
|
+
- RubyCritic::Analyser::FlaySmells
|
16
|
+
- RubyCritic::Analyser::FlogSmells
|
17
|
+
- RubyCritic::Analyser::ReekSmells
|
18
|
+
- RubyCritic::AnalysersRunner
|
19
|
+
- RubyCritic::Browser
|
20
|
+
- RubyCritic::Cli::Application
|
21
|
+
- RubyCritic::Cli::Options
|
22
|
+
- RubyCritic::Colorize
|
23
|
+
- RubyCritic::CommandFactory
|
24
|
+
- RubyCritic::Command::Base
|
25
|
+
- RubyCritic::Command::Ci
|
26
|
+
- RubyCritic::Command::Default
|
27
|
+
- RubyCritic::Command::Help
|
28
|
+
- RubyCritic::Command::StatusReporter
|
29
|
+
- RubyCritic::Command::Version
|
30
|
+
- RubyCritic::Config
|
31
|
+
- RubyCritic::Configuration
|
32
|
+
- RubyCritic::AnalysedModule
|
33
|
+
- RubyCritic::AnalysedModulesCollection
|
34
|
+
- RubyCritic::Location
|
35
|
+
- RubyCritic::Rating
|
36
|
+
- RubyCritic::Smell
|
37
|
+
- RubyCritic::Generator::ConsoleReport
|
38
|
+
- RubyCritic::Generator::Html::Base
|
39
|
+
- RubyCritic::Generator::Html::CodeFile
|
40
|
+
- RubyCritic::Generator::Html::CodeIndex
|
41
|
+
- RubyCritic::Generator::Html::Line
|
42
|
+
- RubyCritic::Generator::Html::Overview
|
43
|
+
- RubyCritic::Generator::Html::SmellsIndex
|
44
|
+
- RubyCritic::Turbulence
|
45
|
+
- RubyCritic::ViewHelpers
|
46
|
+
- RubyCritic::Generator::HtmlReport
|
47
|
+
- RubyCritic::Generator::Json::Simple
|
48
|
+
- RubyCritic::Generator::JsonReport
|
49
|
+
- RubyCritic::Generator::Text::List
|
50
|
+
- RubyCritic::Reporter
|
51
|
+
- RubyCritic::RevisionComparator
|
52
|
+
- RubyCritic::Serializer
|
53
|
+
- RubyCritic::SmellsStatusSetter
|
54
|
+
- RubyCritic::SourceControlSystem::Base
|
55
|
+
- RubyCritic::SourceControlSystem::Double
|
56
|
+
- RubyCritic::SourceControlSystem::Git
|
57
|
+
- RubyCritic::SourceControlSystem::Mercurial
|
58
|
+
- RubyCritic::SourceLocator
|
59
|
+
- RubyCritic
|
60
60
|
Attribute:
|
61
61
|
exclude:
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
62
|
+
- RubyCritic::Analyser::Churn#source_control_system
|
63
|
+
- RubyCritic::Configuration#deduplicate_symlinks
|
64
|
+
- RubyCritic::Configuration#format
|
65
|
+
- RubyCritic::Configuration#mode
|
66
|
+
- RubyCritic::Configuration#no_browser
|
67
|
+
- RubyCritic::Configuration#open_with
|
68
|
+
- RubyCritic::Configuration#source_control_system
|
69
|
+
- RubyCritic::Configuration#suppress_ratings
|
70
|
+
- RubyCritic::RakeTask#name
|
71
|
+
- RubyCritic::RakeTask#options
|
72
|
+
- RubyCritic::RakeTask#paths
|
73
|
+
- RubyCritic::RakeTask#verbose
|
74
74
|
DuplicateMethodCall:
|
75
75
|
exclude:
|
76
|
-
-
|
76
|
+
- RubyCritic::Analyser::Churn#run
|
77
77
|
- Parser::AST::Node#module_name
|
78
78
|
TooManyStatements:
|
79
79
|
exclude:
|
80
|
-
-
|
81
|
-
-
|
80
|
+
- RubyCritic::RakeTask#initialize
|
81
|
+
- RubyCritic::Analyser::Complexity#run
|
82
82
|
- Parser::AST::Node#get_module_names
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
83
|
+
- RubyCritic::Analyser::FlaySmells#run
|
84
|
+
- RubyCritic::Cli::Application#execute
|
85
|
+
- RubyCritic::Cli::Options#parse
|
86
|
+
- RubyCritic::CommandFactory#self.command_class
|
87
|
+
- RubyCritic::Configuration#set
|
88
|
+
- RubyCritic::Generator::Html::CodeFile#render
|
89
|
+
- RubyCritic::Reporter#self.report_generator_class
|
90
|
+
- RubyCritic::SourceLocator#deduplicate_symlinks
|
91
91
|
FeatureEnvy:
|
92
92
|
exclude:
|
93
93
|
- Parser::AST::Node#module_name
|
94
94
|
- Parser::AST::Node#module_name
|
95
95
|
- Parser::AST::Node#recursive_children
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
96
|
+
- RubyCritic::Analyser::ReekSmells#add_smells_to
|
97
|
+
- RubyCritic::Analyser::ReekSmells#create_smell
|
98
|
+
- RubyCritic::ViewHelpers#smell_location_path
|
99
|
+
- RubyCritic::Generator::HtmlReport#create_directories_and_files
|
100
|
+
- RubyCritic::SourceLocator#deduplicate_symlinks
|
101
101
|
NestedIterators:
|
102
102
|
exclude:
|
103
103
|
- Parser::AST::Node#recursive_children
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
104
|
+
- RubyCritic::Analyser::FlaySmells#run
|
105
|
+
- RubyCritic::Cli::Options#parse
|
106
|
+
- RubyCritic::Generator::HtmlReport#create_directories_and_files
|
107
107
|
UtilityFunction:
|
108
108
|
exclude:
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
109
|
+
- RubyCritic::Analyser::FlaySmells#cost
|
110
|
+
- RubyCritic::Analyser::FlaySmells#paths_to_analysed_modules
|
111
|
+
- RubyCritic::Analyser::FlaySmells#smell_locations
|
112
|
+
- RubyCritic::Analyser::FlogSmells#type
|
113
|
+
- RubyCritic::Analyser::ReekSmells#smell_locations
|
114
|
+
- RubyCritic::Cli::Application#print
|
115
|
+
- RubyCritic::AnalysedModulesCollection#limited_cost_for
|
116
|
+
- RubyCritic::Generator::Html::SmellsIndex#analysed_module_names
|
117
|
+
- RubyCritic::Generator::HtmlReport#copy_assets_to_report_directory
|
118
|
+
- RubyCritic::SourceControlSystem::Git#date_of_last_commit
|
119
|
+
- RubyCritic::SourceControlSystem::Git#head_reference
|
120
|
+
- RubyCritic::SourceControlSystem::Git#revisions_count
|
121
|
+
- RubyCritic::SourceControlSystem::Git#stashes_count
|
122
|
+
- RubyCritic::SourceControlSystem::Mercurial#date_of_last_commit
|
123
|
+
- RubyCritic::SourceControlSystem::Mercurial#revisions_count
|
124
124
|
TooManyInstanceVariables:
|
125
125
|
exclude:
|
126
|
-
-
|
126
|
+
- RubyCritic::Cli::Options
|
127
127
|
ControlParameter:
|
128
128
|
exclude:
|
129
|
-
-
|
129
|
+
- RubyCritic::CommandFactory#self.command_class
|
130
130
|
UncommunicativeParameterName:
|
131
131
|
exclude:
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
132
|
+
- RubyCritic::AnalysedModule#to_json
|
133
|
+
- RubyCritic::Location#to_json
|
134
|
+
- RubyCritic::Rating#to_json
|
135
|
+
- RubyCritic::Smell#to_json
|
136
136
|
ClassVariable:
|
137
137
|
exclude:
|
138
|
-
-
|
138
|
+
- RubyCritic::SourceControlSystem::Base
|
139
|
+
BooleanParameter:
|
140
|
+
exclude:
|
141
|
+
- RubyCritic::Config#self.respond_to_missing?
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -146,7 +146,7 @@ You can use RubyCritic as Rake command in its most simple form like this:
|
|
146
146
|
```ruby
|
147
147
|
require "rubycritic/rake_task"
|
148
148
|
|
149
|
-
|
149
|
+
RubyCritic::RakeTask.new
|
150
150
|
```
|
151
151
|
|
152
152
|
A more sophisticated Rake task that would make use of all available configuration options could look like this:
|
data/Rakefile
CHANGED
data/bin/rubycritic
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Feature: Break if overall score is bellow minimum
|
2
2
|
In order to break the Continuous Integration builds based on a score threshold
|
3
|
-
|
3
|
+
RubyCritic returns the exit status according with the score
|
4
4
|
|
5
5
|
Scenario: Status indicates a success when not using --minimum-score
|
6
6
|
Given the smelly file 'smelly.rb' with a score of 93.75
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Feature:
|
2
|
-
In order to change
|
1
|
+
Feature: RubyCritic can be controlled using command-line options
|
2
|
+
In order to change RubyCritic's default behaviour
|
3
3
|
As a developer
|
4
4
|
I want to supply options on the command line
|
5
5
|
|
data/features/rake_task.feature
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: RubyCritic can be run via Rake task
|
2
2
|
In order to allow for a better CI usage
|
3
3
|
As a developer
|
4
4
|
I want to use RubyCritic as a Rake task
|
@@ -7,7 +7,7 @@ Feature: Rubycritic can be run via Rake task
|
|
7
7
|
Given the smelly file 'smelly.rb'
|
8
8
|
When I run rake rubycritic with:
|
9
9
|
"""
|
10
|
-
|
10
|
+
RubyCritic::RakeTask.new do |t|
|
11
11
|
t.paths = FileList['smelly.*']
|
12
12
|
t.options = '--no-browser -f console'
|
13
13
|
end
|
@@ -22,7 +22,7 @@ Feature: Rubycritic can be run via Rake task
|
|
22
22
|
Given the smelly file 'smelly.rb'
|
23
23
|
When I run rake silky with:
|
24
24
|
"""
|
25
|
-
|
25
|
+
RubyCritic::RakeTask.new('silky') do |t|
|
26
26
|
t.paths = FileList['smelly.*']
|
27
27
|
t.verbose = true
|
28
28
|
t.options = '--no-browser'
|
@@ -37,7 +37,7 @@ Feature: Rubycritic can be run via Rake task
|
|
37
37
|
Given the smelly file 'smelly.rb'
|
38
38
|
When I run rake rubycritic with:
|
39
39
|
"""
|
40
|
-
|
40
|
+
RubyCritic::RakeTask.new do |t|
|
41
41
|
t.paths = FileList['smelly.*']
|
42
42
|
t.verbose = true
|
43
43
|
t.options = '--no-browser'
|
@@ -53,7 +53,7 @@ Feature: Rubycritic can be run via Rake task
|
|
53
53
|
Given the smelly file 'smelly.rb'
|
54
54
|
When I run rake rubycritic with:
|
55
55
|
"""
|
56
|
-
|
56
|
+
RubyCritic::RakeTask.new do |t|
|
57
57
|
t.paths = FileList['smelly.*']
|
58
58
|
t.verbose = true
|
59
59
|
t.options = '--no-browser -f console --minimum-score 95'
|
@@ -3,11 +3,11 @@ When(/^I run rubycritic (.*)$/) do |args|
|
|
3
3
|
end
|
4
4
|
|
5
5
|
Then(/^the exit status indicates an error$/) do
|
6
|
-
expect(last_command_started).to have_exit_status(
|
6
|
+
expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SCORE_BELOW_MINIMUM)
|
7
7
|
end
|
8
8
|
|
9
9
|
Then(/^the exit status indicates a success$/) do
|
10
|
-
expect(last_command_started).to have_exit_status(
|
10
|
+
expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SUCCESS)
|
11
11
|
end
|
12
12
|
|
13
13
|
Then(/^it reports:$/) do |report|
|
@@ -19,7 +19,7 @@ Then(/^there is no output on stdout$/) do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
Then(/^it reports the current version$/) do
|
22
|
-
expect(last_command_started).to have_output("RubyCritic #{
|
22
|
+
expect(last_command_started).to have_output("RubyCritic #{RubyCritic::VERSION}\n")
|
23
23
|
end
|
24
24
|
|
25
25
|
Then(/^it reports the error ['"](.*)['"]$/) do |string|
|
@@ -27,5 +27,5 @@ Then(/^it reports the error ['"](.*)['"]$/) do |string|
|
|
27
27
|
end
|
28
28
|
|
29
29
|
Then(/^it succeeds$/) do
|
30
|
-
expect(last_command_started).to have_exit_status(
|
30
|
+
expect(last_command_started).to have_exit_status(RubyCritic::Command::StatusReporter::SUCCESS)
|
31
31
|
end
|
data/features/support/env.rb
CHANGED
@@ -7,7 +7,7 @@ require 'minitest/spec'
|
|
7
7
|
#
|
8
8
|
# Provides runner methods used in the cucumber steps.
|
9
9
|
#
|
10
|
-
class
|
10
|
+
class RubyCriticWorld
|
11
11
|
extend MiniTest::Assertions
|
12
12
|
attr_accessor :assertions
|
13
13
|
|
@@ -31,7 +31,7 @@ class RubycriticWorld
|
|
31
31
|
end
|
32
32
|
|
33
33
|
World do
|
34
|
-
|
34
|
+
RubyCriticWorld.new
|
35
35
|
end
|
36
36
|
|
37
37
|
Before do
|
data/lib/rubycritic/browser.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rubycritic'
|
|
2
2
|
require 'rubycritic/cli/options'
|
3
3
|
require 'rubycritic/command_factory'
|
4
4
|
|
5
|
-
module
|
5
|
+
module RubyCritic
|
6
6
|
module Cli
|
7
7
|
class Application
|
8
8
|
STATUS_SUCCESS = 0
|
@@ -15,7 +15,7 @@ module Rubycritic
|
|
15
15
|
def execute
|
16
16
|
parsed_options = @options.parse
|
17
17
|
|
18
|
-
reporter =
|
18
|
+
reporter = RubyCritic::CommandFactory.create(parsed_options.to_h).execute
|
19
19
|
print(reporter.status_message)
|
20
20
|
reporter.status
|
21
21
|
rescue OptionParser::InvalidOption => error
|
data/lib/rubycritic/colorize.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'rubycritic/commands/status_reporter'
|
2
2
|
|
3
|
-
module
|
3
|
+
module RubyCritic
|
4
4
|
module Command
|
5
5
|
class Base
|
6
6
|
def initialize(options)
|
7
7
|
@options = options
|
8
|
-
@status_reporter =
|
8
|
+
@status_reporter = RubyCritic::Command::StatusReporter.new(@options)
|
9
9
|
end
|
10
10
|
|
11
11
|
def execute
|