Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from mroth/fix-windows-mini-magick-issue
fixing windows mini_magick escape issues
- Loading branch information
Showing
4 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ rvm: | |
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.5 | ||
- 2.2.1 | ||
- 2.2.2 | ||
- ruby-head | ||
|
||
before_install: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- encoding : utf-8 -*- | ||
# To maintain MiniMagick compatibility on Windows for v3.8.1 we need this patch | ||
# If/when we upgrade MiniMagick to 4.2+ this patch can be removed | ||
# We are locked at v3.8.1 since MiniMagick 4+ dropped support for Ruby 1.8.7 | ||
module MiniMagick | ||
module Utilities | ||
class << self | ||
# fixes issue introduced in this commit | ||
# https://github.com/minimagick/minimagick/commit/65b6427395cbfe6 | ||
def windows_escape(cmdline) | ||
'"' + cmdline.gsub(/\\(?=\\*\")/, '\\\\\\').gsub(/\"/, '\\"').gsub(/\\$/, '\\\\\\').gsub('%', '%%') + '"' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters