mini_magick 4.9.5 → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66e2c6af6925e0ecc26c917f270ff575986489977416754ecc89db3bbab04dee
4
- data.tar.gz: cac982bbd12f543f637dce9a6fc8ed9e6c2139f7010d9da82f53a510ef2e2525
3
+ metadata.gz: b659ce5ff8d7c13cde3bb32ef1d33faeffe96823f7cda0385001799a224f5362
4
+ data.tar.gz: 44d1c9205e7c72677333401c79c7014202065ca1ed90a397a7a78adf5fd9da32
5
5
  SHA512:
6
- metadata.gz: 03d841baabdc47d95a763010f113cfbc6d0acdf1ca8894e16c80bb86e307516b0f00da4c55617e5207360e4eb7bbb1e5268f5da62dabd4eb291da3d029354fdf
7
- data.tar.gz: 201f2187bedeb2db3157f15f611c026216b083b1e0174c67389a3a157976c0b887e211fc1e6bd2286736f27f04940f6c29586fd00d5079b6c2573e38a1739da4
6
+ metadata.gz: ff49d5ec4f216b01397ff1897fcfb820e8f223a5a992ed295209491643c1e3f3751a56b9271337083e44808265891e2a755568cdca17df7025f22ce080656a3c
7
+ data.tar.gz: 4b7adad8b9692dabecf26d86a3a61f45708fe8bd37a9580e2668b3a09b40d57d93ffca67c56404da2b738c4612ce1f786658fc92939682aedb7b67a17ea397a7
@@ -110,9 +110,9 @@ module MiniMagick
110
110
  end
111
111
 
112
112
  CLI_DETECTION = {
113
- imagemagick: "mogrify",
114
- graphicsmagick: "gm",
115
113
  imagemagick7: "magick",
114
+ graphicsmagick: "gm",
115
+ imagemagick: "mogrify",
116
116
  }
117
117
 
118
118
  # @private (for backwards compatibility)
@@ -102,7 +102,11 @@ module MiniMagick
102
102
  end
103
103
  ext.sub!(/:.*/, '') # hack for filenames or URLs that include a colon
104
104
 
105
- openable.open(options) { |file| read(file, ext) }
105
+ if openable.is_a?(URI::Generic)
106
+ openable.open(options) { |file| read(file, ext) }
107
+ else
108
+ openable.open(**options) { |file| read(file, ext) }
109
+ end
106
110
  end
107
111
 
108
112
  ##
@@ -583,5 +587,31 @@ module MiniMagick
583
587
  def layer?
584
588
  path =~ /\[\d+\]$/
585
589
  end
590
+
591
+ ##
592
+ # Compares if image width
593
+ # is greater than height
594
+ # ============
595
+ # | |
596
+ # | |
597
+ # ============
598
+ # @return [Boolean]
599
+ def landscape?
600
+ width > height
601
+ end
602
+
603
+ ##
604
+ # Compares if image height
605
+ # is greater than width
606
+ # ======
607
+ # | |
608
+ # | |
609
+ # | |
610
+ # | |
611
+ # ======
612
+ # @return [Boolean]
613
+ def portrait?
614
+ height > width
615
+ end
586
616
  end
587
617
  end
@@ -0,0 +1,18 @@
1
+ module MiniMagick
2
+ class Image
3
+ def initialize(source)
4
+ if source.is_a?(String) || source.is_a?(Pathname)
5
+ @source_path = source.to_s
6
+ elsif source.respond_to?(:path)
7
+ @source_path = source.path
8
+ else
9
+ fail ArgumentError, "invalid source object: #{source.inspect} (expected String, Pathname or #path)"
10
+ end
11
+ end
12
+
13
+ def method_missing
14
+ end
15
+ end
16
+ end
17
+
18
+ image = MiniMagick::Image.new()
@@ -8,8 +8,8 @@ module MiniMagick
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 9
12
- TINY = 5
11
+ MINOR = 10
12
+ TINY = 0
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.9.5
4
+ version: 4.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Johnson
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-07-18 00:00:00.000000000 Z
16
+ date: 2020-01-06 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rake
@@ -118,6 +118,7 @@ files:
118
118
  - lib/mini_magick/configuration.rb
119
119
  - lib/mini_magick/image.rb
120
120
  - lib/mini_magick/image/info.rb
121
+ - lib/mini_magick/immutable_image.rb
121
122
  - lib/mini_magick/shell.rb
122
123
  - lib/mini_magick/tool.rb
123
124
  - lib/mini_magick/tool/animate.rb
@@ -147,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
148
  requirements:
148
149
  - - ">="
149
150
  - !ruby/object:Gem::Version
150
- version: '0'
151
+ version: '2.0'
151
152
  required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  requirements:
153
154
  - - ">="
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  version: '0'
156
157
  requirements:
157
158
  - You must have ImageMagick or GraphicsMagick installed
158
- rubygems_version: 3.0.3
159
+ rubygems_version: 3.1.2
159
160
  signing_key:
160
161
  specification_version: 4
161
162
  summary: Manipulate images with minimal use of memory via ImageMagick / GraphicsMagick