Commit 0d93e0f0 by aboutqx Committed by Mike Burns

add is_windows to option

parent 76a33f05
...@@ -98,6 +98,7 @@ module Paperclip ...@@ -98,6 +98,7 @@ module Paperclip
swallow_stderr: true, swallow_stderr: true,
use_exif_orientation: true, use_exif_orientation: true,
whiny: true, whiny: true,
is_windows: Gem.win_platform?
} }
end end
......
...@@ -17,7 +17,7 @@ module Paperclip ...@@ -17,7 +17,7 @@ module Paperclip
orientation = Paperclip.options[:use_exif_orientation] ? orientation = Paperclip.options[:use_exif_orientation] ?
"%[exif:orientation]" : "1" "%[exif:orientation]" : "1"
Paperclip.run( Paperclip.run(
Gem.win_platform? ? "magick identify" : "identify", Paperclip.options[:is_windows] ? "magick identify" : "identify",
"-format '%wx%h,#{orientation}' :file", { "-format '%wx%h,#{orientation}' :file", {
:file => "#{path}[0]" :file => "#{path}[0]"
}, { }, {
......
...@@ -38,7 +38,7 @@ module Paperclip ...@@ -38,7 +38,7 @@ module Paperclip
# See Paperclip.run for the available options. # See Paperclip.run for the available options.
def convert(arguments = "", local_options = {}) def convert(arguments = "", local_options = {})
Paperclip.run( Paperclip.run(
Gem.win_platform ? "magick convert" : "convert", Paperclip.options[:is_windows] ? "magick convert" : "convert",
arguments, arguments,
local_options, local_options,
) )
...@@ -48,7 +48,7 @@ module Paperclip ...@@ -48,7 +48,7 @@ module Paperclip
# See Paperclip.run for the available options. # See Paperclip.run for the available options.
def identify(arguments = "", local_options = {}) def identify(arguments = "", local_options = {})
Paperclip.run( Paperclip.run(
Gem.win_platform? ? "magick identify" : "identify", Paperclip.options[:is_windows] ? "magick identify" : "identify",
arguments, arguments,
local_options, local_options,
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment