chupa-text-decomposer-pdf 1.0.7 → 1.0.8

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: 9ee83b1f226af6155013057a578bc3cd281b585499a7cbb80cb205d34f35b17b
4
- data.tar.gz: 00a86dc1c0a34244873517e89d6da0be8ea3fdac4b822e74d9767feba5d6ee45
3
+ metadata.gz: 206b91fbb36ea3f1df98fbc331c6216d5bcd4463c08f3fd17eae9084fe111fb0
4
+ data.tar.gz: 321fb688ddfd596037bf93b890869a8c7b1795f38a84c938fd3971889d7e443a
5
5
  SHA512:
6
- metadata.gz: a7ae9bb6f174da2918bbfcf8bdc6488dff306a2b59bfe2e37165647e355f12f80157c207c110ef54e0c329311aedabd3e2fcd59d3cfde3c316d84a7377174115
7
- data.tar.gz: 6aedb4a7b7e1b43b22f7c1a7ee2c8a6a93bfcf3faee023502d2cd54bde1a17c341c36d1c530e71095bdfb633e65366700ff2064b1b4a09f93a7953cbf2dcbd72
6
+ metadata.gz: 22b2d8cf3b943b1aa42ee4cab84968979fc3b7e902f2d2b62f803bb537a127e2a37d8c218b6002f17d87039dc366b714b5a0b5d2aa6d0ebfd90fcd98bc7954df
7
+ data.tar.gz: d5fb58450ac452e7e88e5c3931181c268051df432ddefaa4073eb1cc5baa3af21e1f1615cca2ee94cf3216008d2706856468081c623d6010f7b7e55ff5d473ff
@@ -1,6 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  #
3
- # Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2013-2019 Kouhei Sutou <kou@clear-code.com>
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,7 @@ end
22
22
 
23
23
  Gem::Specification.new do |spec|
24
24
  spec.name = "chupa-text-decomposer-pdf"
25
- spec.version = "1.0.7"
25
+ spec.version = "1.0.8"
26
26
  spec.homepage = "https://github.com/ranguba/chupa-text-decomposer-pdf"
27
27
  spec.authors = ["Kouhei Sutou"]
28
28
  spec.email = ["kou@clear-code.com"]
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.files += Dir.glob("doc/text/*")
40
40
  spec.files += Dir.glob("test/**/*")
41
41
 
42
- spec.add_runtime_dependency("chupa-text", ">= 1.0.7")
42
+ spec.add_runtime_dependency("chupa-text", ">= 1.1.8")
43
43
  spec.add_runtime_dependency("poppler")
44
44
 
45
45
  spec.add_development_dependency("bundler")
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.0.8: 2019-03-03
4
+
5
+ ### Improvements
6
+
7
+ * Reduced memory usage.
8
+
3
9
  ## 1.0.7: 2019-02-27
4
10
 
5
11
  ### Improvements
@@ -27,11 +27,9 @@ module ChupaText
27
27
  def target?(data)
28
28
  return true if data.mime_type == "application/pdf"
29
29
 
30
- return false if data.body.nil?
31
-
32
30
  case data.extension
33
31
  when nil, "pdf"
34
- data.body.start_with?("%PDF-1")
32
+ (data.peek_body(6) || "").start_with?("%PDF-1")
35
33
  else
36
34
  false
37
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chupa-text-decomposer-pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2019-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chupa-text
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.7
19
+ version: 1.1.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.7
26
+ version: 1.1.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: poppler
29
29
  requirement: !ruby/object:Gem::Requirement