commit
3376ed0c4f
@ -0,0 +1,23 @@
|
|||||||
|
From ea9df8283b4d2c354f0f1887ea29f742913d44b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Tue, 5 Jun 2018 18:06:47 +0200
|
||||||
|
Subject: [PATCH] Fix test: Use smallcase for MiniMagick::Image#details
|
||||||
|
|
||||||
|
`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.
|
||||||
|
---
|
||||||
|
spec/lib/mini_magick/image_spec.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/spec/lib/mini_magick/image_spec.rb b/spec/lib/mini_magick/image_spec.rb
|
||||||
|
index 784d01a..b240516 100644
|
||||||
|
--- a/spec/lib/mini_magick/image_spec.rb
|
||||||
|
+++ b/spec/lib/mini_magick/image_spec.rb
|
||||||
|
@@ -420,7 +420,7 @@ def create(path = image_path)
|
||||||
|
it "returns a hash of verbose information" do
|
||||||
|
expect(subject.details["Format"]).to match /^JPEG/
|
||||||
|
if MiniMagick.cli == :imagemagick
|
||||||
|
- expect(subject.details["Channel depth"]["Red"]).to eq "8-bit"
|
||||||
|
+ expect(subject.details["Channel depth"]["red"]).to eq "8-bit"
|
||||||
|
expect(subject.details).to have_key("Background color")
|
||||||
|
expect(subject.details["Properties"]).to have_key("date:create")
|
||||||
|
else
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
From 0d6d7b630cf5971f2a2e3d27a50977d76ddbb9af Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Tue, 5 Jun 2018 18:37:50 +0200
|
||||||
|
Subject: [PATCH] Fix test: match new `identify` error message
|
||||||
|
|
||||||
|
[identify](https://linux.die.net/man/1/identify) changed output.
|
||||||
|
---
|
||||||
|
spec/lib/mini_magick/shell_spec.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/spec/lib/mini_magick/shell_spec.rb b/spec/lib/mini_magick/shell_spec.rb
|
||||||
|
index cb50a51..1389c18 100644
|
||||||
|
--- a/spec/lib/mini_magick/shell_spec.rb
|
||||||
|
+++ b/spec/lib/mini_magick/shell_spec.rb
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
stdout, stderr, status = subject.execute(%W[identify foo])
|
||||||
|
|
||||||
|
expect(stdout).to eq ""
|
||||||
|
- expect(stderr).to match("unable to open image 'foo'")
|
||||||
|
+ expect(stderr).to match(/identify: unable to open image `foo': No such file or directory/)
|
||||||
|
expect(status).to eq 1
|
||||||
|
end
|
||||||
|
|
||||||
BIN
mini_magick-4.8.0.gem
Normal file
BIN
mini_magick-4.8.0.gem
Normal file
Binary file not shown.
76
rubygem-mini_magick.spec
Normal file
76
rubygem-mini_magick.spec
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
%global gem_name mini_magick
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 4.8.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Manipulate images with minimal use of memory via ImageMagick
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/minimagick/minimagick
|
||||||
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
Source1: https://github.com/minimagick/minimagick/archive/v%{version}.tar.gz
|
||||||
|
# Use smallcase for MiniMagick::Image#details
|
||||||
|
# https://github.com/minimagick/minimagick/pull/454/
|
||||||
|
Patch0: mini_magick-4.8.0-Use-smallcase-for-Image-details-in-tests.patch
|
||||||
|
# Match new `identify` error message
|
||||||
|
# https://github.com/minimagick/minimagick/pull/455/
|
||||||
|
Patch1: mini_magick-4.8.0-match-new-identify-error-message-in-tests.patch
|
||||||
|
Requires: ImageMagick
|
||||||
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(webmock) ImageMagick
|
||||||
|
BuildArch: noarch
|
||||||
|
%description
|
||||||
|
A ruby wrapper for ImageMagick command line. Using MiniMagick the ruby
|
||||||
|
processes memory remains small (it spawns ImageMagick's command line program
|
||||||
|
mogrify which takes up some memory as well, but is much smaller compared
|
||||||
|
to RMagick).
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{gem_name}-%{version}
|
||||||
|
ln -s minimagick-%{version}/spec spec
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -a .%{gem_dir}/* \
|
||||||
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
tar xzvf %{SOURCE1}
|
||||||
|
cat %{PATCH0} | patch -p1
|
||||||
|
cat %{PATCH1} | patch -p1
|
||||||
|
sed -i -e '/require "pry"/ s/^/#/g' \
|
||||||
|
-e '/require "bundler/ s/^/#/g' \
|
||||||
|
spec/spec_helper.rb
|
||||||
|
sed -i -e '/^ \[:imagemagick, :graphicsmagick\].each do |cli|$/ s/, :graphicsmagick//g' \
|
||||||
|
-e '/^ \["open3", "posix-spawn"\].each do |shell_api|$/ s/, "posix-spawn"//g' \
|
||||||
|
spec/spec_helper.rb
|
||||||
|
sed -i '/^ it "identifies when gm exists" do$/,/ end/ s/^/#/g' \
|
||||||
|
spec/lib/mini_magick/utilities_spec.rb
|
||||||
|
sed -i "/^ it \"returns GraphicsMagick's version\" do$/,/ end/ s/^/#/g" \
|
||||||
|
spec/lib/mini_magick_spec.rb
|
||||||
|
rspec spec
|
||||||
|
popd
|
||||||
|
|
||||||
|
%files
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%license %{gem_instdir}/MIT-LICENSE
|
||||||
|
%{gem_libdir}
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%{gem_instdir}/Rakefile
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 4.8.0-1
|
||||||
|
- package init
|
||||||
4
rubygem-mini_magick.yaml
Normal file
4
rubygem-mini_magick.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control:github
|
||||||
|
src_repo:/minimagick/minimagick
|
||||||
|
tag_prefix:"v"
|
||||||
|
seperator:"."
|
||||||
BIN
v4.8.0.tar.gz
Normal file
BIN
v4.8.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user