honyomi 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS +3 -0
- data/HISTORY.md +5 -0
- data/lib/honyomi/pdf.rb +1 -1
- data/lib/honyomi/version.rb +1 -1
- data/test/test_pdf.rb +12 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fd511b3f8e468cd36b890f1cd73049eac1c59da
|
4
|
+
data.tar.gz: c23bc62e9240d32812ec176742d818b140e0b2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710cb9e03dff64b15969ba975efc5ba2e3438f9ab0a7967c2035864baf1431b74ce263483484d8aaca63cf3372cae5867837af65fd4d0f1aab9c7be0d88af4b0
|
7
|
+
data.tar.gz: f786bb8bf384188f9f1bcb855218ed4c0fa7f1f55a84f4226e3e146f504b8864b1c9b87f12ee37bf18327fe69821e7175c869e2709200545786a7a12aa6835d2
|
data/AUTHORS
ADDED
data/HISTORY.md
ADDED
data/lib/honyomi/pdf.rb
CHANGED
@@ -8,7 +8,7 @@ module Honyomi
|
|
8
8
|
|
9
9
|
Dir.mktmpdir do |dir|
|
10
10
|
outfile = File.join(dir, "pdf.txt")
|
11
|
-
system("pdftotext
|
11
|
+
system("pdftotext", filename, outfile) # Need pdftotext (poppler, xpdf)
|
12
12
|
@text = File.read(outfile)
|
13
13
|
end
|
14
14
|
end
|
data/lib/honyomi/version.rb
CHANGED
data/test/test_pdf.rb
CHANGED
@@ -4,7 +4,7 @@ class TestPdf < MiniTest::Test
|
|
4
4
|
def test_pdf
|
5
5
|
File.join(File.dirname(__FILE__), "test.pdf")
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def test_pages
|
9
9
|
pdf = Honyomi::Pdf.new(test_pdf)
|
10
10
|
|
@@ -13,4 +13,15 @@ class TestPdf < MiniTest::Test
|
|
13
13
|
assert_equal "bbb\n\n", pdf.pages[1]
|
14
14
|
assert_equal "ccc\n\n", pdf.pages[2]
|
15
15
|
end
|
16
|
+
|
17
|
+
def test_file_name_includes_special_characters
|
18
|
+
Dir.mktmpdir do |dir|
|
19
|
+
filename = File.join(dir, "test (1).pdf")
|
20
|
+
|
21
|
+
FileUtils.cp test_pdf, filename
|
22
|
+
pdf = Honyomi::Pdf.new(filename)
|
23
|
+
|
24
|
+
assert_equal 3, pdf.pages.size
|
25
|
+
end
|
26
|
+
end
|
16
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honyomi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ongaeshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grn_mini
|
@@ -175,7 +175,9 @@ extra_rdoc_files: []
|
|
175
175
|
files:
|
176
176
|
- .gitignore
|
177
177
|
- .travis.yml
|
178
|
+
- AUTHORS
|
178
179
|
- Gemfile
|
180
|
+
- HISTORY.md
|
179
181
|
- LICENSE.txt
|
180
182
|
- README.md
|
181
183
|
- Rakefile
|
@@ -223,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
225
|
version: '0'
|
224
226
|
requirements: []
|
225
227
|
rubyforge_project:
|
226
|
-
rubygems_version: 2.
|
228
|
+
rubygems_version: 2.3.0
|
227
229
|
signing_key:
|
228
230
|
specification_version: 4
|
229
231
|
summary: e-book (pdf) search engine, command line interface, and web application
|
@@ -236,4 +238,3 @@ test_files:
|
|
236
238
|
- test/test_database.rb
|
237
239
|
- test/test_honyomi.rb
|
238
240
|
- test/test_pdf.rb
|
239
|
-
has_rdoc:
|