feature_map 1.2.6 → 1.2.8
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/code_features.rb +10 -0
- data/lib/feature_map/private/assignment_mappers/feature_definition_assignment.rb +1 -1
- data/lib/feature_map/private/assignment_mappers/feature_globs.rb +1 -1
- data/lib/feature_map/private/docs/index.html +71 -80
- data/lib/feature_map/private/documentation_site.rb +1 -0
- data/lib/feature_map/private/validations/files_have_features.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: addbdad7d39c22b44452e84d3217e810dcb4e9bbfa1c5676ea0872e3606c69d5
|
4
|
+
data.tar.gz: c85b5d1e30bb11194b74c97a05b432141ab815f28b07e09791f4dec3853fd656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e0e106c8073cfa12cd8b92f8c7b9b982e57d66b12ee728662434afba3e17be0cd8ab4de665522187a5589ac6b144a29ead74da596419ea615dcf923fec409a0
|
7
|
+
data.tar.gz: 6b15a1b7d543ef3212c61720f84220597d0f78140722121afb668eca5150198bb7fd3cad6dec153665637594babc0a5a9c58b60f924b4dde1fbc55f6f46c070d
|
@@ -73,6 +73,9 @@ module FeatureMap
|
|
73
73
|
end
|
74
74
|
|
75
75
|
class Feature
|
76
|
+
LABEL_PREFIX = 'Feature '
|
77
|
+
LABEL_LIMIT = 50
|
78
|
+
|
76
79
|
def self.from_yml(config_yml)
|
77
80
|
hash = YAML.load_file(config_yml)
|
78
81
|
|
@@ -101,6 +104,13 @@ module FeatureMap
|
|
101
104
|
Plugins::Identity.for(self).identity.name
|
102
105
|
end
|
103
106
|
|
107
|
+
def label
|
108
|
+
# NOTE: Certain uses of feature labels have character
|
109
|
+
# limits. This allows us to stay comfortably within
|
110
|
+
# most without overly complex configuration.
|
111
|
+
"#{LABEL_PREFIX}#{name}"[0...LABEL_LIMIT]
|
112
|
+
end
|
113
|
+
|
104
114
|
def to_tag
|
105
115
|
CodeFeatures.tag_value_for(name)
|
106
116
|
end
|
@@ -10,7 +10,7 @@ module FeatureMap
|
|
10
10
|
@@map_files_to_features = {} # rubocop:disable Style/ClassVars
|
11
11
|
|
12
12
|
def map_files_to_features(files)
|
13
|
-
return @@map_files_to_features if @@map_files_to_features&.
|
13
|
+
return @@map_files_to_features if @@map_files_to_features&.any?
|
14
14
|
|
15
15
|
@@map_files_to_features = CodeFeatures.all.each_with_object({}) do |feature, map| # rubocop:disable Style/ClassVars
|
16
16
|
# NOTE: The FeatureDefinitionAssignment naively assumes that all
|
@@ -11,7 +11,7 @@ module FeatureMap
|
|
11
11
|
@@map_files_to_features = {} # rubocop:disable Style/ClassVars
|
12
12
|
|
13
13
|
def map_files_to_features(files)
|
14
|
-
return @@map_files_to_features if @@map_files_to_features&.
|
14
|
+
return @@map_files_to_features if @@map_files_to_features&.any?
|
15
15
|
|
16
16
|
@@map_files_to_features = FeatureMap::CodeFeatures.all.each_with_object({}) do |feature, map| # rubocop:disable Style/ClassVars
|
17
17
|
FeaturePlugins::Assignment.for(feature).assigned_globs.each do |glob|
|