chupa-text 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/chupa-text/version.rb +2 -2
- data/lib/chupa-text/virtual-content.rb +7 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38219bcd127b3e4b7ee11a46d51e7e6762b2e5ad637239518c9ec64cdb4906fc
|
4
|
+
data.tar.gz: 279ac9fa242ec20c8c7d7710d5a26bb58bd73cbe0d3a6473e4b714d766743825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 776f7004429ff9a95bdbac88a50029cfc1cebdbf783ded8f91ddd6e29f79fc5fc8d113a616bfdfb5684b940a5cbb9ef47d4a9bff85cc6a9f69e1300997293207
|
7
|
+
data.tar.gz: b0c5299e11c13377a68f3871bb1a673ec3216577f04430f3cb30352999ac3f8a5b7d9d9d2dabe5a30da053904662610b193d7364f42f414acd72c3d2b18df126
|
data/doc/text/news.md
CHANGED
data/lib/chupa-text/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2013-
|
1
|
+
# Copyright (C) 2013-2018 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -15,5 +15,5 @@
|
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
17
|
module ChupaText
|
18
|
-
VERSION = "1.1.
|
18
|
+
VERSION = "1.1.3"
|
19
19
|
end
|
@@ -33,7 +33,7 @@ module ChupaText
|
|
33
33
|
original_path = Pathname.new(original_path)
|
34
34
|
end
|
35
35
|
end
|
36
|
-
@
|
36
|
+
@original_path = original_path
|
37
37
|
@body = nil
|
38
38
|
setup_file do |file|
|
39
39
|
@size = IO.copy_stream(input, file)
|
@@ -53,9 +53,10 @@ module ChupaText
|
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
56
|
-
def
|
57
|
-
if original_path
|
58
|
-
prefix, suffix = original_path.basename.to_s.split(/(\.[^.]+\z)/)
|
56
|
+
def compute_tempfile_basename
|
57
|
+
if @original_path
|
58
|
+
prefix, suffix = @original_path.basename.to_s.split(/(\.[^.]+\z)/)
|
59
|
+
prefix = prefix[0, 20]
|
59
60
|
if suffix
|
60
61
|
[prefix, suffix]
|
61
62
|
else
|
@@ -67,7 +68,8 @@ module ChupaText
|
|
67
68
|
end
|
68
69
|
|
69
70
|
def setup_file
|
70
|
-
|
71
|
+
basename = compute_tempfile_basename
|
72
|
+
@file = Tempfile.new(basename)
|
71
73
|
@path = @file.path
|
72
74
|
yield(@file)
|
73
75
|
@file.close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chupa-text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: archive-zip
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version:
|
212
|
+
rubygems_version: 2.7.6
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: ChupaText is an extensible text extractor. You can plug your custom text
|