mini_magick 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mini_magick might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7813127461ce5e5ca5f48e6a502672535afd76d4
4
- data.tar.gz: e82edbba8bb1af4fc07103cbaea62430f03fbb3f
3
+ metadata.gz: f4305ecb6d70854a5e0d8108ea344872224b2d81
4
+ data.tar.gz: 71e89af4b6640415d8d0f883b2ecbd660235493b
5
5
  SHA512:
6
- metadata.gz: 0fee195089d16cd7e8f3ac7b034c1569a7f353116966000698f18153f7c0fa5a4b71b2620375b460d02497521c5d275f68072e8b4960bfc87f9df64c0d2b2014
7
- data.tar.gz: da4fbde0cffd34084dd50340d4c8e8e51f5b26773b77370f856cc7aeb814e78ca605c053a055b54437bb9127e9c1fc0f631fd0eba581ca8e0b41d0b24217b5a5
6
+ metadata.gz: 7be3875ffe3ea305e0c4a87fa41644094240f7b3c1675c7d5c552f866a7d7ffdb56fecbc962974756e9eb91326c27917bddb57b06121e90161b9ca4b25204d52
7
+ data.tar.gz: 116882e54bd0f9734a5eae2535b16c816073be328dd494ccece1714c7d7db3f4840d1df456bea8baded535e13b09faaff528c3790c0737485019ffe1ba0b61ef
data/lib/mini_gmagick.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  require 'mini_magick'
2
2
 
3
- MiniMagick.processor = :graphicsmagick
3
+ MiniMagick.processor = :gm
@@ -63,9 +63,18 @@ module MiniMagick
63
63
  #
64
64
  attr_accessor :validate_on_write
65
65
 
66
+ ##
67
+ # If set to `false`, it will not raise errors when ImageMagick returns
68
+ # status code different than 0. Defaults to `true`.
69
+ #
70
+ # @return [Boolean]
71
+ #
72
+ attr_accessor :whiny
73
+
66
74
  def self.extended(base)
67
75
  base.validate_on_create = true
68
76
  base.validate_on_write = true
77
+ base.whiny = true
69
78
  end
70
79
 
71
80
  ##
@@ -103,6 +112,8 @@ module MiniMagick
103
112
  case processor.to_s
104
113
  when "mogrify" then :imagemagick
105
114
  when "gm" then :graphicsmagick
115
+ else
116
+ raise MiniMagick::Error, "ImageMagick/GraphicsMagick is not installed"
106
117
  end
107
118
  end
108
119
 
@@ -405,7 +405,7 @@ module MiniMagick
405
405
  builder << output_to
406
406
  end
407
407
  else
408
- FileUtils.copy_file path, output_to
408
+ FileUtils.copy_file path, output_to unless path == output_to.to_s
409
409
  end
410
410
  else
411
411
  IO.copy_stream File.open(path, "rb"), output_to
@@ -65,7 +65,7 @@ module MiniMagick
65
65
  # MiniMagick::Tool::Identify.new(false) do |identify|
66
66
  # identify.help # returns exit status 1, which would otherwise throw an error
67
67
  # end
68
- def initialize(name, whiny = true)
68
+ def initialize(name, whiny = MiniMagick.whiny)
69
69
  @name = name
70
70
  @whiny = whiny
71
71
  @args = []
@@ -9,7 +9,7 @@ module MiniMagick
9
9
  module VERSION
10
10
  MAJOR = 4
11
11
  MINOR = 0
12
- TINY = 1
12
+ TINY = 2
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_magick
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Johnson
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-11-23 00:00:00.000000000 Z
15
+ date: 2015-01-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -97,8 +97,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - You must have ImageMagick or GraphicsMagick installed
99
99
  rubyforge_project:
100
- rubygems_version: 2.2.2
100
+ rubygems_version: 2.4.5
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Manipulate images with minimal use of memory via ImageMagick / GraphicsMagick
104
104
  test_files: []
105
+ has_rdoc: