reot 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/reot/reot.cpp +4 -0
- data/lib/reot/version.rb +1 -1
- data/test/reot_test.rb +7 -1
- metadata +4 -4
data/ext/reot/reot.cpp
CHANGED
@@ -67,8 +67,12 @@ extern "C" VALUE method_convert(VALUE self, VALUE filepath, VALUE destination) {
|
|
67
67
|
if (getEOTHeader(fontData, fontSize, eotHeader, overlayDst, overlaySrc, overlayLength)) {
|
68
68
|
fwrite(&eotHeader[0], eotHeader.size(), 1, output);
|
69
69
|
fwrite(fontData, fontSize, 1, output);
|
70
|
+
fclose(output);
|
71
|
+
fclose(input);
|
70
72
|
return Qtrue;
|
71
73
|
} else {
|
74
|
+
fclose(output);
|
75
|
+
fclose(input);
|
72
76
|
return Qfalse;
|
73
77
|
}
|
74
78
|
}
|
data/lib/reot/version.rb
CHANGED
data/test/reot_test.rb
CHANGED
@@ -7,7 +7,13 @@ class TestReot < MiniTest::Unit::TestCase
|
|
7
7
|
|
8
8
|
def test_reot_converts_ttf_to_eot
|
9
9
|
assert Reot.convert!("test/fonts/Metalista.ttf", "test/fonts/Metalista.eot")
|
10
|
-
assert_equal
|
10
|
+
assert_equal 29604, File.size("test/fonts/Metalista.eot")
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_reot_too_many_files
|
14
|
+
510.times {|i|
|
15
|
+
assert Reot.convert!("test/fonts/Metalista.ttf", "test/fonts/Metalista.eot")
|
16
|
+
}
|
11
17
|
end
|
12
18
|
|
13
19
|
def test_returns_false_for_bad_file_path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
16
|
-
requirement: &
|
16
|
+
requirement: &22997960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *22997960
|
25
25
|
description: Simple ttf2eot convertor
|
26
26
|
email:
|
27
27
|
- retro@ballgag.cz
|