Try to create tmp dir, if not exists.
This commit is contained in:
parent
4127204527
commit
2508a05589
|
@ -7,7 +7,7 @@
|
||||||
/spec/reports/
|
/spec/reports/
|
||||||
/test/tmp/
|
/test/tmp/
|
||||||
/test/version_tmp/
|
/test/version_tmp/
|
||||||
/tmp/
|
!/tmp/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
## Specific to RubyMotion:
|
## Specific to RubyMotion:
|
||||||
|
|
|
@ -29,6 +29,6 @@ describe 'OCR' do
|
||||||
expect(chars).not_to eq(str)
|
expect(chars).not_to eq(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
puts %(------------------------\nOCR all results: \n#{results.join("\n")})
|
puts %(\n------------------------\nOCR all results: \n#{results.join("\n")})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,11 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||||
require 'rucaptcha'
|
require 'rucaptcha'
|
||||||
require 'rtesseract'
|
require 'rtesseract'
|
||||||
|
|
||||||
|
tmp_path = File.join(File.dirname(__FILE__), '../tmp')
|
||||||
|
if !File.exists?(tmp_path)
|
||||||
|
Dir.mkdir(tmp_path)
|
||||||
|
end
|
||||||
|
|
||||||
RuCaptcha.configure do
|
RuCaptcha.configure do
|
||||||
self.len = 2
|
self.len = 2
|
||||||
self.width = 123
|
self.width = 123
|
||||||
|
|
Loading…
Reference in New Issue