Hello community,
here is the log from the commit of package rubygem-mini_magick for
openSUSE:Factory checked in at 2017-08-21 11:36:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mini_magick (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mini_magick.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mini_magick"
Mon Aug 21 11:36:42 2017 rev:5 rq:515054 version:4.8.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mini_magick/rubygem-mini_magick.changes
2017-07-10 11:07:08.530347313 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-mini_magick.new/rubygem-mini_magick.changes
2017-08-21 11:36:49.939949139 +0200
@@ -1,0 +2,6 @@
+Thu Aug 3 19:26:32 UTC 2017 - [email protected]
+
+- updated to version 4.8.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
mini_magick-4.7.1.gem
New:
----
mini_magick-4.8.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mini_magick.spec ++++++
--- /var/tmp/diff_new_pack.0QoSFW/_old 2017-08-21 11:36:51.171775894 +0200
+++ /var/tmp/diff_new_pack.0QoSFW/_new 2017-08-21 11:36:51.191773082 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-mini_magick
-Version: 4.7.1
+Version: 4.8.0
Release: 0
%define mod_name mini_magick
%define mod_full_name %{mod_name}-%{version}
++++++ mini_magick-4.7.1.gem -> mini_magick-4.8.0.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/image.rb new/lib/mini_magick/image.rb
--- old/lib/mini_magick/image.rb 2017-06-15 13:23:17.000000000 +0200
+++ new/lib/mini_magick/image.rb 2017-07-06 11:51:11.000000000 +0200
@@ -76,9 +76,12 @@
# @param path_or_url [String] Either a local file path or a URL that
# open-uri can read
# @param ext [String] Specify the extension you want to read it as
+ # @param options [Hash] Specify options for the open method
# @return [MiniMagick::Image] The loaded image
#
- def self.open(path_or_url, ext = nil)
+ def self.open(path_or_url, ext = nil, options = {})
+ options, ext = ext, nil if ext.is_a?(Hash)
+
ext ||=
if File.exist?(path_or_url)
File.extname(path_or_url)
@@ -88,7 +91,7 @@
ext.sub!(/:.*/, '') # hack for filenames or URLs that include a colon
- Kernel.open(path_or_url, "rb") do |file|
+ Kernel.open(path_or_url, "rb", options) do |file|
read(file, ext)
end
end
@@ -343,11 +346,14 @@
#
# @return [Array] Matrix of each color of each pixel
def get_pixels
- output = MiniMagick::Tool::Convert.new do |convert|
- convert << path
- convert.depth(8)
- convert << "RGB:-"
- end
+ convert = MiniMagick::Tool::Convert.new
+ convert << path
+ convert.depth(8)
+ convert << "RGB:-"
+
+ # Do not use `convert.call` here. We need the whole binary (unstripped)
output here.
+ shell = MiniMagick::Shell.new
+ output, * = shell.run(convert.command)
pixels_array = output.unpack("C*")
pixels = pixels_array.each_slice(3).each_slice(width).to_a
@@ -555,13 +561,7 @@
end
def mogrify(page = nil)
- MiniMagick::Tool::Mogrify.new do |builder|
- builder.instance_eval do
- def format(*args)
- fail NoMethodError,
- "you must call #format on a MiniMagick::Image directly"
- end
- end
+ MiniMagick::Tool::MogrifyRestricted.new do |builder|
yield builder if block_given?
builder << (page ? "#{path}[#{page}]" : path)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mini_magick/tool/mogrify_restricted.rb
new/lib/mini_magick/tool/mogrify_restricted.rb
--- old/lib/mini_magick/tool/mogrify_restricted.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/lib/mini_magick/tool/mogrify_restricted.rb 2017-07-06
11:51:11.000000000 +0200
@@ -0,0 +1,15 @@
+require "mini_magick/tool/mogrify"
+
+module MiniMagick
+ class Tool
+ ##
+ # @see http://www.imagemagick.org/script/mogrify.php
+ #
+ class MogrifyRestricted < Mogrify
+ def format(*args)
+ fail NoMethodError,
+ "you must call #format on a MiniMagick::Image directly"
+ 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-06-15 13:23:17.000000000 +0200
+++ new/lib/mini_magick/tool.rb 2017-07-06 11:51:11.000000000 +0200
@@ -92,7 +92,7 @@
stdout, stderr, status = shell.run(command, options)
yield stdout, stderr, status if block_given?
- stdout.strip
+ stdout.chomp("\n")
end
##
@@ -286,5 +286,6 @@
require "mini_magick/tool/identify"
require "mini_magick/tool/import"
require "mini_magick/tool/mogrify"
+require "mini_magick/tool/mogrify_restricted"
require "mini_magick/tool/montage"
require "mini_magick/tool/stream"
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-06-15 13:23:17.000000000 +0200
+++ new/lib/mini_magick/version.rb 2017-07-06 11:51:11.000000000 +0200
@@ -8,8 +8,8 @@
module VERSION
MAJOR = 4
- MINOR = 7
- TINY = 1
+ MINOR = 8
+ TINY = 0
PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2017-06-15 13:23:17.000000000 +0200
+++ new/metadata 2017-07-06 11:51:11.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: mini_magick
version: !ruby/object:Gem::Version
- version: 4.7.1
+ version: 4.8.0
platform: ruby
authors:
- Corey Johnson
@@ -13,7 +13,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2017-06-15 00:00:00.000000000 Z
+date: 2017-07-06 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake
@@ -129,6 +129,7 @@
- lib/mini_magick/tool/identify.rb
- lib/mini_magick/tool/import.rb
- lib/mini_magick/tool/mogrify.rb
+- lib/mini_magick/tool/mogrify_restricted.rb
- lib/mini_magick/tool/montage.rb
- lib/mini_magick/tool/stream.rb
- lib/mini_magick/utilities.rb