fontist 1.8.12 → 1.8.13

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: d1ece96735fa8114f5ce56d56217b20208e8c5dced1c8d0b4092094ebac4ec17
4
- data.tar.gz: 30e6189789d580d5c6bd56aa12d02c91057a05a286ec513469c4897d193a2542
3
+ metadata.gz: a094865cc9cb315ad328f795c59934f06663e8c43ff2931a0644da7aef7d8c7d
4
+ data.tar.gz: 170ee4d526e74992ee56593fb5fb715c400fe07c2ade9307faebcdcd8e32e47c
5
5
  SHA512:
6
- metadata.gz: 20044f9435f70398c851eca878a846dad762c065ace4de9efcd6b1c05a3b5c6e9ab1f6bef4aefdf6231db020f3d5cb4454c5a2e4cf4c1f151f19288890449b11
7
- data.tar.gz: d93ca29eedc83eeb4fb60b574ae254b277eb210e2e1e8fbcad68ad6a15d86f3f2fe981f549444fdfb13f559221cd2bc03b73f0a00a89496f7a22482c6493afa3
6
+ metadata.gz: 52ec33b7a2000ec5af4ae65165c0b0cdd22f1b0389b6c3ec89ed3a135ca3e55ac810a71cf9ce4621ae2398dcb77ed1dd2c8a45b077a2bfb8a1afc4a5d4d5efab
7
+ data.tar.gz: 30635f72fb0d39f2ecb0657b36ee89f6a48647e8f23ec896f8837323e76eb7964d3feeda3cf899f6d698e06681e815000e132c6c4a556695f340d59a351db214
@@ -0,0 +1,35 @@
1
+ name: metanorma
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
11
+ runs-on: ${{ matrix.os }}
12
+ continue-on-error: ${{ matrix.experimental }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
17
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
18
+ experimental: [ true ]
19
+ steps:
20
+ - uses: actions/checkout@master
21
+ with:
22
+ repository: metanorma/metanorma
23
+
24
+ - uses: actions/checkout@master
25
+ with:
26
+ path: "fontist"
27
+
28
+ - run: 'echo ''gem "fontist", path: "./fontist"'' > Gemfile.devel'
29
+
30
+ - uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ bundler-cache: true
34
+
35
+ - run: bundle exec rake
@@ -13,19 +13,9 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- ruby: [ '2.4', '2.5', '2.6', '2.7' ]
16
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
17
17
  os: [ ubuntu-latest, windows-latest, macos-latest ]
18
18
  experimental: [ false ]
19
- include:
20
- - ruby: '3.0'
21
- os: 'ubuntu-latest'
22
- experimental: true
23
- - ruby: '3.0'
24
- os: 'windows-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'macos-latest'
28
- experimental: true
29
19
 
30
20
  steps:
31
21
  - uses: actions/checkout@master
data/README.md CHANGED
@@ -34,6 +34,18 @@ After installation please fetch formulas to your system:
34
34
  fontist update
35
35
  ```
36
36
 
37
+ ### Dependencies
38
+
39
+ Depends on
40
+ [ffi-libarchive-binary](https://github.com/fontist/ffi-libarchive-binary) which
41
+ has the following requirements:
42
+
43
+ * zlib
44
+ * Expat
45
+ * OpenSSL (for Linux only)
46
+
47
+ These dependencies are generally present on all systems.
48
+
37
49
  ## Usage
38
50
 
39
51
  ### Font
data/lib/fontist/index.rb CHANGED
@@ -7,5 +7,10 @@ module Fontist
7
7
  Fontist::Indexes::FontIndex.rebuild
8
8
  Fontist::Indexes::FilenameIndex.rebuild
9
9
  end
10
+
11
+ def self.reset_cache
12
+ Fontist::Indexes::FontIndex.reset_cache
13
+ Fontist::Indexes::FilenameIndex.reset_cache
14
+ end
10
15
  end
11
16
  end
@@ -18,6 +18,10 @@ module Fontist
18
18
  raise NotImplementedError, "Please define path of an index"
19
19
  end
20
20
 
21
+ def self.reset_cache
22
+ @from_yaml = nil
23
+ end
24
+
21
25
  def self.rebuild
22
26
  index = new
23
27
  index.build
@@ -83,7 +83,7 @@ module Fontist
83
83
  next by_path[path] if by_path[path]
84
84
 
85
85
  detect_fonts(path)
86
- end
86
+ end.compact
87
87
  end
88
88
 
89
89
  def detect_fonts(path)
@@ -100,6 +100,9 @@ module Fontist
100
100
  def detect_file_font(path)
101
101
  file = TTFunk::File.open(path)
102
102
  parse_font(file, path)
103
+ rescue StandardError
104
+ warn $!.message
105
+ warn "Warning: File at #{path} not recognized as a font file."
103
106
  end
104
107
 
105
108
  def detect_collection_fonts(path)
@@ -1,3 +1,3 @@
1
1
  module Fontist
2
- VERSION = "1.8.12".freeze
2
+ VERSION = "1.8.13".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.8.12
4
+ version: 1.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down
@@ -243,6 +243,7 @@ extensions: []
243
243
  extra_rdoc_files: []
244
244
  files:
245
245
  - ".github/workflows/check_google.yml"
246
+ - ".github/workflows/metanorma.yml"
246
247
  - ".github/workflows/release.yml"
247
248
  - ".github/workflows/rspec.yml"
248
249
  - ".gitignore"
@@ -337,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
338
  version: '0'
338
339
  requirements: []
339
340
  rubygems_version: 3.0.3
340
- signing_key:
341
+ signing_key:
341
342
  specification_version: 4
342
343
  summary: Install openly-licensed fonts on Windows, Linux and Mac!
343
344
  test_files: []