rmagick 4.2.5 → 4.3.0

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: baffdb83618f956f81c5e8bf81873465642c2727f279514d416553b092590086
4
+ data.tar.gz: 2d65e812017b48d555ad5e0865b24074910f495e2ef94b9c70e9b7a53980acb6
5
5
  SHA512:
6
- metadata.gz: d04c9a98d1004623c27fedda53f7f3d5de1ae7a9f938da386a803e6191d224e92bf71831bfc57ac946d45f4f2a820d1441fd3d19a8d78442d0046d7927819a13
7
- data.tar.gz: b05b1c15617eb186b65edc55b97c6c8b4f58f25249f1295378efaf1e40f7242f82c46e20389eecd914e62d3e5c7233e3dc0b0308897a3f5825dda0c1cbaec796
6
+ metadata.gz: 6040c8ff49d8eb0441b4ebd8fe2c30de695c28f95d17f4475851eae564e25383558f6588595b6e21d887c8edf20965b4f4a8587122925be8ffdac702bdecb4af
7
+ data.tar.gz: 2012804b6a11228f960c89d8b3748e7917a9faa7ea8d717d18327f2ef3c3d390c1e892e9980c9d909d6bdf9a7594a0987c87797872043ab45775443d080b3df2
@@ -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-59"
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-44"
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-59, major-minor: '6.9' }
38
+ - { full: 7.1.0-44, 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-59, major-minor: '6.9' }
64
+ - { full: 7.1.0-44, 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,26 @@
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.3.0
7
+
8
+ Deprecates
9
+
10
+ - Mark Magick.trace_proc= as deprecated (#1354)
11
+ - Mark Magick::{Image, Image::Info}#monitor= as deprecated (#1353)
12
+
13
+ These methods will be removed in RMagick 5.0 and no alternative.
14
+
15
+ ## RMagick 4.2.6
16
+
17
+ Improvements
18
+
19
+ - Remove test_files to reduce gem package size (#1338)
20
+
21
+ Bug Fixes
22
+
23
+ - Guard against an empty rpath (#1333)
24
+ - Call GetImageDistortion instead of IsImagesEqual to fix the issue reported in #1342 (#1343)
25
+
6
26
  ## RMagick 4.2.5
7
27
 
8
28
  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}"
@@ -16,10 +16,10 @@ if [ ! -v IMAGEMAGICK_VERSION ]; then
16
16
  fi
17
17
 
18
18
  export HOMEBREW_NO_AUTO_UPDATE=true
19
- brew install wget pkg-config ghostscript freetype jpeg little-cms2 libomp libpng libtiff liblqr libtool libxml2 zlib webp
19
+ brew install wget pkg-config ghostscript freetype jpeg little-cms2 libomp libpng libtiff liblqr libtool 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
@@ -9203,12 +9204,15 @@ Image_modulate(int argc, VALUE *argv, VALUE self)
9203
9204
  * print "%s is %3.0f%% complete.\n", method, (offset.to_f/span)*100)
9204
9205
  * true
9205
9206
  * end
9207
+ * @deprecated Magick::Image#monitor= is deprecated. This method will be removed in RMagick 5.0.
9206
9208
  */
9207
9209
  VALUE
9208
9210
  Image_monitor_eq(VALUE self, VALUE monitor)
9209
9211
  {
9210
9212
  Image *image = rm_check_frozen(self);
9211
9213
 
9214
+ rb_warning("Magick::Image#monitor= is deprecated. This method will be removed in RMagick 5.0.");
9215
+
9212
9216
  if (NIL_P(monitor))
9213
9217
  {
9214
9218
  image->progress_monitor = NULL;
data/ext/RMagick/rminfo.c CHANGED
@@ -1560,6 +1560,7 @@ Info_matte_color_eq(VALUE self, VALUE matte_arg)
1560
1560
  * @param monitor [Proc] the monitor
1561
1561
  * @return [Proc] monitor
1562
1562
  * @see Image#monitor=
1563
+ * @deprecated Magick::Image::Info#monitor= is deprecated. This method will be removed in RMagick 5.0.
1563
1564
  */
1564
1565
  VALUE
1565
1566
  Info_monitor_eq(VALUE self, VALUE monitor)
@@ -1568,6 +1569,8 @@ Info_monitor_eq(VALUE self, VALUE monitor)
1568
1569
 
1569
1570
  Data_Get_Struct(self, Info, info);
1570
1571
 
1572
+ rb_warning("Magick::Image::Info#monitor= is deprecated. This method will be removed in RMagick 5.0.");
1573
+
1571
1574
  if (NIL_P(monitor))
1572
1575
  {
1573
1576
  info->progress_monitor = NULL;
@@ -1,5 +1,5 @@
1
1
  module Magick
2
- VERSION = '4.2.5'
2
+ VERSION = '4.3.0'
3
3
  MIN_RUBY_VERSION = '2.3.0'
4
4
  MIN_IM_VERSION = '6.7.7'
5
5
  end
@@ -83,7 +83,11 @@ module Magick
83
83
  # Magick.trace_proc = proc do |which, description, id, method|
84
84
  # ...
85
85
  # end
86
+ #
87
+ # @deprecated Magick.trace_proc= is deprecated. This method will be removed in RMagick 5.0.
86
88
  def trace_proc=(p)
89
+ warn 'Magick.trace_proc= is deprecated. This method will be removed in RMagick 5.0.'
90
+
87
91
  if @trace_proc.nil? && !p.nil? && !@exit_block_set_up
88
92
  at_exit { @trace_proc = nil }
89
93
  @exit_block_set_up = true
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.3.0
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-09-23 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/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"