feature_map 1.1.0 → 1.1.1
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/README.md +1 -1
- data/lib/feature_map/cli.rb +34 -4
- data/lib/feature_map/private/assignment_applicator.rb +112 -0
- data/lib/feature_map/private/docs/index.html +88 -85
- data/lib/feature_map/private.rb +9 -0
- data/lib/feature_map.rb +5 -0
- metadata +3 -2
data/lib/feature_map/private.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
# typed: strict
|
4
4
|
|
5
|
+
require 'csv'
|
6
|
+
|
5
7
|
require 'feature_map/constants'
|
6
8
|
require 'feature_map/private/extension_loader'
|
7
9
|
require 'feature_map/private/cyclomatic_complexity_calculator'
|
@@ -9,6 +11,7 @@ require 'feature_map/private/lines_of_code_calculator'
|
|
9
11
|
require 'feature_map/private/todo_inspector'
|
10
12
|
require 'feature_map/private/feature_metrics_calculator'
|
11
13
|
require 'feature_map/private/assignments_file'
|
14
|
+
require 'feature_map/private/assignment_applicator'
|
12
15
|
require 'feature_map/private/metrics_file'
|
13
16
|
require 'feature_map/private/glob_cache'
|
14
17
|
require 'feature_map/private/feature_assigner'
|
@@ -38,6 +41,12 @@ module FeatureMap
|
|
38
41
|
]
|
39
42
|
end
|
40
43
|
|
44
|
+
sig { params(assignments_file_path: String).void }
|
45
|
+
def self.apply_assignments!(assignments_file_path)
|
46
|
+
assignments = CSV.read(assignments_file_path)
|
47
|
+
AssignmentApplicator.apply_assignments!(assignments)
|
48
|
+
end
|
49
|
+
|
41
50
|
sig { returns(Configuration) }
|
42
51
|
def self.configuration
|
43
52
|
@configuration ||= T.let(@configuration, T.nilable(Configuration))
|
data/lib/feature_map.rb
CHANGED
@@ -22,6 +22,11 @@ module FeatureMap
|
|
22
22
|
requires_ancestor { Kernel }
|
23
23
|
GlobsToAssignedFeatureMap = T.type_alias { T::Hash[String, CodeFeatures::Feature] }
|
24
24
|
|
25
|
+
sig { params(assignments_file_path: String).void }
|
26
|
+
def apply_assignments!(assignments_file_path)
|
27
|
+
Private.apply_assignments!(assignments_file_path)
|
28
|
+
end
|
29
|
+
|
25
30
|
sig { params(file: String).returns(T.nilable(CodeFeatures::Feature)) }
|
26
31
|
def for_file(file)
|
27
32
|
@for_file ||= T.let(@for_file, T.nilable(T::Hash[String, T.nilable(CodeFeatures::Feature)]))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feature_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beyond Finance
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_ownership
|
@@ -200,6 +200,7 @@ files:
|
|
200
200
|
- lib/feature_map/mapper.rb
|
201
201
|
- lib/feature_map/output_color.rb
|
202
202
|
- lib/feature_map/private.rb
|
203
|
+
- lib/feature_map/private/assignment_applicator.rb
|
203
204
|
- lib/feature_map/private/assignment_mappers/directory_assignment.rb
|
204
205
|
- lib/feature_map/private/assignment_mappers/feature_definition_assignment.rb
|
205
206
|
- lib/feature_map/private/assignment_mappers/feature_globs.rb
|