charlock_holmes 0.7.0 → 0.7.1

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
  SHA1:
3
- metadata.gz: 91b17d20c88b8cb9402ed945a785110d5b595175
4
- data.tar.gz: f13a776a404ef9d7f80fb3520dd5c9e5eb377f1b
3
+ metadata.gz: 14eb002e3883172c0808434587c7c7198e862fbe
4
+ data.tar.gz: ec27785739f9e4c3ca5c3c2987cf7d214415db36
5
5
  SHA512:
6
- metadata.gz: 825d181d3d3fa98be4c79d9dc3a3a551681cdec43221c5647dae0c7b865d764a73987514290b2e42f497540804b17300ffcc89b682fc7dc5049009573d62765f
7
- data.tar.gz: 6cc3785418f67a4dab4d0be17445e1534580fab8646c2064844213188dba28d5d57ec92fde9ce719f9b751b4416a0dc9a24f2691a703665ab60569ea7fb1c42f
6
+ metadata.gz: 33d8ce4b9bbd9408459c3ab6dd4e834352b183919a45b910d74472fb2d38b898d4898cb5d2f718768192cd4b92bb102795c39784aa1238e327419051c5b47b85
7
+ data.tar.gz: 7f7fdcfb7c1996bf8e451cf536410d89b9c88d5bd956c292a7716f5fe119264406cacbd7872af38b2a66613233c88cc98166977da766f63398326d3176b8f945
@@ -57,7 +57,7 @@ static int detect_binary_content(VALUE self, VALUE rb_str) {
57
57
  if (buf_len > 10) {
58
58
  // application/postscript
59
59
  if (!memcmp(buf, "%!PS-Adobe-", 11))
60
- return 1;
60
+ return 0;
61
61
  }
62
62
 
63
63
  if (buf_len > 7) {
@@ -1,3 +1,3 @@
1
1
  module CharlockHolmes
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -92,6 +92,7 @@ class EncodingDetectorTest < MiniTest::Test
92
92
  MAPPING = [
93
93
  ['repl2.cljs', 'ISO-8859-1', :text],
94
94
  ['cl-messagepack.lisp', 'ISO-8859-1', :text],
95
+ ['sierpinski.ps', 'ISO-8859-1', :text],
95
96
  ['core.rkt', 'UTF-8', :text],
96
97
  ['TwigExtensionsDate.es.yml', 'UTF-8', :text],
97
98
  ['laholator.py', 'UTF-8', :text],
@@ -0,0 +1,41 @@
1
+ %!PS-Adobe-3.0
2
+ %%Creator: Aaron Puchert
3
+ %%Title: The Sierpinski triangle
4
+ %%Pages: 1
5
+ %%PageOrder: Ascend
6
+
7
+ %%BeginProlog
8
+ % PAGE SETTINGS
9
+ /pageset {
10
+ 28.3464566 28.3464566 scale % set cm = 1
11
+ 0.5 0.5 translate
12
+ 0 setlinewidth
13
+ } def
14
+
15
+ % sierpinski(n) draws a sierpinski triangle of order n
16
+ /sierpinski {
17
+ dup 0 gt {
18
+ [0.5 0 0 0.5 0 0] concat dup 1 sub sierpinski
19
+ [1 0 0 1 1 0] concat dup 1 sub sierpinski
20
+ [1 0 0 1 -1 1] concat dup 1 sub sierpinski
21
+ [2 0 0 2 0 -1] concat
22
+ } {
23
+ newpath
24
+ 0 0 moveto
25
+ 1 0 lineto
26
+ 0 1 lineto
27
+ closepath
28
+ fill
29
+ } ifelse pop} def
30
+ %%EndProlog
31
+
32
+ %%BeginSetup
33
+ << /PageSize [596 843] >> setpagedevice % A4
34
+ %%EndSetup
35
+
36
+ %%Page: Test 1
37
+ pageset
38
+ [20 0 10 300 sqrt 0 0] concat
39
+ 9 sierpinski
40
+ showpage
41
+ %%EOF
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charlock_holmes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-11 00:00:00.000000000 Z
12
+ date: 2014-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -94,6 +94,7 @@ files:
94
94
  - test/fixtures/octocat.png
95
95
  - test/fixtures/octocat.psd
96
96
  - test/fixtures/repl2.cljs
97
+ - test/fixtures/sierpinski.ps
97
98
  - test/fixtures/utf16be.html
98
99
  - test/fixtures/utf32be.html
99
100
  - test/fixtures/utf32le.html