rmagick 4.2.5 → 4.2.6

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19f12f1fe15653484cfee177ac21d5174d912918ef9bdf874b74b940a91cf5ba
4
- data.tar.gz: 9a187a8e989d9b0f984716a1bb5e8239e4e0d428de76f52cbbf56cbfb7c7e55a
3
+ metadata.gz: cd92f37d8a01928beb9e4b44c7f7712dab8b2307c42484253b179e474d363e47
4
+ data.tar.gz: 1faa1f97938450f4199f3019c7b6848efc7cf4a4e43aa06d218c81fad82e21fe
5
5
  SHA512:
6
- metadata.gz: d04c9a98d1004623c27fedda53f7f3d5de1ae7a9f938da386a803e6191d224e92bf71831bfc57ac946d45f4f2a820d1441fd3d19a8d78442d0046d7927819a13
7
- data.tar.gz: b05b1c15617eb186b65edc55b97c6c8b4f58f25249f1295378efaf1e40f7242f82c46e20389eecd914e62d3e5c7233e3dc0b0308897a3f5825dda0c1cbaec796
6
+ metadata.gz: 36585f543e7e3edb3f967524e8e6a498d0fb9059adb54e96652bb8ddf2772d51d43a183822dd32149fad24c48001de8073dfac9e7e4a3781fe1c8462c940407a
7
+ data.tar.gz: 19197353b30bf77c73267bf3d939149dc9e078938382d27e24cada606b0edf4c6c21fae0603d00742301a850f9a959f35fd86f1026b104ba342a990dfe887f9d
@@ -0,0 +1,14 @@
1
+ ARG RUBY_VERSION
2
+
3
+ FROM ruby:${RUBY_VERSION}
4
+
5
+ ARG IMAGEMAGICK_VERSION
6
+
7
+ RUN mkdir /setup
8
+ ADD *.sh /setup
9
+
10
+ ENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}
11
+
12
+ RUN /setup/setup-user.sh
13
+
14
+ WORKDIR /workspaces/rmagick
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "ImageMagick 6",
3
+ "build": {
4
+ "dockerfile": "../Dockerfile",
5
+ "args": {
6
+ "RUBY_VERSION": "3.1.2",
7
+ "IMAGEMAGICK_VERSION": "6.9.12-54"
8
+ }
9
+ },
10
+ "onCreateCommand": "/setup/setup-repo.sh"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "ImageMagick 7",
3
+ "build": {
4
+ "dockerfile": "../Dockerfile",
5
+ "args": {
6
+ "RUBY_VERSION": "3.1.2",
7
+ "IMAGEMAGICK_VERSION": "7.1.0-39"
8
+ }
9
+ },
10
+ "onCreateCommand": "/setup/setup-repo.sh"
11
+ }
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ apt-get update
5
+ apt-get install sudo
6
+
7
+ bash /workspaces/rmagick/before_install_linux.sh
8
+
9
+ cd /workspaces/rmagick
10
+ bundle install --path=vendor/bundle --jobs 4 --retry 3
@@ -0,0 +1,45 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ codespaces_bash="$(cat \
5
+ <<'EOF'
6
+ # Codespaces bash prompt theme
7
+ __bash_prompt() {
8
+ local userpart='`export XIT=$? \
9
+ && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \
10
+ && echo -n "\[\033[0;36m\][IM ${IMAGEMAGICK_VERSION}]" \
11
+ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
12
+ local gitbranch='`\
13
+ if [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
14
+ export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \
15
+ if [ "${BRANCH}" != "" ]; then \
16
+ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \
17
+ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \
18
+ echo -n " \[\033[1;33m\]✗"; \
19
+ fi \
20
+ && echo -n "\[\033[0;36m\]) "; \
21
+ fi; \
22
+ fi`'
23
+ local lightblue='\[\033[1;34m\]'
24
+ local removecolor='\[\033[0m\]'
25
+ PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ "
26
+ unset -f __bash_prompt
27
+ }
28
+ __bash_prompt
29
+
30
+ __show_notice() {
31
+ local __message="
32
+ \033[0;32mWelcome to Codespaces! You are using the pre-configured rmagick image.\033[0m
33
+
34
+ \033[0;35mTests can be executed with:\033[0m bundle exec rake
35
+ \033[0;35mCode style can be checked with:\033[0m STYLE_CHECKS=true bundle exec rubocop
36
+ "
37
+ echo -e "$__message"
38
+
39
+ unset -f __show_notice
40
+ }
41
+ __show_notice
42
+ EOF
43
+ )"
44
+
45
+ echo "${codespaces_bash}" >> "/root/.bashrc"
@@ -7,12 +7,15 @@ on:
7
7
  pull_request:
8
8
  workflow_dispatch:
9
9
 
10
+ permissions:
11
+ contents: read
12
+
10
13
  jobs:
11
14
  lint:
12
15
  runs-on: ubuntu-latest
13
16
  timeout-minutes: 20
14
17
  steps:
15
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
16
19
  - name: Set up Ruby 2.3
17
20
  uses: ruby/setup-ruby@master
18
21
  with:
@@ -31,12 +34,12 @@ jobs:
31
34
  imagemagick-version:
32
35
  - { full: 6.7.7-10, major-minor: '6.7' }
33
36
  - { full: 6.8.9-10, major-minor: '6.8' }
34
- - { full: 6.9.12-37, major-minor: '6.9' }
35
- - { full: 7.1.0-22, major-minor: '7.0' }
37
+ - { full: 6.9.12-56, major-minor: '6.9' }
38
+ - { full: 7.1.0-41, major-minor: '7.0' }
36
39
 
37
40
  name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
38
41
  steps:
39
- - uses: actions/checkout@v2
42
+ - uses: actions/checkout@v3
40
43
  - name: Set up Ruby ${{ matrix.ruby-version }}
41
44
  uses: ruby/setup-ruby@master
42
45
  with:
@@ -57,12 +60,12 @@ jobs:
57
60
  matrix:
58
61
  ruby-version: ['2.6', '2.7', '3.0', '3.1']
59
62
  imagemagick-version:
60
- - { full: 6.9.12-37, major-minor: '6.9' }
61
- - { full: 7.1.0-22, major-minor: '7.0' }
63
+ - { full: 6.9.12-56, major-minor: '6.9' }
64
+ - { full: 7.1.0-41, major-minor: '7.0' }
62
65
 
63
66
  name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
64
67
  steps:
65
- - uses: actions/checkout@v2
68
+ - uses: actions/checkout@v3
66
69
  - name: Set up Ruby ${{ matrix.ruby-version }}
67
70
  uses: ruby/setup-ruby@master
68
71
  with:
data/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## RMagick 4.2.6
7
+
8
+ Improvements
9
+
10
+ - Remove test_files to reduce gem package size (#1338)
11
+
12
+ Bug Fixes
13
+
14
+ - Guard against an empty rpath (#1333)
15
+ - Call GetImageDistortion instead of IsImagesEqual to fix the issue reported in #1342 (#1343)
16
+
6
17
  ## RMagick 4.2.5
7
18
 
8
19
  Bug Fixes
data/README.md CHANGED
@@ -197,6 +197,8 @@ export LD_LIBRARY_PATH=/usr/local/lib
197
197
  On Linux, see `ld(1)` and `ld.so(8)` for more information. On other operating
198
198
  systems, see the documentation for the dynamic loading facility.
199
199
 
200
+ This operation might not be required when you can use 4.2.5 or later.
201
+
200
202
  ### Segmentation fault
201
203
 
202
204
  Default stack size of your operating system might be too small. Try removing
@@ -41,7 +41,7 @@ build_imagemagick() {
41
41
  mkdir -p build-ImageMagick
42
42
 
43
43
  version=(${IMAGEMAGICK_VERSION//./ })
44
- wget "https://imagemagick.org/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
44
+ wget "https://imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
45
45
  tar -xf "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
46
46
  rm "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
47
47
  mv "ImageMagick-${IMAGEMAGICK_VERSION}" "${build_dir}"
@@ -19,7 +19,7 @@ export HOMEBREW_NO_AUTO_UPDATE=true
19
19
  brew install wget pkg-config ghostscript freetype jpeg little-cms2 libomp libpng libtiff liblqr libtool libxml2 zlib webp
20
20
 
21
21
  export LDFLAGS="-L/usr/local/opt/libxml2/lib -L/usr/local/opt/zlib/lib"
22
- export CPPFLAGS="-I/usr/local/opt/libxml2/include/libxml2 -I/usr/local/opt/zlib/include"
22
+ export CPPFLAGS="-I/usr/local/opt/libxml2/include -I/usr/local/opt/zlib/include"
23
23
 
24
24
  project_dir=$(pwd)
25
25
  build_dir="${project_dir}/build-ImageMagick/ImageMagick-${IMAGEMAGICK_VERSION}"
@@ -31,7 +31,7 @@ build_imagemagick() {
31
31
  mkdir -p build-ImageMagick
32
32
 
33
33
  version=(${IMAGEMAGICK_VERSION//./ })
34
- wget "https://imagemagick.org/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
34
+ wget "https://imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
35
35
  tar -xf "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
36
36
  rm "ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz"
37
37
  mv "ImageMagick-${IMAGEMAGICK_VERSION}" "${build_dir}"
@@ -69,11 +69,12 @@ module RMagick
69
69
 
70
70
  libdir = `pkg-config --libs-only-L #{$magick_package}`.chomp.sub('-L', '')
71
71
  ldflags = "#{ENV['LDFLAGS']} " + `pkg-config --libs #{$magick_package}`.chomp
72
+ rpath = libdir.empty? ? '' : "-Wl,-rpath,#{libdir}"
72
73
 
73
74
  # Save flags
74
75
  $CPPFLAGS = "#{ENV['CPPFLAGS']} " + `pkg-config --cflags #{$magick_package}`.chomp
75
76
  $LOCAL_LIBS = "#{ENV['LIBS']} " + `pkg-config --libs #{$magick_package}`.chomp
76
- $LDFLAGS = "#{ldflags} -Wl,-rpath,#{libdir}"
77
+ $LDFLAGS = "#{ldflags} #{rpath}"
77
78
 
78
79
  unless try_link("int main() { }")
79
80
  # if linker does not recognizes '-Wl,-rpath,somewhere' option, it revert to original option
@@ -5205,6 +5205,7 @@ Image_difference(VALUE self, VALUE other)
5205
5205
  Image *image2;
5206
5206
  VALUE mean, nmean, nmax;
5207
5207
  #if defined(IMAGEMAGICK_7)
5208
+ double distortion;
5208
5209
  ExceptionInfo *exception;
5209
5210
  #endif
5210
5211
 
@@ -5214,7 +5215,7 @@ Image_difference(VALUE self, VALUE other)
5214
5215
 
5215
5216
  #if defined(IMAGEMAGICK_7)
5216
5217
  exception = AcquireExceptionInfo();
5217
- IsImagesEqual(image, image2, exception);
5218
+ GetImageDistortion(image, image2, MeanErrorPerPixelErrorMetric, &distortion, exception);
5218
5219
  CHECK_EXCEPTION();
5219
5220
  DestroyExceptionInfo(exception);
5220
5221
  #else
@@ -1,5 +1,5 @@
1
1
  module Magick
2
- VERSION = '4.2.5'
2
+ VERSION = '4.2.6'
3
3
  MIN_RUBY_VERSION = '2.3.0'
4
4
  MIN_IM_VERSION = '6.7.7'
5
5
  end
data/rmagick.gemspec CHANGED
@@ -15,11 +15,9 @@ Gem::Specification.new do |s|
15
15
 
16
16
  tracked_files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
17
17
  file_exclusion_regex = %r{\A(doc|benchmarks|examples|spec|lib/rvg/to_c.rb)}
18
- files = tracked_files.reject { |file| file[file_exclusion_regex] }
19
- test_files = files.grep(%r{^(test|spec|features)/})
18
+ files = tracked_files.reject { |file| file[file_exclusion_regex] }
20
19
 
21
- s.files = files
22
- s.test_files = test_files
20
+ s.files = files
23
21
  s.require_paths << 'ext' << 'deprecated'
24
22
 
25
23
  s.extensions = %w[ext/RMagick/extconf.rb]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmagick
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.5
4
+ version: 4.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-04-05 00:00:00.000000000 Z
14
+ date: 2022-07-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: pry
@@ -147,6 +147,11 @@ extensions:
147
147
  extra_rdoc_files: []
148
148
  files:
149
149
  - ".codeclimate.yml"
150
+ - ".devcontainer/Dockerfile"
151
+ - ".devcontainer/ImageMagick6/devcontainer.json"
152
+ - ".devcontainer/ImageMagick7/devcontainer.json"
153
+ - ".devcontainer/setup-repo.sh"
154
+ - ".devcontainer/setup-user.sh"
150
155
  - ".editorconfig"
151
156
  - ".github/ISSUE_TEMPLATE.md"
152
157
  - ".github/workflows/ci.yml"