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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0fc29dda3c181cc991c437254f46cb47ba8091a
4
- data.tar.gz: 40d5b7c7530c3615cf984e349826db49506c1a6c
3
+ metadata.gz: 7fd511b3f8e468cd36b890f1cd73049eac1c59da
4
+ data.tar.gz: c23bc62e9240d32812ec176742d818b140e0b2ef
5
5
  SHA512:
6
- metadata.gz: df09ae027f1726e161b277f69bba69b70903b26f5ddf079d7fbffc4916a0d20316f28b213dac9585732120d1de2aceb583d48567832d1ef09eecba6238cbecca
7
- data.tar.gz: 96fdbdf7e039739af1a8049ebfd56de4e47cb9be93b811ea72219eb11aebcfd7451a8f7bffb0b0c56db8d0977403e9c2b6b10ef28cf792c83033aad344f6dca3
6
+ metadata.gz: 710cb9e03dff64b15969ba975efc5ba2e3438f9ab0a7967c2035864baf1431b74ce263483484d8aaca63cf3372cae5867837af65fd4d0f1aab9c7be0d88af4b0
7
+ data.tar.gz: f786bb8bf384188f9f1bcb855218ed4c0fa7f1f55a84f4226e3e146f504b8864b1c9b87f12ee37bf18327fe69821e7175c869e2709200545786a7a12aa6835d2
data/AUTHORS ADDED
@@ -0,0 +1,3 @@
1
+ ongaeshi
2
+ labocho
3
+
data/HISTORY.md ADDED
@@ -0,0 +1,5 @@
1
+ # HISTORY - Honyomi
2
+
3
+ ## 0.3 - 2014-07-18
4
+
5
+ * Support file name includes parenthesis or any special characters
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 #{filename.gsub(' ', '\ ')} #{outfile}") # Need pdftotext (poppler, xpdf)
11
+ system("pdftotext", filename, outfile) # Need pdftotext (poppler, xpdf)
12
12
  @text = File.read(outfile)
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Honyomi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-04-14 00:00:00.000000000 Z
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.0.0
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: