kristin 0.3.3 → 0.4.0

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: b8c3c24251891a9302c52f0364dcfd73324fea6b
4
- data.tar.gz: 6016b1a2817584e85f73002f8efc8c70e3c367d5
3
+ metadata.gz: 374bde35e53e7d5305a326698e290453a1372ae5
4
+ data.tar.gz: aea2399fb1bc0207b2e73ae38b86d97ed922518f
5
5
  SHA512:
6
- metadata.gz: 8cad5f0343a24a8567e31d561bd1c40eed49f4529b3df9a5d9985a64a994f6dbaccfa6f69a0c465669a6f91c60a23c830571d588b7ef8685aa10d4ca9ef6426b
7
- data.tar.gz: 2964db20fb2041cc32453b8a539fde6cc516c3787becbcb29315226dce88c7e5e0becf3c03868b6a60450b4eeca8c2f630f747714f576fa18ad9f7fd4c52b37f
6
+ metadata.gz: 3a7400bc756e5ddd789e6005ab6a08197fc85d69c182d35788be10be88c7012ecee1fde64a4d11cff14e27e83eb097b6b6898edac48cb27f83448fb13ac10299
7
+ data.tar.gz: f87252c8dc9410cb4c44b6e604105d1b10aa97e4f64eeb0c311b54bac2070108dc309904b7f6fbac2aefbe940e6148ce11a75a2f7448c97f46b1321754a69a72
data/.travis.yml CHANGED
@@ -4,6 +4,8 @@ rvm:
4
4
  - 2.0.0
5
5
  - ruby-head
6
6
  - rbx-19mode
7
+ - jruby-19mode
8
+ - jruby-head
7
9
  notifications:
8
10
  recipients:
9
11
  - ricny046@gmail.com
data/kristin.gemspec CHANGED
@@ -17,7 +17,9 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
-
20
+
21
+ spec.add_dependency "spoon"
22
+
21
23
  spec.add_development_dependency "bundler"
22
24
  spec.add_development_dependency "rake"
23
25
  spec.add_development_dependency "nokogiri"
@@ -1,3 +1,3 @@
1
1
  module Kristin
2
- VERSION = "0.3.3"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/kristin.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "kristin/version"
2
2
  require 'open-uri'
3
3
  require "net/http"
4
+ require "spoon"
4
5
 
5
6
  module Kristin
6
7
  class Converter
@@ -13,9 +14,9 @@ module Kristin
13
14
  def convert
14
15
  raise IOError, "Can't find pdf2htmlex executable in PATH" if not command_available?
15
16
  src = determine_source(@source)
16
- opts = process_options
17
- cmd = "#{pdf2htmlex_command} #{opts} #{src} #{@target}"
18
- pid = Process.spawn(cmd, [:out, :err] => "/dev/null")
17
+ opts = process_options.split(" ")
18
+ args = [pdf2htmlex_command, opts, src, @target].flatten
19
+ pid = Spoon.spawnp(*args)
19
20
  Process.waitpid(pid)
20
21
 
21
22
  ## TODO: Grab error message from pdf2htmlex and raise a better error
@@ -34,7 +35,6 @@ module Kristin
34
35
  opts.push("--zoom #{@options[:zoom]}") if @options[:zoom]
35
36
  opts.push("--fit-width #{@options[:fit_width]}") if @options[:fit_width]
36
37
  opts.push("--fit-height #{@options[:fit_height]}") if @options[:fit_height]
37
-
38
38
  opts.join(" ")
39
39
  end
40
40
 
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kristin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Nyström
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-04 00:00:00.000000000 Z
11
+ date: 2013-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: spoon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -110,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
124
  version: '0'
111
125
  requirements: []
112
126
  rubyforge_project:
113
- rubygems_version: 2.0.3
127
+ rubygems_version: 2.0.0
114
128
  signing_key:
115
129
  specification_version: 4
116
130
  summary: Convert PDF docs to beautiful HTML files without losing text or format. This