primer_view_components 0.0.29 → 0.0.30
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/CHANGELOG.md +6 -0
- data/app/lib/primer/classify/functional_colors.rb +8 -6
- data/lib/primer/view_components/version.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: 6a17e4735cb2057fb6c76458ff5cfdd4b833aeb4f6a7de14c4e6fbc3a556e010
|
4
|
+
data.tar.gz: 7677caa7f8f052b51d983eb8581e198f7daff976c3793015b811c9edf48ed891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600e505c9cdcc74243127140de5b5f5a6ff634ba6946d653f3473982b2affc2f343c78bc9f9d8913165b15f2986a9ffe16b174c694e8943f041c9b58814a04ae
|
7
|
+
data.tar.gz: 25828e4691fed95aa5b9eb8401ecdbea09d6248f5ee7521402fbf9c84bb81f542df5108c785270496604ce48f0d086d964271ff2f12662aebbbced19fa364509
|
data/CHANGELOG.md
CHANGED
@@ -29,16 +29,18 @@ module Primer
|
|
29
29
|
functional_options:,
|
30
30
|
options_without_mappigs: []
|
31
31
|
)
|
32
|
+
sym_value = value.to_sym
|
33
|
+
dasherized_value = value.to_s.dasherize
|
32
34
|
# the value is a functional color
|
33
|
-
return "#{number_prefix}-#{
|
34
|
-
return "#{functional_prefix}-#{
|
35
|
+
return "#{number_prefix}-#{dasherized_value}" if ends_with_number?(sym_value)
|
36
|
+
return "#{functional_prefix}-#{dasherized_value}" if functional_options.include?(sym_value)
|
35
37
|
# if the app still allows non functional colors
|
36
|
-
return "#{non_functional_prefix}-#{
|
38
|
+
return "#{non_functional_prefix}-#{dasherized_value}" unless force_functional_colors?
|
37
39
|
|
38
|
-
if mappings.key?(
|
39
|
-
functional_color = mappings[
|
40
|
+
if mappings.key?(sym_value) || options_without_mappigs.include?(sym_value)
|
41
|
+
functional_color = mappings[sym_value]
|
40
42
|
# colors without functional mapping stay the same
|
41
|
-
return "#{non_functional_prefix}-#{
|
43
|
+
return "#{non_functional_prefix}-#{dasherized_value}" if functional_color.blank?
|
42
44
|
|
43
45
|
ActiveSupport::Deprecation.warn("#{key} #{value} is deprecated. Please use #{functional_color} instead.") unless Rails.env.production? || silence_deprecations?
|
44
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octicons_helper
|