rtesseract 1.0.2 → 1.0.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
  SHA1:
3
- metadata.gz: d0c0910b55321e347dae580af8e3402967ab538e
4
- data.tar.gz: bb67c45edf51c59dfb8383d0321ea86b3da450d7
3
+ metadata.gz: 42054b679026c44ac1108f2bca357fb50824c835
4
+ data.tar.gz: b343b9211f26135a74b0c3caa26a01a674e6daef
5
5
  SHA512:
6
- metadata.gz: 71faaeeea40d9511a3f3e74b69168cd711c04e05bff2e84ca047652f7d38b80c188c3975a89b69ecc2c9c3b6cdc6504ce52a560449b254265929789c9ebbe17d
7
- data.tar.gz: 7ec59ab1bd7e7011a8fa89b654f75de2065d2c38885d7de4783fe3706bca9757d97ef2b7b1ecfcb0e4b6f8ef86225776ac9d7009c9267a848c641131e2ddf2aa
6
+ metadata.gz: 704c90a0b6f7da50a377a975c472e2c58b01addc4fc669d467e3da81558616fbf42f0e045459794538c94f6546433b6722561fa4fe6fb316a60a034354b9ba7e
7
+ data.tar.gz: ad9389e23f54113f5bd28bfb5eb12195a34b8e97f283437edccf3c2a399a6384ae27a8000968f5caeb89b7387c05b46155d36f6488940a414a455efa3bac4813
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
data/lib/rtesseract.rb CHANGED
@@ -159,7 +159,7 @@ class RTesseract
159
159
  #Output value
160
160
  def to_s
161
161
  return @value if @value != ""
162
- if @source.file? || @instance.present?
162
+ if @source.file? || !@instance.nil?
163
163
  convert
164
164
  @value
165
165
  else
data/rtesseract.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rtesseract"
8
- s.version = "1.0.2"
8
+ s.version = "1.0.3"
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 = "2013-12-09"
12
+ s.date = "2013-12-20"
13
13
  s.description = "Ruby library for working with the Tesseract OCR."
14
14
  s.email = "dannnylo@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,8 @@ describe "Rtesseract" do
20
20
  RTesseract.new(@path.join("images","test with spaces.tif").to_s).to_s_without_spaces.should eql("V2V4")
21
21
  end
22
22
 
23
+
24
+
23
25
  it " translate images .png, .jpg, .bmp" do
24
26
  RTesseract.new(@path.join("images","test.png").to_s).to_s_without_spaces.should eql("HW9W")
25
27
  RTesseract.new(@path.join("images","test.jpg").to_s).to_s_without_spaces.should eql("3R8Z")
@@ -77,6 +79,10 @@ describe "Rtesseract" do
77
79
  test.to_s_without_spaces.should eql("HW9W")
78
80
  end
79
81
 
82
+ it " use a instance" do
83
+ RTesseract.new(Magick::Image.read(@image_tiff.to_s).first).to_s_without_spaces.should eql("43ZZ")
84
+ end
85
+
80
86
  it " change image in a block" do
81
87
  test = RTesseract.read(@path.join("images","test.png").to_s) do |image|
82
88
  image = image.white_threshold(245)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtesseract
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Jeremias da Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2013-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec