Hello community,

here is the log from the commit of package rubygem-mini_magick for 
openSUSE:Factory checked in at 2019-01-21 10:25:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mini_magick (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-mini_magick.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-mini_magick"

Mon Jan 21 10:25:20 2019 rev:6 rq:656366 version:4.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mini_magick/rubygem-mini_magick.changes  
2017-08-21 11:36:49.939949139 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-mini_magick.new.28833/rubygem-mini_magick.changes
       2019-01-21 10:25:23.909747656 +0100
@@ -1,0 +2,6 @@
+Sat Dec  8 16:25:11 UTC 2018 - Stephan Kulow <[email protected]>
+
+- updated to version 4.9.2
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  mini_magick-4.8.0.gem

New:
----
  mini_magick-4.9.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-mini_magick.spec ++++++
--- /var/tmp/diff_new_pack.QiUksL/_old  2019-01-21 10:25:24.753746729 +0100
+++ /var/tmp/diff_new_pack.QiUksL/_new  2019-01-21 10:25:24.757746725 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-mini_magick
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-mini_magick
-Version:        4.8.0
+Version:        4.9.2
 Release:        0
 %define mod_name mini_magick
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 Url:            https://github.com/minimagick/minimagick
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Manipulate images with minimal use of memory via ImageMagick /
 License:        MIT

++++++ mini_magick-4.8.0.gem -> mini_magick-4.9.2.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/configuration.rb 
new/lib/mini_magick/configuration.rb
--- old/lib/mini_magick/configuration.rb        2017-07-06 11:51:11.000000000 
+0200
+++ new/lib/mini_magick/configuration.rb        2018-09-21 16:25:11.000000000 
+0200
@@ -8,7 +8,7 @@
     # Set whether you want to use [ImageMagick](http://www.imagemagick.org) or
     # [GraphicsMagick](http://www.graphicsmagick.org).
     #
-    # @return [Symbol] `:imagemagick` or `:graphicsmagick`
+    # @return [Symbol] `:imagemagick`, `:imagemagick7`, or `:graphicsmagick`
     #
     attr_accessor :cli
     # @private (for backwards compatibility)
@@ -25,6 +25,17 @@
     attr_accessor :processor_path
 
     ##
+    # Adds a prefix to the CLI command.
+    # For example, you could use `firejail` to run all commands in a sandbox.
+    # Can be a string, or an array of strings.
+    # e.g. 'firejail', or ['firejail', '--force']
+    #
+    # @return [String]
+    # @return [Array<String>]
+    #
+    attr_accessor :cli_prefix
+
+    ##
     # If you don't want commands to take too long, you can set a timeout (in
     # seconds).
     #
@@ -102,8 +113,14 @@
       yield self
     end
 
+    CLI_DETECTION = {
+      imagemagick:    "mogrify",
+      graphicsmagick: "gm",
+      imagemagick7:   "magick",
+    }
+
     def processor
-      @processor ||= ["mogrify", "gm"].detect do |processor|
+      @processor ||= CLI_DETECTION.values.detect do |processor|
         MiniMagick::Utilities.which(processor)
       end
     end
@@ -111,29 +128,24 @@
     def processor=(processor)
       @processor = processor.to_s
 
-      unless ["mogrify", "gm"].include?(@processor)
+      unless CLI_DETECTION.value?(@processor)
         raise ArgumentError,
-          "processor has to be set to either \"mogrify\" or \"gm\"" \
+          "processor has to be set to either \"magick\", \"mogrify\" or 
\"gm\"" \
           ", was set to #{@processor.inspect}"
       end
     end
 
     def cli
-      @cli ||
-        case processor.to_s
-        when "mogrify" then :imagemagick
-        when "gm"      then :graphicsmagick
-        else
-          raise MiniMagick::Error, "ImageMagick/GraphicsMagick is not 
installed"
-        end
+      @cli || CLI_DETECTION.key(processor) or
+        fail MiniMagick::Error, "You must have ImageMagick or GraphicsMagick 
installed"
     end
 
     def cli=(value)
       @cli = value
 
-      if not [:imagemagick, :graphicsmagick].include?(@cli)
+      if not CLI_DETECTION.key?(@cli)
         raise ArgumentError,
-          "CLI has to be set to either :imagemagick or :graphicsmagick" \
+          "CLI has to be set to either :imagemagick, :imagemagick7 or 
:graphicsmagick" \
           ", was set to #{@cli.inspect}"
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/image/info.rb 
new/lib/mini_magick/image/info.rb
--- old/lib/mini_magick/image/info.rb   2017-07-06 11:51:11.000000000 +0200
+++ new/lib/mini_magick/image/info.rb   2018-09-21 16:25:11.000000000 +0200
@@ -91,7 +91,7 @@
             line = line.chomp("\n")
 
             case MiniMagick.cli
-            when :imagemagick
+            when :imagemagick, :imagemagick7
               if match = line.match(/^exif:/)
                 key, value = match.post_match.split("=", 2)
                 value = decode_comma_separated_ascii_characters(value) if 
ASCII_ENCODED_EXIF_KEYS.include?(key)
@@ -100,6 +100,7 @@
                 hash[hash.keys.last] << "\n#{line}"
               end
             when :graphicsmagick
+              next if line == "unknown"
               key, value = line.split("=", 2)
               value.gsub!("\\012", "\n") # convert "\012" characters to 
newlines
               hash[key] = value
@@ -119,7 +120,7 @@
       end
 
       def details
-        warn "[MiniMagick] MiniMagick::Image#details has been deprecated, as 
it was causing too many parsing errors. You should use MiniMagick::Image#data 
instead, which differs in a way that the keys are in camelcase." if 
MiniMagick.imagemagick?
+        warn "[MiniMagick] MiniMagick::Image#details has been deprecated, as 
it was causing too many parsing errors. You should use MiniMagick::Image#data 
instead, which differs in a way that the keys are in camelcase." if 
MiniMagick.imagemagick? || MiniMagick.imagemagick7?
 
         @info["details"] ||= (
           details_string = identify(&:verbose)
@@ -139,8 +140,8 @@
               next
             end
 
-            key, _, value = line.partition(/:[\s\n]/).map(&:strip)
-            hash = key_stack.inject(details_hash) { |hash, key| 
hash.fetch(key) }
+            key, _, value = line.partition(/:[\s]/).map(&:strip)
+            hash = key_stack.inject(details_hash) { |h, k| h.fetch(k) }
             if value.empty?
               hash[key] = {}
               key_stack.push key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/shell.rb new/lib/mini_magick/shell.rb
--- old/lib/mini_magick/shell.rb        2017-07-06 11:51:11.000000000 +0200
+++ new/lib/mini_magick/shell.rb        2018-09-21 16:25:11.000000000 +0200
@@ -38,38 +38,36 @@
     def execute_open3(command, options = {})
       require "open3"
 
-      in_w, out_r, err_r, subprocess_thread = Open3.popen3(*command)
+      # We would ideally use Open3.capture3, but it wouldn't allow us to
+      # terminate the command after timing out.
+      Open3.popen3(*command) do |in_w, out_r, err_r, thread|
+        [in_w, out_r, err_r].each(&:binmode)
+        stdout_reader = Thread.new { out_r.read }
+        stderr_reader = Thread.new { err_r.read }
+        begin
+          in_w.write options[:stdin].to_s
+        rescue Errno::EPIPE
+        end
+        in_w.close
+
+        begin
+          Timeout.timeout(MiniMagick.timeout) { thread.join }
+        rescue Timeout::Error
+          Process.kill("TERM", thread.pid) rescue nil
+          Process.waitpid(thread.pid)      rescue nil
+          raise Timeout::Error, "MiniMagick command timed out: #{command}"
+        end
 
-      capture_command(in_w, out_r, err_r, subprocess_thread, options)
+        [stdout_reader.value, stderr_reader.value, thread.value]
+      end
     end
 
     def execute_posix_spawn(command, options = {})
       require "posix-spawn"
-
-      pid, in_w, out_r, err_r = POSIX::Spawn.popen4(*command)
-      subprocess_thread = Process.detach(pid)
-
-      capture_command(in_w, out_r, err_r, subprocess_thread, options)
-    end
-
-    def capture_command(in_w, out_r, err_r, subprocess_thread, options)
-      [in_w, out_r, err_r].each(&:binmode)
-      stdout_reader = Thread.new { out_r.read }
-      stderr_reader = Thread.new { err_r.read }
-      begin
-        in_w.write options[:stdin].to_s
-      rescue Errno::EPIPE
-      end
-      in_w.close
-
-      Timeout.timeout(MiniMagick.timeout) { subprocess_thread.join }
-
-      [stdout_reader.value, stderr_reader.value, subprocess_thread.value]
-    rescue Timeout::Error => error
-      Process.kill("TERM", subprocess_thread.pid)
-      raise error
-    ensure
-      [out_r, err_r].each(&:close)
+      child = POSIX::Spawn::Child.new(*command, input: options[:stdin].to_s, 
timeout: MiniMagick.timeout)
+      [child.out, child.err, child.status]
+    rescue POSIX::Spawn::TimeoutExceeded
+      raise Timeout::Error, "MiniMagick command timed out: #{command}"
     end
 
     def log(command, &block)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/tool/magick.rb 
new/lib/mini_magick/tool/magick.rb
--- old/lib/mini_magick/tool/magick.rb  1970-01-01 01:00:00.000000000 +0100
+++ new/lib/mini_magick/tool/magick.rb  2018-09-21 16:25:12.000000000 +0200
@@ -0,0 +1,14 @@
+module MiniMagick
+  class Tool
+    ##
+    # @see http://www.imagemagick.org/script/command-line-processing.php
+    #
+    class Magick < MiniMagick::Tool
+
+      def initialize(*args)
+        super("magick", *args)
+      end
+
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/tool.rb new/lib/mini_magick/tool.rb
--- old/lib/mini_magick/tool.rb 2017-07-06 11:51:11.000000000 +0200
+++ new/lib/mini_magick/tool.rb 2018-09-21 16:25:11.000000000 +0200
@@ -15,10 +15,8 @@
   #
   class Tool
 
-    CREATION_OPERATORS = %w[
-      xc canvas logo rose gradient radial-gradient plasma pattern label caption
-      text
-    ]
+    CREATION_OPERATORS = %w[xc canvas logo rose gradient radial-gradient plasma
+                            pattern text pango]
 
     ##
     # Aside from classic instantiation, it also accepts a block, and then
@@ -112,7 +110,8 @@
 
     ##
     # The executable used for this tool. Respects
-    # {MiniMagick::Configuration#cli} and {MiniMagick::Configuration#cli_path}.
+    # {MiniMagick::Configuration#cli}, {MiniMagick::Configuration#cli_path},
+    # and {MiniMagick::Configuration#cli_prefix}.
     #
     # @return [Array<String>]
     #
@@ -121,10 +120,20 @@
     #   identify = MiniMagick::Tool::Identify.new
     #   identify.executable #=> ["gm", "identify"]
     #
+    # @example
+    #   MiniMagick.configure do |config|
+    #     config.cli = :graphicsmagick
+    #     config.cli_prefix = ['firejail', '--force']
+    #   end
+    #   identify = MiniMagick::Tool::Identify.new
+    #   identify.executable #=> ["firejail", "--force", "gm", "identify"]
+    #
     def executable
       exe = [name]
+      exe.unshift "magick" if MiniMagick.imagemagick7? && name != "magick"
       exe.unshift "gm" if MiniMagick.graphicsmagick?
       exe.unshift File.join(MiniMagick.cli_path, exe.shift) if 
MiniMagick.cli_path
+      Array(MiniMagick.cli_prefix).reverse_each { |p| exe.unshift p } if 
MiniMagick.cli_prefix
       exe
     end
 
@@ -285,6 +294,7 @@
 require "mini_magick/tool/display"
 require "mini_magick/tool/identify"
 require "mini_magick/tool/import"
+require "mini_magick/tool/magick"
 require "mini_magick/tool/mogrify"
 require "mini_magick/tool/mogrify_restricted"
 require "mini_magick/tool/montage"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick/version.rb 
new/lib/mini_magick/version.rb
--- old/lib/mini_magick/version.rb      2017-07-06 11:51:11.000000000 +0200
+++ new/lib/mini_magick/version.rb      2018-09-21 16:25:12.000000000 +0200
@@ -8,8 +8,8 @@
 
   module VERSION
     MAJOR = 4
-    MINOR = 8
-    TINY  = 0
+    MINOR = 9
+    TINY  = 2
     PRE   = nil
 
     STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/mini_magick.rb new/lib/mini_magick.rb
--- old/lib/mini_magick.rb      2017-07-06 11:51:11.000000000 +0200
+++ new/lib/mini_magick.rb      2018-09-21 16:25:11.000000000 +0200
@@ -31,6 +31,14 @@
   end
 
   ##
+  # Checks whether the CLI used is ImageMagick 7.
+  #
+  # @return [Boolean]
+  def self.imagemagick7?
+    cli == :imagemagick7
+  end
+
+  ##
   # Checks whether the CLI used is GraphicsMagick.
   #
   # @return [Boolean]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-07-06 11:51:11.000000000 +0200
+++ new/metadata        2018-09-21 16:25:11.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: mini_magick
 version: !ruby/object:Gem::Version
-  version: 4.8.0
+  version: 4.9.2
 platform: ruby
 authors:
 - Corey Johnson
@@ -13,7 +13,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-07-06 00:00:00.000000000 Z
+date: 2018-09-21 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -128,6 +128,7 @@
 - lib/mini_magick/tool/display.rb
 - lib/mini_magick/tool/identify.rb
 - lib/mini_magick/tool/import.rb
+- lib/mini_magick/tool/magick.rb
 - lib/mini_magick/tool/mogrify.rb
 - lib/mini_magick/tool/mogrify_restricted.rb
 - lib/mini_magick/tool/montage.rb
@@ -155,7 +156,7 @@
 requirements:
 - You must have ImageMagick or GraphicsMagick installed
 rubyforge_project: 
-rubygems_version: 2.6.11
+rubygems_version: 2.7.6
 signing_key: 
 specification_version: 4
 summary: Manipulate images with minimal use of memory via ImageMagick / 
GraphicsMagick


Reply via email to