feature_map 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/feature_map/private/assignment_mappers/directory_assignment.rb +4 -4
- data/lib/feature_map/private/cyclomatic_complexity_calculator.rb +4 -2
- data/lib/feature_map/private/docs/index.html +96 -87
- data/lib/feature_map/private/feature_metrics_calculator.rb +4 -1
- data/lib/feature_map/private/lines_of_code_calculator.rb +0 -2
- data/lib/feature_map.rb +0 -1
- metadata +17 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43f73244677d8ad52995b906e493ca43dfcef13e02d4a13809035c4a5d66f014
|
|
4
|
+
data.tar.gz: 5c70b9958b9c9395bccffb131b99c28e8ce4da44e44952023d437a058bc838d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3adfa483a5177ab7278a550f6c61e52d6843738d56ca827253f2113e0b41a4441f81f65a0af5392debffded48e60bc931e6b3e3102a8e8adfe5c008b35b313f5
|
|
7
|
+
data.tar.gz: 0af4417ca1f681c9d81b26b63ced53a0e04da8585c8369bd2c5e28e3a9e79fd0ab5d8e8f3182f329b66b0d9fcc52f0f8a7ccaccf21cacf13569a10abf15d2600
|
|
@@ -31,10 +31,10 @@ module FeatureMap
|
|
|
31
31
|
.glob(File.join('**/', FEATURE_DIRECTORY_ASSIGNMENT_FILE_NAME))
|
|
32
32
|
.map(&:cleanpath)
|
|
33
33
|
.each_with_object({}) do |pathname, res|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
feature = feature_for_directory_assignment_file(pathname)
|
|
35
|
+
glob = glob_for_directory_assignment_file(pathname)
|
|
36
|
+
res[glob] = feature
|
|
37
|
+
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def description
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @feature Metrics Calculation
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
require 'parser/current'
|
|
5
|
-
|
|
6
4
|
module FeatureMap
|
|
7
5
|
module Private
|
|
8
6
|
class CyclomaticComplexityCalculator
|
|
@@ -17,6 +15,10 @@ module FeatureMap
|
|
|
17
15
|
end
|
|
18
16
|
|
|
19
17
|
def calculate
|
|
18
|
+
# Lazy load the parser gem only when we need to process AST nodes to avoid introducing unnecessary
|
|
19
|
+
# dependencies for use cases that do not exercise this functionality.
|
|
20
|
+
require 'parser/current'
|
|
21
|
+
|
|
20
22
|
process(@ast)
|
|
21
23
|
@complexity
|
|
22
24
|
end
|