Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
add is_windows to option
Browse files Browse the repository at this point in the history
  • Loading branch information
aboutqx authored and mike-burns committed May 25, 2018
1 parent 76a33f0 commit 0d93e0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def self.options
swallow_stderr: true,
use_exif_orientation: true,
whiny: true,
is_windows: Gem.win_platform?
}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/paperclip/geometry_detector_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def geometry_string
orientation = Paperclip.options[:use_exif_orientation] ?
"%[exif:orientation]" : "1"
Paperclip.run(
Gem.win_platform? ? "magick identify" : "identify",
Paperclip.options[:is_windows] ? "magick identify" : "identify",
"-format '%wx%h,#{orientation}' :file", {
:file => "#{path}[0]"
}, {
Expand Down
4 changes: 2 additions & 2 deletions lib/paperclip/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.make file, options = {}, attachment = nil
# See Paperclip.run for the available options.
def convert(arguments = "", local_options = {})
Paperclip.run(
Gem.win_platform ? "magick convert" : "convert",
Paperclip.options[:is_windows] ? "magick convert" : "convert",
arguments,
local_options,
)
Expand All @@ -48,7 +48,7 @@ def convert(arguments = "", local_options = {})
# See Paperclip.run for the available options.
def identify(arguments = "", local_options = {})
Paperclip.run(
Gem.win_platform? ? "magick identify" : "identify",
Paperclip.options[:is_windows] ? "magick identify" : "identify",
arguments,
local_options,
)
Expand Down

0 comments on commit 0d93e0f

Please sign in to comment.