imgkit 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/imgkit.gemspec +1 -0
- data/lib/imgkit.rb +1 -1
- data/lib/imgkit/imgkit.rb +1 -11
- data/lib/imgkit/version.rb +1 -1
- metadata +17 -5
data/imgkit.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.post_install_message = File.read('POST_INSTALL')
|
15
15
|
|
16
16
|
s.rubyforge_project = "imgkit"
|
17
|
+
s.add_dependency "open4"
|
17
18
|
|
18
19
|
s.files = `git ls-files`.split("\n")
|
19
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/imgkit.rb
CHANGED
data/lib/imgkit/imgkit.rb
CHANGED
@@ -65,19 +65,9 @@ class IMGKit
|
|
65
65
|
def to_img
|
66
66
|
append_stylesheets
|
67
67
|
|
68
|
-
=begin Need to use Open3 b.c wkhtmltoimage has to --quiet option
|
69
|
-
and we need to slience $stderr
|
70
|
-
image = Kernel.open('|-', "w+")
|
71
|
-
exec(*command) if image.nil?
|
72
|
-
image.puts(@source.to_s) if @source.html?
|
73
|
-
image.close_write
|
74
|
-
result = image.gets(nil)
|
75
|
-
image.close_read
|
76
|
-
=end
|
77
|
-
|
78
68
|
result = nil
|
79
69
|
stderr_output = nil
|
80
|
-
|
70
|
+
Open4.popen4(*command) do |pid,stdin,stdout,stderr|
|
81
71
|
stdin << (@source.to_s) if @source.html?
|
82
72
|
stdin.close
|
83
73
|
result = stdout.gets(nil)
|
data/lib/imgkit/version.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 1.0.2
|
9
|
+
version: 1.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- csquared
|
@@ -14,10 +14,22 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-04-
|
17
|
+
date: 2011-04-26 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: open4
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
21
33
|
description: Uses wkhtmltoimage to create Images using HTML
|
22
34
|
email: christopher.continanza@gmail.com
|
23
35
|
executables:
|