fontist 1.11.6 → 1.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +9 -1
- data/lib/fontist/font.rb +9 -3
- data/lib/fontist/formula.rb +4 -0
- data/lib/fontist/update.rb +8 -1
- data/lib/fontist/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: d3a779a1f127060501e1c69c59986bcd1a616ab699c5cff439cec4aafc27a0a2
|
4
|
+
data.tar.gz: cbcfe4d0a06ccfbcb309b2c59aac6a58ce09d804c6b23cec5970a6d67b697d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17e2fa944c7ddfd142869d1db9df35fae4ae7aa58c6188290529d31be66b9043e300b0cff2e4cb13545fb1bbdc707820fa4c88f557c914cb59ad4b7a1fef46f
|
7
|
+
data.tar.gz: 98db0b18012107e2a39644d9c892a7ef5330543526da993f1b346300bba2bcefa02b2b17ff417a716f7e6f3e84d0b7589eda24d4b154366a290010bbe8f9ad0a
|
data/.github/workflows/rspec.yml
CHANGED
@@ -33,7 +33,15 @@ jobs:
|
|
33
33
|
env:
|
34
34
|
TEST_ENV: CI
|
35
35
|
|
36
|
-
- if: matrix.os
|
36
|
+
- if: matrix.os == 'windows-latest' && matrix.ruby == '2.4'
|
37
|
+
run: curl -O https://curl.se/ca/cacert.pem
|
38
|
+
|
39
|
+
- if: matrix.os == 'windows-latest' && matrix.ruby == '2.4'
|
40
|
+
run: bundle exec rspec --tag ~dev
|
41
|
+
env:
|
42
|
+
SSL_CERT_FILE: cacert.pem
|
43
|
+
|
44
|
+
- if: matrix.os != 'macos-latest' || matrix.os == 'windows-latest' && matrix.ruby == '2.4'
|
37
45
|
run: bundle exec rspec --tag ~dev
|
38
46
|
env:
|
39
47
|
TEST_ENV: CI
|
data/lib/fontist/font.rb
CHANGED
@@ -62,7 +62,7 @@ module Fontist
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def all
|
65
|
-
|
65
|
+
all_formulas.map(&:fonts).flatten
|
66
66
|
end
|
67
67
|
|
68
68
|
private
|
@@ -99,11 +99,17 @@ module Fontist
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def formula
|
102
|
-
@formula ||=
|
102
|
+
@formula ||= formulas.first
|
103
103
|
end
|
104
104
|
|
105
105
|
def formulas
|
106
106
|
@formulas ||= Fontist::Formula.find_many(name)
|
107
|
+
.select { |f| supported_formula?(f) }
|
108
|
+
end
|
109
|
+
|
110
|
+
def supported_formula?(formula)
|
111
|
+
formula.platforms.nil? ||
|
112
|
+
formula.platforms.include?(Fontist::Utils::System.user_os.to_s)
|
107
113
|
end
|
108
114
|
|
109
115
|
def downloadable_font
|
@@ -190,7 +196,7 @@ module Fontist
|
|
190
196
|
end
|
191
197
|
|
192
198
|
def all_formulas
|
193
|
-
Fontist::Formula.all
|
199
|
+
Fontist::Formula.all.select { |f| supported_formula?(f) }
|
194
200
|
end
|
195
201
|
|
196
202
|
def path(style)
|
data/lib/fontist/formula.rb
CHANGED
data/lib/fontist/update.rb
CHANGED
@@ -30,7 +30,14 @@ module Fontist
|
|
30
30
|
depth: 1)
|
31
31
|
end
|
32
32
|
|
33
|
-
git =
|
33
|
+
git = if Dir.exist?(Fontist.formulas_repo_path.join(".git"))
|
34
|
+
Git.open(Fontist.formulas_repo_path)
|
35
|
+
else
|
36
|
+
Git.init(Fontist.formulas_repo_path.to_s).tap do |g|
|
37
|
+
g.add_remote("origin", Fontist.formulas_repo_url)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
34
41
|
return git.pull("origin", @branch) if git.current_branch == @branch
|
35
42
|
|
36
43
|
git.config("remote.origin.fetch",
|
data/lib/fontist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: down
|