rtesseract 3.1.3 → 3.1.4

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
  SHA256:
3
- metadata.gz: 120e26c05e889a9bbfa935c3d43bfcbd9432b7296aa9b144fc55fd3c43f6a6af
4
- data.tar.gz: 147e882d0648febff070e7f422c79852be258f594ded86cbcde8b5677c49b354
3
+ metadata.gz: 0a6663ca2e040b7f9ea75dba9efd078c4d4e8e9ddd51f5e6891049328fc39492
4
+ data.tar.gz: 0f0cb1ccfbaf0fde1a04da091f55ee536992504f2fcf698ab56fbd354292b2a3
5
5
  SHA512:
6
- metadata.gz: 9fc275b3afb190d731e0d12356867ea3a359177141fabe876a12b2df7391b65964b3086af63156bce8cc79d5e2a8f8c6c901b9ffeeef514ad7eb5482039858dd
7
- data.tar.gz: fd6ab267bb3edfbd52afa54615ffad0e624c611270691b9e0e48cdf4ddbdbccd1565d0d52386ac664cc978fe23abf8aeb134a275f5629b2005f3464249c6455e
6
+ metadata.gz: e5a661e73977518acc17627a850d1cdc22df44af6ed4118b974af8b9a487cab1bf487583cf3a196c4b23b3a708d1fed9521ecbd5aa1e0d5d0284bdc671739fe3
7
+ data.tar.gz: b575ccd5b3fe076d0565857a558ca454b0e919e1b421ca071b6eaa8636b20ffed8f899280d666ba2735f0cf73e72552535944aa55f72a8c985116008f7059457
@@ -6,8 +6,8 @@ jobs:
6
6
  strategy:
7
7
  matrix:
8
8
  ruby:
9
- - '2.7.4'
10
9
  - '3.2.0'
10
+ - '3.4.2'
11
11
  repository:
12
12
  - 'ppa:alex-p/tesseract-ocr5'
13
13
  - 'ppa:alex-p/tesseract-ocr-devel'
@@ -34,4 +34,3 @@ jobs:
34
34
  env:
35
35
  CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
36
36
  run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Ruby -r coverage/lcov/*
37
-
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changes
2
- ## v3.1.3
3
2
 
3
+ ## v3.1.4
4
+ # Changed
5
+ * Temporary hocr file is deleted after the file is processed.
6
+
7
+ ## v3.1.3
4
8
  * Fixed a configuration error that wouldn't allow you to do different kinds of calls on the same object, for example calling .to_box and then .to_s would result in unexpected behavior.
5
9
 
6
10
  ## v3.1.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rtesseract (3.1.3)
4
+ rtesseract (3.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -32,6 +32,9 @@ or
32
32
 
33
33
  $ brew install tesseract
34
34
 
35
+ or for Heroku 22 to add the buildpack https://github.com/pathwaysmedical/heroku-buildpack-tesseract
36
+
37
+
35
38
  Add this line to your application's Gemfile:
36
39
 
37
40
  ```ruby
@@ -9,5 +9,9 @@ class RTesseract
9
9
  def temp_file_path
10
10
  Pathname.new(Dir.tmpdir).join("rtesseract_#{SecureRandom.uuid}").to_s
11
11
  end
12
+
13
+ def remove_tmp_file(absolute_file_path)
14
+ File.delete(absolute_file_path) if File.file?(absolute_file_path)
15
+ end
12
16
  end
13
17
  end
@@ -9,7 +9,10 @@ class RTesseract
9
9
  options = options.merge({ tessedit_create_hocr: 1 })
10
10
 
11
11
  RTesseract::Command.new(source, temp_file_path, errors, options).run do |output_path|
12
- parse(File.read("#{output_path}.hocr"))
12
+ filename = "#{output_path}.hocr"
13
+ content = File.read(filename)
14
+ remove_tmp_file(filename)
15
+ parse(content)
13
16
  end
14
17
  end
15
18
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RTesseract
4
- VERSION = '3.1.3'
4
+ VERSION = '3.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtesseract
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Jeremias da Silva
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-10-04 00:00:00.000000000 Z
10
+ date: 2025-04-30 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Ruby library for working with the Tesseract OCR.
14
13
  email:
@@ -50,7 +49,6 @@ licenses:
50
49
  - MIT
51
50
  metadata:
52
51
  rubygems_mfa_required: 'true'
53
- post_install_message:
54
52
  rdoc_options: []
55
53
  require_paths:
56
54
  - lib
@@ -65,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
63
  - !ruby/object:Gem::Version
66
64
  version: '0'
67
65
  requirements: []
68
- rubygems_version: 3.4.10
69
- signing_key:
66
+ rubygems_version: 3.6.3
70
67
  specification_version: 4
71
68
  summary: Ruby library for working with the Tesseract OCR.
72
69
  test_files: []