fontist 3.0.4 → 3.0.5
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/fontist/manifest.rb +2 -29
- data/lib/fontist/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0403ccfbfdac1ce2d3b3be90872600c857101d498017d0849903a0e0231b2af
|
|
4
|
+
data.tar.gz: d16c6f71f7182a054f7600beb77e58c41bf726e813d6b893e3f605a33bb462d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48d21df850f6e0f4f6fb1a89536ae78d392f9421e2e95593b73636448a67b106055ad9c5aefc0152659a8460f5a9a4be4fdecd12acdce869cc30e56211115246
|
|
7
|
+
data.tar.gz: 667f24398403d0e295c188f4bc200dc42a6b6da419cc39c9e4e621a766dc230e450764b1b7836bae1eb13ce50cd25c298b3e89084f2ae3a83d4c9a9b5820078a
|
data/lib/fontist/manifest.rb
CHANGED
|
@@ -33,15 +33,9 @@ module Fontist
|
|
|
33
33
|
def style_paths(locations: false)
|
|
34
34
|
ary = Array(styles)
|
|
35
35
|
(ary.empty? ? [nil] : ary).flat_map do |style|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if paths.nil? && locations
|
|
39
|
-
try_install_missing_font
|
|
40
|
-
paths = find_font_with_name(name, style)
|
|
41
|
-
raise Errors::MissingFontError.new(name, style) if paths.nil?
|
|
36
|
+
find_font_with_name(name, style).tap do |x|
|
|
37
|
+
raise Errors::MissingFontError.new(name, style) if x.nil? && locations
|
|
42
38
|
end
|
|
43
|
-
|
|
44
|
-
paths
|
|
45
39
|
end.compact
|
|
46
40
|
end
|
|
47
41
|
|
|
@@ -102,27 +96,6 @@ module Fontist
|
|
|
102
96
|
|
|
103
97
|
private
|
|
104
98
|
|
|
105
|
-
def try_install_missing_font
|
|
106
|
-
Fontist.ui.debug("self-healing install attempt for #{name.inspect}")
|
|
107
|
-
Fontist::Font.install(
|
|
108
|
-
name,
|
|
109
|
-
force: true,
|
|
110
|
-
confirmation: "no",
|
|
111
|
-
no_progress: true,
|
|
112
|
-
hide_licenses: true,
|
|
113
|
-
format_spec: format_spec,
|
|
114
|
-
)
|
|
115
|
-
rescue Fontist::Errors::FontError,
|
|
116
|
-
Fontist::Errors::LicensingError,
|
|
117
|
-
Fontist::Errors::PlatformMismatchError,
|
|
118
|
-
Fontist::Errors::FormulaIndexNotFoundError => e
|
|
119
|
-
Fontist.ui.debug(
|
|
120
|
-
"self-healing install for #{name.inspect} " \
|
|
121
|
-
"failed: #{e.class}: #{e.message}",
|
|
122
|
-
)
|
|
123
|
-
nil
|
|
124
|
-
end
|
|
125
|
-
|
|
126
99
|
def validate_location_parameter!(location)
|
|
127
100
|
return unless location
|
|
128
101
|
return if location.is_a?(Symbol)
|
data/lib/fontist/version.rb
CHANGED