rubycritic 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cadbe30732bfef380e3d5c275bff418ca9cd43e
|
4
|
+
data.tar.gz: 9cbd00db54cdd293eece8d0623162f39fd800f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c1572d4af36f34a8036b956ac04180dc13d52ae200000235edcaf97750fd2bca08bb1329525e7b3d81822254be1289413777a0f575e2b412672f1af93caa2e8
|
7
|
+
data.tar.gz: 00699f036ae23d4f3219cc0aa605b7a47d87d19c9bd3c10350c3020018ac23af4354f61de9ca620668a775417834bc07df817ab6b1a61107ed035289990437c3
|
data/lib/rubycritic/cli.rb
CHANGED
@@ -21,6 +21,7 @@ module Rubycritic
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
FileUtils.cp_r(ASSETS_DIR, BaseGenerator::REPORT_DIR)
|
24
|
+
index_generator.file_href
|
24
25
|
end
|
25
26
|
|
26
27
|
private
|
@@ -30,7 +31,7 @@ module Rubycritic
|
|
30
31
|
end
|
31
32
|
|
32
33
|
def index_generator
|
33
|
-
IndexGenerator.new(file_generators)
|
34
|
+
@index_generator ||= IndexGenerator.new(file_generators)
|
34
35
|
end
|
35
36
|
|
36
37
|
def file_generators
|
data/lib/rubycritic/version.rb
CHANGED
data/lib/rubycritic.rb
CHANGED
@@ -8,19 +8,19 @@ require "rubycritic/report_generators/reporter"
|
|
8
8
|
module Rubycritic
|
9
9
|
|
10
10
|
class Rubycritic
|
11
|
-
def initialize
|
12
|
-
@source = SourceLocator.new(dirs)
|
11
|
+
def initialize
|
13
12
|
@source_control_system = SourceControlSystem.create
|
14
13
|
end
|
15
14
|
|
16
|
-
def critique
|
15
|
+
def critique(dirs)
|
16
|
+
source = SourceLocator.new(dirs)
|
17
17
|
if @source_control_system.has_revision?
|
18
|
-
smelly_pathnames = RevisionComparator.new(
|
18
|
+
smelly_pathnames = RevisionComparator.new(source.paths, @source_control_system).compare
|
19
19
|
else
|
20
|
-
smell_adapters = AnalysersRunner.new(
|
20
|
+
smell_adapters = AnalysersRunner.new(source.paths).run
|
21
21
|
smelly_pathnames = SmellsAggregator.new(smell_adapters).smelly_pathnames
|
22
22
|
end
|
23
|
-
Reporter.new(
|
23
|
+
Reporter.new(source.pathnames, smelly_pathnames).generate_report
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|