dragonfly_harfbuzz 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +20 -0
- data/CHANGELOG.md +6 -0
- data/README.md +12 -1
- data/dragonfly_harfbuzz.gemspec +19 -17
- data/lib/dragonfly_harfbuzz/dom_attrs_service.rb +3 -5
- data/lib/dragonfly_harfbuzz/flatten_svg_service.rb +1 -1
- data/lib/dragonfly_harfbuzz/markup_svg_service.rb +1 -9
- data/lib/dragonfly_harfbuzz/plugin.rb +3 -3
- data/lib/dragonfly_harfbuzz/processors/hb_view.rb +32 -23
- data/lib/dragonfly_harfbuzz/version.rb +1 -1
- data/lib/dragonfly_harfbuzz.rb +12 -7
- data/samples/{Inconsolata.otf → sample.otf} +0 -0
- data/samples/sample.ttf +0 -0
- data/test/dragonfly_harfbuzz/flatten_svg_service_test.rb +6 -6
- data/test/dragonfly_harfbuzz/plugin_test.rb +6 -14
- data/test/dragonfly_harfbuzz/processors/hb_view_test.rb +38 -33
- data/test/test_helper.rb +20 -0
- metadata +37 -6
- data/test/minitest_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df2c3ab44eceb11b1369967d4ba836e4e4a6b5c93a8aa1aaea2a4a76027cc74f
|
4
|
+
data.tar.gz: 3d3dca8871157110c99dae33bd081c1d3b137bd5d5c1f219e270849371abd62e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b1e43a879e9179f0ec66b7ff39927014fec014561eb1df12e7fc3778e411a4630f2305837e3c3d8c132885659b6c62de051b0f84fff3088d3d1d3b33c082bc
|
7
|
+
data.tar.gz: 72527b11a71864ca51f21f2fb30848df92e40b3fad9c0645e27cf08c541e233a5100102835f8a1866958d04a3349c2a7606c71a599e764b36041dd6d609d12d9
|
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
script: 'bundle exec rake'
|
4
|
+
sudo: required
|
5
|
+
dist: trusty
|
6
|
+
rvm:
|
7
|
+
- 2.5.1
|
8
|
+
|
9
|
+
before_install:
|
10
|
+
- gem update bundler
|
11
|
+
- sudo apt-get update
|
12
|
+
- wget --no-check-certificate http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.7.6.tar.bz2 && tar -xjf harfbuzz-1.7.6.tar.bz2 --no-same-owner
|
13
|
+
- cd harfbuzz-1.7.6 && sudo ./configure && sudo make && sudo make install && rm -rf harfbuzz*
|
14
|
+
|
15
|
+
notifications:
|
16
|
+
email:
|
17
|
+
recipients:
|
18
|
+
- tomas.celizna@gmail.com
|
19
|
+
on_failure: change
|
20
|
+
on_success: never
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Dragonfly Harfbuzz
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/tomasc/dragonfly_harfbuzz.svg)](https://travis-ci.org/tomasc/dragonfly_harfbuzz) [![Gem Version](https://badge.fury.io/rb/dragonfly_harfbuzz.svg)](http://badge.fury.io/rb/dragonfly_harfbuzz) [![Coverage Status](https://img.shields.io/coveralls/tomasc/dragonfly_harfbuzz.svg)](https://coveralls.io/r/tomasc/dragonfly_harfbuzz)
|
4
|
+
|
3
5
|
[Harfbuzz](http://fontforge.github.io) renderer wrapped by [Dragonfly](http://markevans.github.io/dragonfly) processors.
|
4
6
|
|
5
7
|
## Installation
|
@@ -20,7 +22,7 @@ You will also need Harfbuzz installed.
|
|
20
22
|
|
21
23
|
Using [Homebrew](http://brew.sh):
|
22
24
|
|
23
|
-
$ brew install harfbuzz
|
25
|
+
$ brew install --with-cairo harfbuzz
|
24
26
|
|
25
27
|
Or build from source. See [Harfbuzz](http://harfbuzz.org) website for instructions.
|
26
28
|
|
@@ -43,6 +45,15 @@ font.hb_view('my text', :svg, { font_size: 36 })
|
|
43
45
|
|
44
46
|
See tests and `hb-view --help-all` for more details on options.
|
45
47
|
|
48
|
+
## Supported Formats
|
49
|
+
|
50
|
+
List of supported formats is available as:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
DragonflyHarfbuzz::SUPPORTED_FORMATS # => ["otf"]
|
54
|
+
DragonflyHarfbuzz::SUPPORTED_OUTPUT_FORMATS # => ["ansi", "png", "svg", "pdf", "ps", "eps"]
|
55
|
+
```
|
56
|
+
|
46
57
|
## Options
|
47
58
|
|
48
59
|
Additionally (for `<svg>` only) you can pass the following options: `markup_svg: Boolean`, `split_paths: Boolean` and `flatten_svg: Boolean`. `markup_svg` returns an `<svg>` that is organized into word and characters and marked up with additional data attributes. `flatten_svg` uses the result of `markup_svg` and further cleans up the `<svg>`, replacing the `<symbol>`, `<use>` elements with nested `<svg>`s. This is handy if you want to do some more precise animation/manipulation of the resulting `<svg>`. `split_paths` is a feature of the `markup_svg` and controls whether the paths of each character are split up into smaller components.
|
data/dragonfly_harfbuzz.gemspec
CHANGED
@@ -1,29 +1,31 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('
|
1
|
+
|
2
|
+
lib = File.expand_path('lib', __dir__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'dragonfly_harfbuzz/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'dragonfly_harfbuzz'
|
8
8
|
spec.version = DragonflyHarfbuzz::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.homepage =
|
13
|
-
spec.license =
|
9
|
+
spec.authors = ['Tomas Celizna']
|
10
|
+
spec.email = ['tomas.celizna@gmail.com']
|
11
|
+
spec.summary = 'Harfbuzz renderer wrapped by Dragonfly processors.'
|
12
|
+
spec.homepage = 'https://github.com/tomasc/dragonfly_harfbuzz'
|
13
|
+
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
-
spec.require_paths = [
|
18
|
+
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency
|
21
|
-
spec.add_dependency
|
22
|
-
spec.add_dependency
|
20
|
+
spec.add_dependency 'activesupport'
|
21
|
+
spec.add_dependency 'dragonfly', '~> 1.0'
|
22
|
+
spec.add_dependency 'ox'
|
23
|
+
spec.add_dependency 'savage'
|
23
24
|
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
28
|
-
spec.add_development_dependency
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'guard'
|
28
|
+
spec.add_development_dependency 'guard-minitest'
|
29
|
+
spec.add_development_dependency 'minitest'
|
30
|
+
spec.add_development_dependency 'minitest-reporters'
|
29
31
|
end
|
@@ -4,10 +4,8 @@ module DragonflyHarfbuzz
|
|
4
4
|
class DomAttrsService < Struct.new :svg, :font_size, :margin
|
5
5
|
attr_accessor :ox_doc
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
def self.call *args
|
10
|
-
self.new(*args).call
|
7
|
+
def self.call(*args)
|
8
|
+
new(*args).call
|
11
9
|
end
|
12
10
|
|
13
11
|
def call
|
@@ -17,7 +15,7 @@ module DragonflyHarfbuzz
|
|
17
15
|
Ox.dump(ox_doc)
|
18
16
|
end
|
19
17
|
|
20
|
-
private
|
18
|
+
private
|
21
19
|
|
22
20
|
def ox_doc
|
23
21
|
@ox_doc ||= Ox.parse(svg)
|
@@ -6,14 +6,10 @@ module DragonflyHarfbuzz
|
|
6
6
|
attr_accessor :ox_doc
|
7
7
|
attr_accessor :text
|
8
8
|
|
9
|
-
# =====================================================================
|
10
|
-
|
11
9
|
def self.call(*args)
|
12
10
|
new(*args).call
|
13
11
|
end
|
14
12
|
|
15
|
-
# =====================================================================
|
16
|
-
|
17
13
|
def initialize(text, svg, options = {})
|
18
14
|
@text = text
|
19
15
|
@svg = svg
|
@@ -43,7 +39,7 @@ module DragonflyHarfbuzz
|
|
43
39
|
Ox.dump(ox_doc)
|
44
40
|
end
|
45
41
|
|
46
|
-
private
|
42
|
+
private
|
47
43
|
|
48
44
|
def lines
|
49
45
|
text.split(/\n+/)
|
@@ -57,8 +53,6 @@ module DragonflyHarfbuzz
|
|
57
53
|
@options.fetch(:split_paths, true)
|
58
54
|
end
|
59
55
|
|
60
|
-
# ---------------------------------------------------------------------
|
61
|
-
|
62
56
|
# FIXME: fix issues with negative paths ('O', 'd', etc.)
|
63
57
|
def split_paths
|
64
58
|
symbols = ox_doc.locate('svg/defs/g/symbol')
|
@@ -77,8 +71,6 @@ module DragonflyHarfbuzz
|
|
77
71
|
end
|
78
72
|
end
|
79
73
|
|
80
|
-
# ---------------------------------------------------------------------
|
81
|
-
|
82
74
|
def marked_up_word(word, word_index, line, line_group)
|
83
75
|
word_group = Ox::Element.new('g').tap do |prop|
|
84
76
|
prop[:word] = word
|
@@ -2,11 +2,11 @@ require 'dragonfly_harfbuzz/processors/hb_view'
|
|
2
2
|
|
3
3
|
module DragonflyHarfbuzz
|
4
4
|
class Plugin
|
5
|
-
|
6
|
-
def call app, opts={}
|
5
|
+
def call(app, options={})
|
7
6
|
app.add_processor :hb_view, Processors::HbView.new
|
8
|
-
end
|
9
7
|
|
8
|
+
app.add_mime_type 'otf', 'font/otf'
|
9
|
+
end
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -3,45 +3,54 @@ require 'shellwords'
|
|
3
3
|
module DragonflyHarfbuzz
|
4
4
|
module Processors
|
5
5
|
class HbView
|
6
|
-
def call(content, str,
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
def call(content, str, options = {})
|
7
|
+
options = options.each_with_object({}) { |(k, v), memo| memo[k.to_s] = v } # stringify keys
|
8
|
+
|
9
|
+
raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext)
|
10
|
+
|
11
|
+
format = options.fetch('format', 'svg').to_s
|
12
|
+
|
13
|
+
raise UnsupportedOutputFormat unless SUPPORTED_OUTPUT_FORMATS.include?(format)
|
14
|
+
|
15
|
+
flatten_svg = options.fetch('flatten_svg', false)
|
16
|
+
markup_svg = options.fetch('markup_svg', flatten_svg)
|
17
|
+
split_paths = options.fetch('split_paths', true)
|
11
18
|
|
12
19
|
content.shell_update(ext: format) do |old_path, new_path|
|
13
|
-
args = %W
|
20
|
+
args = %W[
|
14
21
|
--font-file=#{old_path}
|
15
22
|
--output-file=#{new_path}
|
16
23
|
--output-format=#{format}
|
17
|
-
|
24
|
+
]
|
18
25
|
|
19
|
-
|
20
|
-
|
26
|
+
args << "--text='#{str}'" unless options.has_key?('unicodes')
|
27
|
+
|
28
|
+
options.reject { |k, _| %w[format markup_svg flatten_svg split_paths].include?(k.to_s) }.each do |k, v|
|
29
|
+
args << "--#{k.to_s.tr('_', '-')}=#{Shellwords.escape(v)}" if v.present?
|
21
30
|
end
|
22
31
|
|
23
|
-
"
|
32
|
+
"#{hb_view_command} #{args.join(' ')}"
|
24
33
|
end
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
content.ext = format
|
29
|
-
end
|
35
|
+
content.meta['format'] = format
|
36
|
+
content.ext = format
|
30
37
|
|
31
|
-
if format
|
32
|
-
content.update(
|
33
|
-
content.update(
|
34
|
-
content.update(
|
38
|
+
if format =~ /svg/i
|
39
|
+
content.update(MarkupSvgService.call(str, content.data, split_paths: split_paths), 'name' => "temp.#{format}") if markup_svg
|
40
|
+
content.update(FlattenSvgService.call(content.data), 'name' => "temp.#{format}") if flatten_svg
|
41
|
+
content.update(DomAttrsService.call(content.data, options[:font_size], options[:margin]), 'name' => "temp.#{format}")
|
35
42
|
end
|
43
|
+
end
|
36
44
|
|
37
|
-
|
45
|
+
def update_url(attrs, str = '', options = {})
|
46
|
+
format = options.fetch('format', 'svg').to_s
|
47
|
+
attrs.ext = format
|
38
48
|
end
|
39
49
|
|
40
|
-
|
50
|
+
private
|
41
51
|
|
42
|
-
def
|
43
|
-
|
44
|
-
attrs.ext = format if format
|
52
|
+
def hb_view_command
|
53
|
+
'hb-view'
|
45
54
|
end
|
46
55
|
end
|
47
56
|
end
|
data/lib/dragonfly_harfbuzz.rb
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
require 'dragonfly'
|
2
|
+
require 'active_support/core_ext/object/blank'
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'dragonfly_harfbuzz/dom_attrs_service'
|
5
|
+
require 'dragonfly_harfbuzz/flatten_svg_service'
|
6
|
+
require 'dragonfly_harfbuzz/markup_svg_service'
|
6
7
|
|
7
|
-
require
|
8
|
-
require
|
8
|
+
require 'dragonfly_harfbuzz/plugin'
|
9
|
+
require 'dragonfly_harfbuzz/version'
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
module DragonflyHarfbuzz
|
12
|
+
class UnsupportedFormat < RuntimeError; end
|
13
|
+
class UnsupportedOutputFormat < RuntimeError; end
|
14
|
+
|
15
|
+
SUPPORTED_FORMATS = %w[otf ttf].freeze
|
16
|
+
SUPPORTED_OUTPUT_FORMATS = %w[png svg pdf ps eps].freeze
|
12
17
|
end
|
File without changes
|
data/samples/sample.ttf
ADDED
Binary file
|
@@ -1,19 +1,19 @@
|
|
1
|
-
require '
|
1
|
+
require 'test_helper'
|
2
2
|
|
3
3
|
module DragonflyHarfbuzz
|
4
4
|
describe FlattenSvgService do
|
5
5
|
let(:app) { test_app.configure_with(:harfbuzz) }
|
6
6
|
let(:processor) { DragonflyHarfbuzz::Processors::HbView.new }
|
7
|
-
let(:
|
7
|
+
let(:content) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.otf')) }
|
8
8
|
let(:string) { 'foo foo' }
|
9
|
-
let(:svg) { processor.call(
|
9
|
+
let(:svg) { processor.call(content, string) }
|
10
10
|
let(:call) { DragonflyHarfbuzz::FlattenSvgService.call(string, svg) }
|
11
11
|
|
12
12
|
let(:f_markup) { '<svg character="f" class="character" overflow="visible" x="1552" y="229.504">' }
|
13
13
|
|
14
|
-
|
15
|
-
processor.call(
|
16
|
-
|
14
|
+
describe 'flatten_svg' do
|
15
|
+
before { processor.call(content, string, flatten_svg: true) }
|
16
|
+
it { content.data.sub(f_markup, '').wont_include f_markup }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -1,18 +1,10 @@
|
|
1
|
-
require '
|
1
|
+
require 'test_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
let(:app) { test_app.configure_with(:harfbuzz) }
|
7
|
-
let(:font) { app.fetch_file(SAMPLES_DIR.join('Inconsolata.otf')) }
|
8
|
-
|
9
|
-
# ---------------------------------------------------------------------
|
10
|
-
|
11
|
-
describe 'processors' do
|
12
|
-
it 'adds #hb_view' do
|
13
|
-
font.must_respond_to :hb_view
|
14
|
-
end
|
15
|
-
end
|
3
|
+
describe DragonflyHarfbuzz::Plugin do
|
4
|
+
let(:app) { test_app.configure_with(:harfbuzz) }
|
5
|
+
let(:content) { app.fetch_file(SAMPLES_DIR.join('sample.otf')) }
|
16
6
|
|
7
|
+
describe 'processors' do
|
8
|
+
it { content.must_respond_to :hb_view }
|
17
9
|
end
|
18
10
|
end
|
@@ -1,45 +1,50 @@
|
|
1
|
-
require '
|
1
|
+
require 'test_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
describe DragonflyHarfbuzz::Processors::HbView do
|
4
|
+
let(:app) { test_app.configure_with(:harfbuzz) }
|
5
|
+
let(:content) { Dragonfly::Content.new(app, SAMPLES_DIR.join('sample.otf')) }
|
6
|
+
let(:processor) { DragonflyHarfbuzz::Processors::HbView.new }
|
6
7
|
|
7
|
-
|
8
|
-
let(:processor) { DragonflyHarfbuzz::Processors::HbView.new }
|
9
|
-
let(:font) { Dragonfly::Content.new(app, SAMPLES_DIR.join('Inconsolata.otf')) }
|
10
|
-
let(:string) { 'FOO' }
|
8
|
+
let(:string) { 'FOO' }
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
describe 'SUPPORTED_FORMATS' do
|
11
|
+
DragonflyHarfbuzz::SUPPORTED_FORMATS.each do |format|
|
12
|
+
unless File.exists?(SAMPLES_DIR.join("sample.#{format}"))
|
13
|
+
it(format) { skip "sample.#{format} does not exist, skipping" }
|
14
|
+
next
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
it 'passes options to command line ' do
|
19
|
-
processor.call(font, string, { foreground: '#ff00ff' })
|
20
|
-
font.data.must_include 'fill:rgb(100%,0%,100%);'
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'supports :markup_svg' do
|
24
|
-
processor.call(font, string, { markup_svg: true })
|
25
|
-
|
26
|
-
font.data.must_include "word=\"#{string}\""
|
17
|
+
let(:content) { app.fetch_file SAMPLES_DIR.join("sample.#{format}") }
|
27
18
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
19
|
+
DragonflyHarfbuzz::SUPPORTED_OUTPUT_FORMATS.each do |output_format|
|
20
|
+
it("#{format} to #{output_format}") do
|
21
|
+
result = content.hb_view(string, format: output_format)
|
22
|
+
result.ext.must_equal output_format
|
23
|
+
result.mime_type.must_equal Rack::Mime.mime_type(".#{output_format}")
|
24
|
+
result.size.must_be :>, 0
|
25
|
+
result.tempfile.path.must_match /\.#{output_format}\z/
|
34
26
|
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
35
30
|
|
36
|
-
|
37
|
-
|
31
|
+
describe 'foreground' do
|
32
|
+
before { processor.call(content, string, foreground: '#ff00ff') }
|
33
|
+
it { content.data.must_include 'fill:rgb(100%,0%,100%);' }
|
34
|
+
end
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
describe 'markup_svg' do
|
37
|
+
before { processor.call(content, string, markup_svg: true) }
|
38
|
+
it { content.data.must_include "word=\"#{string}\"" }
|
39
|
+
it { content.data.must_include 'character="F"' }
|
40
|
+
it { content.data.must_include 'character="O"' }
|
41
|
+
it { content.data.must_include 'character="O"' }
|
42
|
+
it { content.data.must_include 'class="character"' }
|
43
|
+
it { content.data.must_include 'class="word"' }
|
44
|
+
end
|
42
45
|
|
43
|
-
|
46
|
+
describe 'flatten_svg' do
|
47
|
+
before { processor.call(content, string, flatten_svg: true) }
|
48
|
+
it { content.data.wont_include '#glyph0-1' }
|
44
49
|
end
|
45
50
|
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
require 'minitest'
|
5
|
+
require 'minitest/autorun'
|
6
|
+
require 'minitest/reporters'
|
7
|
+
require 'minitest/spec'
|
8
|
+
|
9
|
+
require 'dragonfly_harfbuzz'
|
10
|
+
|
11
|
+
SAMPLES_DIR = Pathname.new(File.expand_path('../samples', __dir__))
|
12
|
+
|
13
|
+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
14
|
+
|
15
|
+
def test_app(name = nil)
|
16
|
+
Dragonfly::App.instance(name).tap do |app|
|
17
|
+
app.datastore = Dragonfly::MemoryDataStore.new
|
18
|
+
app.secret = 'test secret'
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly_harfbuzz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: dragonfly
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,20 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: minitest-reporters
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
description:
|
126
154
|
email:
|
127
155
|
- tomas.celizna@gmail.com
|
@@ -130,6 +158,8 @@ extensions: []
|
|
130
158
|
extra_rdoc_files: []
|
131
159
|
files:
|
132
160
|
- ".gitignore"
|
161
|
+
- ".travis.yml"
|
162
|
+
- CHANGELOG.md
|
133
163
|
- Gemfile
|
134
164
|
- Guardfile
|
135
165
|
- LICENSE.txt
|
@@ -143,11 +173,12 @@ files:
|
|
143
173
|
- lib/dragonfly_harfbuzz/plugin.rb
|
144
174
|
- lib/dragonfly_harfbuzz/processors/hb_view.rb
|
145
175
|
- lib/dragonfly_harfbuzz/version.rb
|
146
|
-
- samples/
|
176
|
+
- samples/sample.otf
|
177
|
+
- samples/sample.ttf
|
147
178
|
- test/dragonfly_harfbuzz/flatten_svg_service_test.rb
|
148
179
|
- test/dragonfly_harfbuzz/plugin_test.rb
|
149
180
|
- test/dragonfly_harfbuzz/processors/hb_view_test.rb
|
150
|
-
- test/
|
181
|
+
- test/test_helper.rb
|
151
182
|
homepage: https://github.com/tomasc/dragonfly_harfbuzz
|
152
183
|
licenses:
|
153
184
|
- MIT
|
@@ -168,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
199
|
version: '0'
|
169
200
|
requirements: []
|
170
201
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
202
|
+
rubygems_version: 2.7.6
|
172
203
|
signing_key:
|
173
204
|
specification_version: 4
|
174
205
|
summary: Harfbuzz renderer wrapped by Dragonfly processors.
|
@@ -176,4 +207,4 @@ test_files:
|
|
176
207
|
- test/dragonfly_harfbuzz/flatten_svg_service_test.rb
|
177
208
|
- test/dragonfly_harfbuzz/plugin_test.rb
|
178
209
|
- test/dragonfly_harfbuzz/processors/hb_view_test.rb
|
179
|
-
- test/
|
210
|
+
- test/test_helper.rb
|
data/test/minitest_helper.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
|
2
|
-
require "bundler/setup"
|
3
|
-
|
4
|
-
require "minitest"
|
5
|
-
require "minitest/autorun"
|
6
|
-
require "minitest/spec"
|
7
|
-
|
8
|
-
require "dragonfly_harfbuzz"
|
9
|
-
|
10
|
-
# ---------------------------------------------------------------------
|
11
|
-
|
12
|
-
SAMPLES_DIR = Pathname.new(File.expand_path('../../samples', __FILE__))
|
13
|
-
|
14
|
-
# ---------------------------------------------------------------------
|
15
|
-
|
16
|
-
def test_app name=nil
|
17
|
-
app = Dragonfly::App.instance(name)
|
18
|
-
app.datastore = Dragonfly::MemoryDataStore.new
|
19
|
-
app.secret = "test secret"
|
20
|
-
app
|
21
|
-
end
|