feature_map 1.2.3 → 1.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b56fb3fcd3da34a3f15aa1a15714c37287c2dc9117ceb02a5df849ba076e9376
4
- data.tar.gz: 644e0c180a214481117b8d612f6dc400ae8a5eda7bbe171061f03bc1ddb73a95
3
+ metadata.gz: '097b75ea1f00eafc127a2e43452ae185b1e3682d209c39ec96ab07c3ef75fe20'
4
+ data.tar.gz: eefa91bf65f4c9abcbddc8924bc80597596522f9d9a489ff60d02ed21a7ab77e
5
5
  SHA512:
6
- metadata.gz: b900d2781d2374618d966655f0292cb0568e1b707a1c38b41a80d8396bd31b0e95663371b6471391bd7680f6782762f1dfeb0f05c7752fcd2b25f927dd0b1795
7
- data.tar.gz: 5d47dd3e2f2250d84cfc05ccc6944c85ca390530ce3fb147569dfabe9c83cd526ee8cbb74c3ef17716a29c9f1968b9cc5d9a58fd99715b5eb7aa25df59e242cb
6
+ metadata.gz: 3ae23faf8405ea7436cdd10cc20c08673bff4447997eef2849ba3e2261c9edf50be6715ccbe0829adfe099fd91c7f18e829d29dd11aefe8238ee5bc126fa55a2
7
+ data.tar.gz: 43c0a7372afa58dbb1bc301f2331ef9f6fe51d466d90e9223953ee7050548251ad6512dd7e62b5d41fe266280e6d1d02735651a468bb10db76bab208eaaeaab3
@@ -39,7 +39,9 @@ module FeatureMap
39
39
 
40
40
  def self.calculate_for_file(file_path)
41
41
  metrics = {
42
- LINES_OF_CODE_METRIC => LinesOfCodeCalculator.new(file_path).calculate
42
+ LINES_OF_CODE_METRIC => LinesOfCodeCalculator.new(file_path).calculate,
43
+ TODO_LOCATIONS_METRIC => TodoInspector.new(file_path).calculate
44
+
43
45
  }
44
46
 
45
47
  return metrics unless file_path.end_with?('.rb')
@@ -55,12 +57,10 @@ module FeatureMap
55
57
  # make right now.
56
58
  abc_calculator = RuboCop::Cop::Metrics::Utils::AbcSizeCalculator.new(source.ast)
57
59
  cyclomatic_calculator = CyclomaticComplexityCalculator.new(source.ast)
58
- todo_locations = TodoInspector.new(file_path).calculate
59
60
 
60
61
  metrics.merge(
61
62
  ABC_SIZE_METRIC => abc_calculator.calculate.first.round(2),
62
- CYCLOMATIC_COMPLEXITY_METRIC => cyclomatic_calculator.calculate,
63
- TODO_LOCATIONS_METRIC => todo_locations
63
+ CYCLOMATIC_COMPLEXITY_METRIC => cyclomatic_calculator.calculate
64
64
  )
65
65
  end
66
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beyond Finance