mojo_magick 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- [:format, :depth, :size].each do |opt|
202
- self.send(opt, opts[opt].to_s) if opts[opt]
209
+ opts.each do |k,v|
210
+ send(k.to_s,v.to_s)
203
211
  end
204
- file MojoMagick::tempfile(data, opts)
212
+ tmpfile = MojoMagick::tempfile(data, opts)
213
+ file tmpfile
205
214
  end
206
215
 
207
216
  # Generic commands. Arguments will be formatted if necessary
@@ -1,3 +1,3 @@
1
1
  module MojoMagick
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
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.0
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.0
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