Skip to content

Commit

Permalink
Merge defd18b into 083dcb0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthutchinson committed Apr 19, 2015
2 parents 083dcb0 + defd18b commit 8c57261
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,7 @@ rvm:
- 1.9.3
- 2.0.0
- 2.1.5
- 2.2.1
- 2.2.2
- ruby-head

before_install:
Expand Down
20 changes: 20 additions & 0 deletions lib/core_ext/mini_magick/utilities.rb
@@ -0,0 +1,20 @@
# -*- encoding : utf-8 -*-
module CoreExt
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
end

# 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

MiniMagick.send(:include, CoreExt::MiniMagick::Utilities)
1 change: 1 addition & 0 deletions lib/lolcommits.rb
Expand Up @@ -3,6 +3,7 @@

require 'core_ext/class'
require 'mini_magick'
require 'core_ext/mini_magick/utilities'
require 'fileutils'
require 'git'
require 'open3'
Expand Down
2 changes: 1 addition & 1 deletion lolcommits.gemspec
Expand Up @@ -59,6 +59,6 @@ Gem::Specification.new do |s|

if RUBY_VERSION >= '1.9.3'
s.add_development_dependency('travis', '~> 1.7.4')
s.add_development_dependency('rubocop', '~> 0.28')
s.add_development_dependency('rubocop', '~> 0.30')
end
end

0 comments on commit 8c57261

Please sign in to comment.