rtesseract 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "rtesseract"
8
- gem.version = '0.0.11'
8
+ gem.version = '0.0.12'
9
9
  gem.summary = "Ruby library for working with the Tesseract OCR."
10
10
  gem.description = "Ruby library for working with the Tesseract OCR."
11
11
  gem.email = "dannnylo@gmail.com"
data/lib/rtesseract.rb CHANGED
@@ -6,7 +6,7 @@ require "rtesseract/errors"
6
6
  require "rtesseract/mixed"
7
7
 
8
8
  class RTesseract
9
- VERSION = '0.0.11'
9
+ VERSION = '0.0.12'
10
10
  attr_accessor :options
11
11
  attr_writer :lang
12
12
  attr_writer :psm
@@ -14,7 +14,7 @@ class RTesseract
14
14
 
15
15
  def initialize(src = "", options = {})
16
16
  @uid = options.delete(:uid) || nil
17
- @command = options.delete(:command) || "tesseract"
17
+ @command = options.delete(:command) || default_command
18
18
  @lang = options.delete(:lang) || options.delete("lang") || ""
19
19
  @psm = options.delete(:psm) || options.delete("psm") || nil
20
20
  @clear_console_output = options.delete(:clear_console_output)
@@ -33,6 +33,12 @@ class RTesseract
33
33
  end
34
34
  end
35
35
 
36
+ def default_command
37
+ TesseractBin::Executables[:tesseract] || 'tesseract'
38
+ rescue
39
+ "tesseract"
40
+ end
41
+
36
42
  def self.read(src = nil, options = {}, &block)
37
43
  raise RTesseract::ImageNotSelectedError if src == nil
38
44
  image = Magick::Image.read(src.to_s).first
data/rtesseract.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rtesseract}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Danilo Jeremias da Silva"]
12
- s.date = %q{2012-01-30}
12
+ s.date = %q{2012-01-31}
13
13
  s.description = %q{Ruby library for working with the Tesseract OCR.}
14
14
  s.email = %q{dannnylo@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtesseract
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-30 00:00:00.000000000 -02:00
12
+ date: 2012-01-31 00:00:00.000000000 -02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jeweler
17
- requirement: &71831960 !ruby/object:Gem::Requirement
17
+ requirement: &72864320 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.4.0
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *71831960
25
+ version_requirements: *72864320
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: thoughtbot-shoulda
28
- requirement: &71831300 !ruby/object:Gem::Requirement
28
+ requirement: &72864050 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *71831300
36
+ version_requirements: *72864050
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rmagick
39
- requirement: &71831020 !ruby/object:Gem::Requirement
39
+ requirement: &72863440 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 2.10.1
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *71831020
47
+ version_requirements: *72863440
48
48
  description: Ruby library for working with the Tesseract OCR.
49
49
  email: dannnylo@gmail.com
50
50
  executables: []