fontist 1.11.6 → 1.11.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebc9110896000190889a313f291012ebc3b84a7296230398ee61c9822c44ea87
4
- data.tar.gz: 9de28427a3a46124e8ded2880de764ad9bb632bc9c919babe15123fc38eebdb3
3
+ metadata.gz: d3a779a1f127060501e1c69c59986bcd1a616ab699c5cff439cec4aafc27a0a2
4
+ data.tar.gz: cbcfe4d0a06ccfbcb309b2c59aac6a58ce09d804c6b23cec5970a6d67b697d43
5
5
  SHA512:
6
- metadata.gz: 005c1c9a434bbfa11da8602be4180e20056798afccf4c302204e6d986c6a288d7ee6cbfb387c597db79fe4ae86e50aa22729d4553813b7f025d27a1033c83f19
7
- data.tar.gz: 8584ca32768a87ce2ddfd95275e6f22a9b61074df2db8b407f587931cc2729b444dd257f6435fd564bd0588a2bcf5d6e2634f611cf73a87d76ec517a86de4edf
6
+ metadata.gz: d17e2fa944c7ddfd142869d1db9df35fae4ae7aa58c6188290529d31be66b9043e300b0cff2e4cb13545fb1bbdc707820fa4c88f557c914cb59ad4b7a1fef46f
7
+ data.tar.gz: 98db0b18012107e2a39644d9c892a7ef5330543526da993f1b346300bba2bcefa02b2b17ff417a716f7e6f3e84d0b7589eda24d4b154366a290010bbe8f9ad0a
@@ -33,7 +33,15 @@ jobs:
33
33
  env:
34
34
  TEST_ENV: CI
35
35
 
36
- - if: matrix.os != 'macos-latest'
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
- Fontist::Formula.all.map(&:fonts).flatten
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 ||= Fontist::Formula.find(name)
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)
@@ -91,6 +91,10 @@ module Fontist
91
91
  @data["requires_license_agreement"] ? true : false
92
92
  end
93
93
 
94
+ def platforms
95
+ @data["platforms"]
96
+ end
97
+
94
98
  def extract
95
99
  Helpers.parse_to_object(@data["extract"])
96
100
  end
@@ -30,7 +30,14 @@ module Fontist
30
30
  depth: 1)
31
31
  end
32
32
 
33
- git = Git.open(Fontist.formulas_repo_path)
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",
@@ -1,3 +1,3 @@
1
1
  module Fontist
2
- VERSION = "1.11.6".freeze
2
+ VERSION = "1.11.7".freeze
3
3
  end
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.6
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-09-28 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down