fontist 1.14.1 → 1.14.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc5e7576ced5478fb9dc9752a5aa7f514491f112d5bb66b12f86f82b3d8a2f99
4
- data.tar.gz: 123b39db27bb75fcbd120caae26adb60a7f9f39e9eabd06613ee50c98adde004
3
+ metadata.gz: dd2e6dd82f23ca6c5bf67e6895708ad8be3a602ba493409af7f41359301fd9ae
4
+ data.tar.gz: 855891bb717b439c1b8d9a39b10b91a7e9cc83f332200dd63500c04348612e81
5
5
  SHA512:
6
- metadata.gz: '08091fefee390b3b349d6f7ccd7ac7bb921274c778f91452e05d19f56eac0399604db310aba1ea59fcfa7eafb1c1945aaa6d5454c1141850a7931fa6c44fd9b2'
7
- data.tar.gz: d086b630b7d5e32435215d2498b023a3de3238f69c143436e09d0112860c14112167e9dcaa11e8fc1870affb5b63a53b46b9d5a236d00394ec7eeeb6b587e8af
6
+ metadata.gz: bb012711692ab655f43808d965ad082532564e3a24b693c7bc5343934834cba92a9ea524725a0f71e6dc433a71e65e4c53872ddaddb24db20fbea7dfe3dbe72b
7
+ data.tar.gz: f189421d98cc7c3ecb6eab190e60237b2486e34dfdb5492881ed418ae43a8d317148161847235fe9c9cd6f9a0bda97514fe9234a7ebf0e68825810106a7b4789
@@ -5,6 +5,10 @@ on:
5
5
  branches: [ main ]
6
6
  pull_request:
7
7
 
8
+ concurrency:
9
+ group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
10
+ cancel-in-progress: true
11
+
8
12
  jobs:
9
13
  test:
10
14
  name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
@@ -13,11 +17,11 @@ jobs:
13
17
  strategy:
14
18
  fail-fast: false
15
19
  matrix:
16
- ruby: [ '2.6', '2.7', '3.0' ]
20
+ ruby: [ '2.7', '3.0', '3.1' ]
17
21
  os: [ ubuntu-latest, windows-latest, macos-latest ]
18
22
  experimental: [ true ]
19
23
  steps:
20
- - uses: actions/checkout@master
24
+ - uses: actions/checkout@v3
21
25
  with:
22
26
  repository: metanorma/metanorma
23
27
 
@@ -27,7 +31,15 @@ jobs:
27
31
 
28
32
  - run: 'echo ''gem "fontist", path: "./fontist"'' > Gemfile.devel'
29
33
 
30
- - uses: ruby/setup-ruby@v1
34
+ - if: matrix.ruby == '3.0'
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+ rubygems: latest
40
+
41
+ - if: matrix.ruby != '3.0'
42
+ uses: ruby/setup-ruby@v1
31
43
  with:
32
44
  ruby-version: ${{ matrix.ruby }}
33
45
  bundler-cache: true
@@ -1,24 +1,28 @@
1
- name: rspec
1
+ name: test-and-release
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches: [ main ]
6
+ tags: [ 'v*' ]
6
7
  pull_request:
7
8
 
9
+ concurrency:
10
+ group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
11
+ cancel-in-progress: true
12
+
8
13
  jobs:
9
- build:
14
+ test:
10
15
  name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
11
16
  runs-on: ${{ matrix.os }}
12
- continue-on-error: ${{ matrix.experimental }}
17
+ continue-on-error: false
13
18
  strategy:
14
19
  fail-fast: false
15
20
  matrix:
16
- ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
21
+ ruby: [ '2.6', '2.7', '3.0', '3.1' ]
17
22
  os: [ ubuntu-18.04, ubuntu-latest, windows-latest, macos-latest ]
18
- experimental: [ false ]
19
23
 
20
24
  steps:
21
- - uses: actions/checkout@master
25
+ - uses: actions/checkout@v3
22
26
 
23
27
  - uses: ruby/setup-ruby@v1
24
28
  with:
@@ -33,15 +37,19 @@ jobs:
33
37
  env:
34
38
  TEST_ENV: CI
35
39
 
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
+ - if: matrix.os != 'macos-latest'
40
41
  run: bundle exec rspec --tag ~dev
41
42
  env:
42
- SSL_CERT_FILE: cacert.pem
43
+ TEST_ENV: CI
43
44
 
44
- - if: matrix.os != 'macos-latest' || matrix.os == 'windows-latest' && matrix.ruby == '2.4'
45
- run: bundle exec rspec --tag ~dev
45
+ release:
46
+ name: Release gem
47
+ needs: test
48
+ runs-on: ubuntu-latest
49
+ if: contains(github.ref, 'refs/tags/v')
50
+ steps:
51
+ - uses: actions/checkout@v3
52
+
53
+ - uses: cadwallion/publish-rubygems-action@master
46
54
  env:
47
- TEST_ENV: CI
55
+ RUBYGEMS_API_KEY: ${{secrets.FONTIST_CI_RUBYGEMS_API_KEY}}
data/.gitignore CHANGED
@@ -20,3 +20,6 @@ Gemfile.lock
20
20
 
21
21
  # remote file cache
22
22
  .rubocop-*
23
+
24
+ # VS Code
25
+ .vscode
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Fontist
2
2
 
3
- image:https://github.com/fontist/fontist/actions/workflows/rspec.yml/badge.svg["Build Status", link="https://github.com/fontist/fontist/actions/workflows/rspec.yml"]
3
+ image:https://github.com/fontist/fontist/actions/workflows/test-and-release.yml/badge.svg["Build Status", link="https://github.com/fontist/fontist/actions/workflows/test-and-release.yml"]
4
4
  image:https://img.shields.io/gem/v/fontist.svg["Gem Version", link="https://rubygems.org/gems/fontist"]
5
5
  image:https://img.shields.io/github/issues-pr-raw/fontist/fontist.svg["Pull Requests", link="https://github.com/fontist/fontist/pulls"]
6
6
 
data/fontist.gemspec CHANGED
@@ -36,17 +36,15 @@ Gem::Specification.new do |spec|
36
36
  spec.add_runtime_dependency "git", "~> 1.0"
37
37
  spec.add_runtime_dependency "ttfunk", "~> 1.6"
38
38
  spec.add_runtime_dependency "plist", "~> 3.0"
39
- spec.add_runtime_dependency "excavate", "~> 0.1"
39
+ spec.add_runtime_dependency "excavate", "~> 0.3.1"
40
+ spec.add_runtime_dependency "socksify", "~> 1.7"
40
41
 
41
- spec.add_development_dependency "pry"
42
+ spec.add_development_dependency "pry", "~> 0.14"
42
43
  spec.add_development_dependency "bundler", "~> 2.0"
43
- spec.add_development_dependency "gem-release"
44
44
  spec.add_development_dependency "rake", "~> 13"
45
45
  spec.add_development_dependency "rspec", "~> 3.0"
46
46
  spec.add_development_dependency "rspec-benchmark", "~> 0.6"
47
- spec.add_development_dependency "rubocop", "1.5.2"
48
- spec.add_development_dependency "rubocop-rails"
49
- spec.add_development_dependency "rubocop-performance"
50
-
51
- spec.add_runtime_dependency "socksify"
47
+ spec.add_development_dependency "rubocop", "~> 1.5"
48
+ spec.add_development_dependency "rubocop-rails", "~> 2.9"
49
+ spec.add_development_dependency "rubocop-performance", "~> 1.10"
52
50
  end
@@ -121,6 +121,10 @@ module Fontist
121
121
  Down.open("https://fonts.google.com/download?family=#{name}")
122
122
  true
123
123
  rescue Down::NotFound
124
+ false
125
+ rescue Down::ClientError => e
126
+ raise unless e.message == "403 Forbidden"
127
+
124
128
  false
125
129
  rescue Down::TimeoutError
126
130
  retry unless retries >= 3
@@ -17,7 +17,8 @@ module Fontist
17
17
  end
18
18
 
19
19
  def self.digest(path)
20
- checksums = Dir.glob(File.join(path, "*.{ttf,otf,ttc}"))
20
+ checksums = Dir.glob(File.join(path,
21
+ "*.{[t|T][t|T][f|F],[o|O][t|T][f|F],[t|T][t|T][c|C]}"))
21
22
  .sort
22
23
  .map { |x| Digest::SHA256.file(x).to_s }
23
24
 
@@ -21,7 +21,9 @@ module Fontist
21
21
  templates = YAML.load_file(config_path)["system"][os]["paths"]
22
22
  patterns = expand_paths(templates)
23
23
 
24
- Dir.glob(patterns, File::FNM_CASEFOLD)
24
+ Dir.glob(patterns)
25
+ # File::FNM_CASEFOLD is officially ignored -- see https://ruby-doc.org/core-3.1.1/Dir.html#method-c-glob
26
+ # "Case sensitivity depends on your system"
25
27
  end
26
28
 
27
29
  def self.reset_system_font_paths_cache
@@ -1,3 +1,3 @@
1
1
  module Fontist
2
- VERSION = "1.14.1".freeze
2
+ VERSION = "1.14.4".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.14.1
4
+ version: 1.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-05 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down
@@ -142,56 +142,56 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.1'
145
+ version: 0.3.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.1'
152
+ version: 0.3.1
153
153
  - !ruby/object:Gem::Dependency
154
- name: pry
154
+ name: socksify
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
159
+ version: '1.7'
160
+ type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '1.7'
167
167
  - !ruby/object:Gem::Dependency
168
- name: bundler
168
+ name: pry
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '2.0'
173
+ version: '0.14'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '2.0'
180
+ version: '0.14'
181
181
  - !ruby/object:Gem::Dependency
182
- name: gem-release
182
+ name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: '2.0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: '2.0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rake
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -238,58 +238,44 @@ dependencies:
238
238
  name: rubocop
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - '='
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: 1.5.2
243
+ version: '1.5'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - '='
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: 1.5.2
250
+ version: '1.5'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rubocop-rails
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ">="
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '0'
257
+ version: '2.9'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ">="
262
+ - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '0'
264
+ version: '2.9'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: rubocop-performance
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ">="
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '0'
271
+ version: '1.10'
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
277
- - !ruby/object:Gem::Version
278
- version: '0'
279
- - !ruby/object:Gem::Dependency
280
- name: socksify
281
- requirement: !ruby/object:Gem::Requirement
282
- requirements:
283
- - - ">="
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
- type: :runtime
287
- prerelease: false
288
- version_requirements: !ruby/object:Gem::Requirement
289
- requirements:
290
- - - ">="
276
+ - - "~>"
291
277
  - !ruby/object:Gem::Version
292
- version: '0'
278
+ version: '1.10'
293
279
  description: Install openly-licensed fonts on Windows, Linux and Mac!
294
280
  email:
295
281
  - open.source@ribose.com
@@ -299,8 +285,7 @@ extensions: []
299
285
  extra_rdoc_files: []
300
286
  files:
301
287
  - ".github/workflows/metanorma.yml"
302
- - ".github/workflows/release.yml"
303
- - ".github/workflows/rspec.yml"
288
+ - ".github/workflows/test-and-release.yml"
304
289
  - ".gitignore"
305
290
  - ".hound.yml"
306
291
  - ".rspec"
@@ -398,7 +383,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
398
383
  - !ruby/object:Gem::Version
399
384
  version: '0'
400
385
  requirements: []
401
- rubygems_version: 3.0.3.1
386
+ rubygems_version: 3.3.7
402
387
  signing_key:
403
388
  specification_version: 4
404
389
  summary: Install openly-licensed fonts on Windows, Linux and Mac!
@@ -1,38 +0,0 @@
1
- name: release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-18.04
11
- steps:
12
- - uses: actions/checkout@v1
13
-
14
- - uses: ruby/setup-ruby@v1
15
- with:
16
- ruby-version: '2.6'
17
-
18
- - run: bundle config set path 'vendor/bundle'
19
-
20
- - run: bundle install --jobs 4 --retry 3
21
-
22
- - run: bundle exec rspec --tag ~dev
23
- env:
24
- TEST_ENV: CI
25
-
26
- - name: Publish to rubygems.org
27
- env:
28
- RUBYGEMS_API_KEY: ${{secrets.FONTIST_CI_RUBYGEMS_API_KEY}}
29
- run: |
30
- gem install gem-release
31
- touch ~/.gem/credentials
32
- cat > ~/.gem/credentials << EOF
33
- ---
34
- :rubygems_api_key: ${RUBYGEMS_API_KEY}
35
- EOF
36
- chmod 0600 ~/.gem/credentials
37
- git status
38
- gem release