daddy 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2FlNTQ4MWJmZTZiMTQzYmM3NWJiMjNmMjQwMDRjOGY2ODRiZGY3Zg==
4
+ ZTlhZGYyMDBhOGM2MWI5YjVhOGI3N2UwZTZkZTVlNThmZDI0YzdlNg==
5
5
  data.tar.gz: !binary |-
6
- NGFkMTc0OGM4NWZjNmExYWVmMjFiNWI2MGNiNWFkMzhlOTdhY2JjMA==
6
+ NTljMDJlNjIzODE2MDYyNTU1YmM5NGFkMWJjNTY4OTRiZGFiYTZmYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWIzNzU2MDJlY2NmMjllY2U2MmQyOTdiNzMzODkwYTdjMjE3N2M1MGZlNjdk
10
- ZDk3OWRlZTJiZTkwNmVmN2ZkZjBjYjQ0NzliYTQ2MGI2NGNlNDBjNjJjYWEx
11
- NWIwOWVlZGNiYTM2NWY0ZjkzNzBmMDQzYjFhMzBhYWVlNDA5OGY=
9
+ NjBkYmM2ZGEzNjg0ODVjZmEyNjI2ZmNkMjQ2ZDNkZmM1OTcwYzZjMDljMjVl
10
+ MGUzOWM2ZWMzMTYzN2E3OWE5ODgyM2RmNDVlNzhhZDA5NWNhNzAwNzU2MDEz
11
+ N2IzN2Q0NzM3NzU5MDU0NjQ3YWYxNzI4MWU2MjAzMzdiZDMxZTE=
12
12
  data.tar.gz: !binary |-
13
- MDlhNGJlMTliY2RlNDhiYzBjZmZjYTkyMTlkZjA4Y2M5Yzg5YWI1OTg4MjZi
14
- MDEzNWRmY2FiOGVhNDQxMGZiNzdhZjAwMjg5OTMyNWIzMDEyZDI4MjU3OTI1
15
- MThiMGY0MDFiMjZhYWE0NWMzMWQ1ZGQ3MTIwMWI3MzVlNmQxN2I=
13
+ MTZkMmVkMDMzMGI3ZmRkMmJiMzZlYmJmYzY0MmMxZThjMDkyNTZiOTllMzNl
14
+ YTU1NjE2NGZkNDRkN2NhOGQwNmZkNTY4ZWNkNTUzM2IyMTJjOTNhY2VkMmI4
15
+ M2QzNDE3MGYyOTBkN2VjZDZjYjdmMTU0ZGI5ZTk2OGFkMWQ3Nzg=
@@ -0,0 +1,13 @@
1
+ # coding: UTF-8
2
+
3
+ module Daddy
4
+ class Ocr
5
+
6
+ def self.scan(image_path)
7
+ out = Time.now.strftime("%Y%m%d%H%M%S") + (Time.now.usec / 1000.0).to_s
8
+ system("tesseract #{image_path} tmp/#{out} -l jpn")
9
+ File.read("tmp/#{out}.txt")
10
+ end
11
+
12
+ end
13
+ end
@@ -15,8 +15,9 @@ if ENV["COVERAGE"].to_s.downcase == 'true'
15
15
  SimpleCov.start 'rails'
16
16
  end
17
17
 
18
- require 'daddy/model'
19
18
  require 'daddy/helpers/html_helper'
19
+ require 'daddy/model'
20
+ require 'daddy/ocr'
20
21
 
21
22
  module Daddy
22
23
  class Railtie < Rails::Railtie
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-20 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -242,6 +242,7 @@ files:
242
242
  - lib/daddy/cucumber/diff.rb
243
243
  - lib/daddy/helpers/html_helper.rb
244
244
  - lib/daddy/capistrano/remote_cache_subdir.rb
245
+ - lib/daddy/ocr.rb
245
246
  - lib/daddy/git.rb
246
247
  - lib/daddy/rails/hooks.rb
247
248
  - lib/daddy/rails/quiet_assets.rb