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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a508472a3d7b4b9a0cbcf39c8090ae013bf174859fb1c9d1d558c8847787d86c
4
- data.tar.gz: 2eb41dedf87b02b40f67c12574c517dd10b0079bf4dfe652a1e8966e6eed31f8
3
+ metadata.gz: 38219bcd127b3e4b7ee11a46d51e7e6762b2e5ad637239518c9ec64cdb4906fc
4
+ data.tar.gz: 279ac9fa242ec20c8c7d7710d5a26bb58bd73cbe0d3a6473e4b714d766743825
5
5
  SHA512:
6
- metadata.gz: 97240067f9c2fd099109513c775a365655e168b4c3e6cd39fb1b0387ba8a1d5493eba93856aa7364265c3b499ffb73bf634041c517487ae066a3f7ca33885088
7
- data.tar.gz: 06ae2a89ad702422f72c2b9a1967ec7cfc22102890698b1dbdb48a442be3b10f96d68ece9b7729b02d6d36bbf8ae5b6596b47cab7e0b97c0768851b76ee0caa0
6
+ metadata.gz: 776f7004429ff9a95bdbac88a50029cfc1cebdbf783ded8f91ddd6e29f79fc5fc8d113a616bfdfb5684b940a5cbb9ef47d4a9bff85cc6a9f69e1300997293207
7
+ data.tar.gz: b0c5299e11c13377a68f3871bb1a673ec3216577f04430f3cb30352999ac3f8a5b7d9d9d2dabe5a30da053904662610b193d7364f42f414acd72c3d2b18df126
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.1.3: 2018-07-18
4
+
5
+ ### Improvements
6
+
7
+ * Added support for long base name file.
8
+
3
9
  ## 1.1.2: 2018-06-18
4
10
 
5
11
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com>
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.2"
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
- @base_name = compute_base_name(original_path)
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 compute_base_name(original_path)
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
- @file = Tempfile.new(@base_name)
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.2
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-06-18 00:00:00.000000000 Z
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: 3.0.0.beta1
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