favicon_maker 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,6 +31,8 @@ module FaviconMaker
31
31
  colorspace_conv = ["RGB", "sRGB"]
32
32
  colorspace_conv.reverse! if switch_colorspace
33
33
 
34
+ is_windows = (RbConfig::CONFIG['host_os'].match /mswin|mingw|cygwin/)
35
+
34
36
  options = {
35
37
  :versions => ICON_VERSIONS.keys,
36
38
  :custom_versions => {},
@@ -71,8 +73,9 @@ module FaviconMaker
71
73
  image.write output_file
72
74
  when :ico
73
75
  ico_cmd = "convert #{input_file} -colorspace #{colorspace_conv.first} "
76
+ escapes = "\\" unless is_windows
74
77
  sizes.split(',').sort_by{|s| s.split('x')[0].to_i}.each do |size|
75
- ico_cmd << "\\( -clone 0 -colors 256 -resize #{size} \\) "
78
+ ico_cmd << "#{escapes}( -clone 0 -colors 256 -resize #{size} #{escapes}) "
76
79
  end
77
80
  ico_cmd << "-delete 0 -colors 256 -colorspace #{colorspace_conv.last} #{File.join(output_path, version[:filename])}"
78
81
  puts `#{ico_cmd}`
@@ -1,3 +1,3 @@
1
1
  module FaviconMaker
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: favicon_maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: