mojo_magick 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mojo_magick.rb +12 -3
- data/lib/mojo_magick/version.rb +1 -1
- metadata +2 -2
data/lib/mojo_magick.rb
CHANGED
@@ -69,6 +69,7 @@ module MojoMagick
|
|
69
69
|
err_pipe = windows? ? "2>nul" : "2>/dev/null"
|
70
70
|
begin
|
71
71
|
execute = "#{command} #{get_limits_as_params} #{args} #{err_pipe}"
|
72
|
+
puts execute
|
72
73
|
retval = `#{execute}`
|
73
74
|
# guarantee that only MojoError exceptions are raised here
|
74
75
|
rescue Exception => e
|
@@ -195,13 +196,21 @@ module MojoMagick
|
|
195
196
|
alias files file
|
196
197
|
|
197
198
|
# Create a temporary file for the given image and add to command line
|
199
|
+
def format(*args)
|
200
|
+
@opts << '-format'
|
201
|
+
args.each do |arg|
|
202
|
+
add_formatted arg
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
198
206
|
def blob(*args)
|
199
207
|
data = args[0]
|
200
208
|
opts = args[1] || {}
|
201
|
-
|
202
|
-
|
209
|
+
opts.each do |k,v|
|
210
|
+
send(k.to_s,v.to_s)
|
203
211
|
end
|
204
|
-
|
212
|
+
tmpfile = MojoMagick::tempfile(data, opts)
|
213
|
+
file tmpfile
|
205
214
|
end
|
206
215
|
|
207
216
|
# Generic commands. Arguments will be formatted if necessary
|
data/lib/mojo_magick/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mojo_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve Midgley
|
@@ -73,7 +73,7 @@ rubyforge_project: mojo_magick
|
|
73
73
|
rubygems_version: 1.8.15
|
74
74
|
signing_key:
|
75
75
|
specification_version: 3
|
76
|
-
summary: mojo_magick-0.4.
|
76
|
+
summary: mojo_magick-0.4.1
|
77
77
|
test_files:
|
78
78
|
- test/fixtures/5742.jpg
|
79
79
|
- test/fixtures/not_an_image.jpg
|