rmagick 6.1.1 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cd337e9bbc5418733d68fb0b173aae4c8cf672e6184eff29d48cc5d959cc06b
4
- data.tar.gz: befad5f9253eb21d4002d26f640b3c9ef724079992513f50416f784e141ae19e
3
+ metadata.gz: 96745ee737289beea230f6938180f10253f9690f28c21a03b07ea7df164e5846
4
+ data.tar.gz: 8351b6da6dda4c130f02dbb277d51eb3fe7ba36bd79b01808fd01c35a2c94fc0
5
5
  SHA512:
6
- metadata.gz: 657c9b91d6c0294737254d219c096d778bbefdd49f281eb5ba8dca547aa2834aaaa671a8d35f9c759088878df296b7b0a165e4d8c2506f7d4a1b1928250ad85f
7
- data.tar.gz: b9b4938b08d4f0af87d09500e04164ece6da1e383449831d3f36491140fb8ffda46a18df552972061d932584e849776ad1f9d386a9354faf36f600138cec319d
6
+ metadata.gz: aaa120df0f261f860032f3246e6545e3bbe410dfe9af5ed4b9f134d0ac486f4fb39f7c1e5dcb0812b18fdd1ac58a4ebb19607165cdf9d4accbeae652adbc08b9
7
+ data.tar.gz: d93e71faffdbf46febc6f26701fac9fa87e2f48ab683aab3333455388a17bc7ebe8da23875cf37844e53b38530b5d6429e489cf392bb12b773184857f3e4fcf2
@@ -4,7 +4,7 @@
4
4
  "dockerfile": "../Dockerfile",
5
5
  "args": {
6
6
  "RUBY_VERSION": "3.3.3",
7
- "IMAGEMAGICK_VERSION": "6.9.13-17"
7
+ "IMAGEMAGICK_VERSION": "6.9.13-25"
8
8
  }
9
9
  },
10
10
  "onCreateCommand": "/setup/setup-repo.sh"
@@ -4,7 +4,7 @@
4
4
  "dockerfile": "Dockerfile",
5
5
  "args": {
6
6
  "RUBY_VERSION": "3.3.3",
7
- "IMAGEMAGICK_VERSION": "7.1.1-39"
7
+ "IMAGEMAGICK_VERSION": "7.1.1-47"
8
8
  }
9
9
  },
10
10
  "onCreateCommand": "/setup/setup-repo.sh"
@@ -0,0 +1,40 @@
1
+ name: Report
2
+ description: Create a report.
3
+ body:
4
+ - type: textarea
5
+ id: description
6
+ attributes:
7
+ label: Description
8
+ description: A description of the bug or feature.
9
+ validations:
10
+ required: true
11
+ - type: textarea
12
+ id: reproduce
13
+ attributes:
14
+ label: Steps to Reproduce
15
+ description: |
16
+ List of steps, sample code, failing test or link to a project that reproduces the behavior.
17
+ Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: environment
22
+ attributes:
23
+ label: System Configuration
24
+ description: Tell us about the environment where you are experiencing the bug.
25
+ value: |
26
+ - ImageMagick version:
27
+ - RMagick version:
28
+ - Ruby version:
29
+ - Environment (Operating system, version and so on):
30
+ - Additional information:
31
+ render: markdown
32
+ validations:
33
+ required: true
34
+ - type: textarea
35
+ id: addtional-context
36
+ attributes:
37
+ label: Additional context
38
+ description: Add any other context about the problem here.
39
+ validations:
40
+ required: false
@@ -82,8 +82,8 @@ jobs:
82
82
  matrix:
83
83
  ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
84
84
  imagemagick-version:
85
- - { full: 6.9.13-17, major-minor: '6.9' }
86
- - { full: 7.1.1-39, major-minor: '7.1' }
85
+ - { full: 6.9.13-25, major-minor: '6.9' }
86
+ - { full: 7.1.1-47, major-minor: '7.1' }
87
87
 
88
88
  name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
89
89
  steps:
@@ -115,8 +115,8 @@ jobs:
115
115
  matrix:
116
116
  ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
117
117
  imagemagick-version:
118
- - { full: 6.9.13-17, major-minor: '6.9' }
119
- - { full: 7.1.1-39, major-minor: '7.1' }
118
+ - { full: 6.9.13-25, major-minor: '6.9' }
119
+ - { full: 7.1.1-47, major-minor: '7.1' }
120
120
 
121
121
  name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
122
122
  steps:
@@ -141,19 +141,27 @@ jobs:
141
141
  bundle exec rake
142
142
 
143
143
  test-windows:
144
- runs-on: windows-latest
144
+ runs-on: ${{ matrix.os.target }}
145
145
  timeout-minutes: 20
146
146
  strategy:
147
147
  matrix:
148
148
  ruby-version: ['3.4']
149
149
  imagemagick-version:
150
- - { full: 6.9.13-17, major-minor: '6.9' }
151
- - { full: 7.1.1-39, major-minor: '7.1' }
150
+ - { full: 6.9.13-25, major-minor: '6.9' }
151
+ - { full: 7.1.1-47, major-minor: '7.1' }
152
+ os:
153
+ - { target: windows-latest, arch: 'x64' }
154
+ - { target: windows-11-arm, arch: 'arm64' }
155
+ exclude:
156
+ # ImageMagick 6 has not provided ARM binary. Ref. https://legacy.imagemagick.org/archive/binaries/
157
+ - imagemagick-version: { full: 6.9.13-25, major-minor: '6.9' }
158
+ os: { target: windows-11-arm, arch: 'arm64' }
159
+
152
160
  env:
153
- bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
154
- install_im_dir: D:\ImageMagick
161
+ bundled_im_dir: ${{ matrix.os.arch == 'x64' && 'C:\Program Files\ImageMagick-7.1.1-Q16-HDRI' || 'C:\Program Files (x86)\ImageMagick-7.1.1-Q16-HDRI' }}
162
+ install_im_dir: C:\ImageMagick
155
163
 
156
- name: MSWin, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
164
+ name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
157
165
  steps:
158
166
  - uses: actions/checkout@v4
159
167
  - name: Setup environment variable
@@ -171,7 +179,8 @@ jobs:
171
179
  # https://github.com/rmagick/ImageMagick-binaries
172
180
  run: |
173
181
  $imagemagick_version = "${{ matrix.imagemagick-version.full }}"
174
- $installer_name = "ImageMagick-$($imagemagick_version)-Q16-x64-dll.exe"
182
+ $arch = "${{ matrix.os.arch }}"
183
+ $installer_name = "ImageMagick-$($imagemagick_version)-Q16-$($arch)-dll.exe"
175
184
  $url = "https://github.com/rmagick/ImageMagick-binaries/raw/main/$($installer_name)"
176
185
  Invoke-WebRequest -Uri $url -OutFile $installer_name
177
186
  Start-Process -FilePath $installer_name -ArgumentList "/DIR=${{ env.install_im_dir }} /VERYSILENT /NORESTART /TASKS=install_Devel"
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from:
2
2
  - .rubocop_todo.yml
3
3
 
4
- require:
4
+ plugins:
5
5
  - rubocop-rspec
6
6
  - rubocop-performance
7
7
  - rubocop-on-rbs
@@ -23,9 +23,6 @@ AllCops:
23
23
  Layout/MultilineAssignmentLayout:
24
24
  EnforcedStyle: same_line
25
25
 
26
- RSpec/FilePath:
27
- CustomTransform: { Magick: rmagick }
28
-
29
26
  Style/FormatString:
30
27
  EnforcedStyle: sprintf
31
28
 
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2024-11-04 02:41:41 UTC using RuboCop version 1.68.0.
3
+ # on 2025-06-08 04:42:31 UTC using RuboCop version 1.76.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -79,7 +79,7 @@ Layout/MultilineMethodArgumentLineBreaks:
79
79
  Layout/RedundantLineBreak:
80
80
  Enabled: false
81
81
 
82
- # Offense count: 1911
82
+ # Offense count: 1912
83
83
  # This cop supports safe autocorrection (--autocorrect).
84
84
  Layout/SingleLineBlockChain:
85
85
  Enabled: false
@@ -120,7 +120,7 @@ Lint/ConstantDefinitionInBlock:
120
120
  Exclude:
121
121
  - 'Rakefile'
122
122
 
123
- # Offense count: 5522
123
+ # Offense count: 5523
124
124
  # Configuration parameters: Only, Ignore.
125
125
  Lint/ConstantResolution:
126
126
  Enabled: false
@@ -241,8 +241,9 @@ Naming/ClassAndModuleCamelCase:
241
241
  - 'lib/rmagick_internal.rb'
242
242
 
243
243
  # Offense count: 4
244
- # Configuration parameters: EnforcedStyle, AllowedPatterns.
244
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
245
245
  # SupportedStyles: snake_case, camelCase
246
+ # ForbiddenIdentifiers: __id__, __send__
246
247
  Naming/MethodName:
247
248
  Exclude:
248
249
  - 'lib/rvg/misc.rb'
@@ -269,25 +270,25 @@ Naming/MethodParameterName:
269
270
  - 'lib/rvg/transformable.rb'
270
271
  - 'lib/rvg/units.rb'
271
272
 
273
+ # Offense count: 2
274
+ # Configuration parameters: Mode, AllowedMethods.
275
+ # AllowedMethods: call
276
+ Naming/PredicateMethod:
277
+ Exclude:
278
+ - 'lib/rvg/deep_equal.rb'
279
+
272
280
  # Offense count: 432
273
281
  # Configuration parameters: CountAsOne.
274
282
  RSpec/ExampleLength:
275
283
  Max: 126
276
284
 
277
- # Offense count: 540
285
+ # Offense count: 541
278
286
  # This cop supports safe autocorrection (--autocorrect).
279
287
  # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
280
288
  # DisallowedExamples: works
281
289
  RSpec/ExampleWording:
282
290
  Enabled: false
283
291
 
284
- # Offense count: 1
285
- # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
286
- # Include: **/*_spec*rb*, **/spec/**/*
287
- RSpec/FilePath:
288
- Exclude:
289
- - 'spec/magick_spec.rb'
290
-
291
292
  # Offense count: 1
292
293
  RSpec/IdenticalEqualityAssertion:
293
294
  Exclude:
@@ -369,11 +370,10 @@ Style/ClassMethodsDefinitions:
369
370
  Style/CommentedKeyword:
370
371
  Enabled: false
371
372
 
372
- # Offense count: 128
373
+ # Offense count: 124
373
374
  # Configuration parameters: IgnoreModules.
374
375
  Style/ConstantVisibility:
375
376
  Exclude:
376
- - 'examples/histogram.rb'
377
377
  - 'ext/RMagick/extconf.rb'
378
378
  - 'lib/rmagick/version.rb'
379
379
  - 'lib/rmagick_internal.rb'
@@ -406,7 +406,7 @@ Style/FetchEnvVar:
406
406
 
407
407
  # Offense count: 191
408
408
  # This cop supports safe autocorrection (--autocorrect).
409
- # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
409
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
410
410
  # SupportedStyles: annotated, template, unannotated
411
411
  Style/FormatStringToken:
412
412
  EnforcedStyle: unannotated
@@ -457,7 +457,7 @@ Style/InvertibleUnlessCondition:
457
457
  - 'lib/rvg/embellishable.rb'
458
458
  - 'lib/rvg/stretchable.rb'
459
459
 
460
- # Offense count: 4514
460
+ # Offense count: 4515
461
461
  # This cop supports safe autocorrection (--autocorrect).
462
462
  # Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
463
463
  # SupportedStyles: require_parentheses, omit_parentheses
@@ -586,7 +586,7 @@ Style/YodaExpression:
586
586
 
587
587
  # Offense count: 134
588
588
  # This cop supports safe autocorrection (--autocorrect).
589
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
589
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
590
590
  # URISchemes: http, https
591
591
  Layout/LineLength:
592
592
  Max: 217
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
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 6.1.2
7
+
8
+ Improvements
9
+
10
+ - Improve Magick::Draw#primitive performance (#1697)
11
+
6
12
  ## RMagick 6.1.1
7
13
 
8
14
  Bug Fixes
data/Gemfile CHANGED
@@ -14,9 +14,9 @@ gem 'yard', '~> 0.9.36'
14
14
 
15
15
  gem 'rubocop', '~> 1.63'
16
16
  gem 'rubocop-performance', '~> 1.21'
17
- gem 'rubocop-rspec', '~> 2.29'
17
+ gem 'rubocop-rspec', '~> 3.5'
18
18
 
19
- gem 'rubocop-on-rbs', '~> 0.5' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1')
19
+ gem 'rubocop-on-rbs', '~> 1.5' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2')
20
20
 
21
21
  gem 'rbs', '~> 3.4'
22
22
  gem 'steep', '~> 1.6'
data/README.md CHANGED
@@ -104,10 +104,8 @@ brew install imagemagick@6
104
104
 
105
105
  ### Windows
106
106
  1. Install latest Ruby+Devkit package which you can get from [RubyInstaller for Windows](https://rubyinstaller.org).
107
- 2. You might need to configure `PATH` environment variable to where the compiler is located.
108
- (Ex: `set PATH=C:\Ruby33-x64\bin;C:\Ruby33-x64\msys64\ucrt64\bin;%PATH%`)
109
- 3. Download `ImageMagick-7.XXXX-Q16-x64-dll.exe` (not, `ImageMagick-7.XXXX-Q16-x64-static.exe`) binary from [Windows Binary Release](https://imagemagick.org/script/download.php#windows), or you can download ImageMagick 6 from [Windows Binary Release](https://legacy.imagemagick.org/script/download.php#windows).
110
- 4. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers for C and C++` in an installer for RMagick.
107
+ 2. Download `ImageMagick-7.XXXX-Q16-x64-dll.exe` (not, `ImageMagick-7.XXXX-Q16-x64-static.exe`) binary from [Windows Binary Release](https://imagemagick.org/script/download.php#windows), or you can download ImageMagick 6 from [Windows Binary Release](https://legacy.imagemagick.org/script/download.php#windows).
108
+ 3. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers for C and C++` in an installer for RMagick.
111
109
  <img width="75%" src="https://github.com/rmagick/rmagick/assets/199156/494e7963-cca5-4cb5-b28a-6c4d76adce5d" />
112
110
 
113
111
  If you want to install ImageMagick using [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), run the following command:
@@ -116,9 +114,18 @@ If you want to install ImageMagick using [winget](https://learn.microsoft.com/en
116
114
  winget install ImageMagick.ImageMagick --custom /TASKS=modifypath,install_Devel
117
115
  ```
118
116
 
117
+ If you want to install ImageMagick using [Chocolatey](https://chocolatey.org/), run the following command:
118
+
119
+ ```sh
120
+ choco install imagemagick -PackageParameters InstallDevelopmentHeaders=true
121
+ ```
122
+
119
123
  Installing RMagick
120
124
  ------------------
121
125
 
126
+ > [!NOTE]
127
+ > When you update the ImageMagick version, we have recommended you should re-install RMagick.
128
+
122
129
  ### Installing via Bundler
123
130
 
124
131
  Add to your `Gemfile`:
@@ -133,6 +140,11 @@ Then run:
133
140
  bundle install
134
141
  ```
135
142
 
143
+ For Windows, you need to run using [ridk tool](https://github.com/oneclick/rubyinstaller2/wiki/The-ridk-tool):
144
+ ```sh
145
+ ridk exec bundle install
146
+ ```
147
+
136
148
  ### Installing via RubyGems
137
149
 
138
150
  Run:
@@ -141,6 +153,11 @@ Run:
141
153
  gem install rmagick
142
154
  ```
143
155
 
156
+ For Windows, you need to run using [ridk tool](https://github.com/oneclick/rubyinstaller2/wiki/The-ridk-tool):
157
+ ```sh
158
+ ridk exec gem install rmagick
159
+ ```
160
+
144
161
  ### Versioning
145
162
 
146
163
  RMagick is versioned according to Semantic Versioning. For stable version
@@ -1262,11 +1262,11 @@ Draw_primitive(VALUE self, VALUE primitive)
1262
1262
 
1263
1263
  if (draw->primitives == (VALUE)0)
1264
1264
  {
1265
- draw->primitives = primitive;
1265
+ draw->primitives = rb_str_dup(primitive);
1266
1266
  }
1267
1267
  else
1268
1268
  {
1269
- draw->primitives = rb_str_plus(draw->primitives, rb_str_new2("\n"));
1269
+ draw->primitives = rb_str_concat(draw->primitives, rb_str_new2("\n"));
1270
1270
  draw->primitives = rb_str_concat(draw->primitives, primitive);
1271
1271
  }
1272
1272
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magick
4
- VERSION = '6.1.1'
4
+ VERSION = '6.1.2'
5
5
  MIN_RUBY_VERSION = '3.0.0'
6
6
  MIN_IM_VERSION = '6.8.9'
7
7
  end
data/lib/rvg/rvg.rb CHANGED
@@ -54,6 +54,8 @@ module Magick
54
54
  include Describable
55
55
  include Duplicatable
56
56
 
57
+ WORD_SEP = / / # Regexp to separate words
58
+
57
59
  private
58
60
 
59
61
  # background_fill defaults to 'none'. If background_fill has been set to something
@@ -112,7 +114,7 @@ module Magick
112
114
  indent = 0
113
115
  primitives.each do |cmd|
114
116
  indent -= 1 if cmd['pop ']
115
- print((' ' * indent), cmd, "\n")
117
+ print(' ' * indent, cmd, "\n")
116
118
  indent += 1 if cmd['push ']
117
119
  end
118
120
  end
@@ -120,8 +122,6 @@ module Magick
120
122
 
121
123
  public
122
124
 
123
- WORD_SEP = / / # Regexp to separate words
124
-
125
125
  # The background image specified by background_image=
126
126
  attr_reader :background_image
127
127
  # The background image layout specified by background_position=
@@ -3,6 +3,7 @@ module Magick
3
3
  interface _DeepEqual
4
4
  def deep_equal: (untyped other) -> bool
5
5
  end
6
+
6
7
  class PathData
7
8
  include _DeepEqual
8
9
  end
data/sig/rvg/rvg.rbs CHANGED
@@ -59,7 +59,6 @@ module Magick
59
59
 
60
60
  public
61
61
 
62
-
63
62
  # Sets an image to use as the canvas background. See background_position= for layout options.
64
63
  def background_image=: (Magick::Image? bg_image) -> Magick::Image?
65
64
 
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: 6.1.1
4
+ version: 6.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -10,7 +10,7 @@ authors:
10
10
  - Moncef Maiza
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-02-01 00:00:00.000000000 Z
13
+ date: 1980-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: observer
@@ -54,6 +54,7 @@ files:
54
54
  - ".devcontainer/setup-user.sh"
55
55
  - ".editorconfig"
56
56
  - ".github/ISSUE_TEMPLATE.md"
57
+ - ".github/ISSUE_TEMPLATE/report.yml"
57
58
  - ".github/workflows/ci.yml"
58
59
  - ".gitignore"
59
60
  - ".rspec"
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
158
  version: '0'
158
159
  requirements:
159
160
  - ImageMagick 6.8.9 or later
160
- rubygems_version: 3.6.2
161
+ rubygems_version: 3.6.9
161
162
  specification_version: 4
162
163
  summary: Ruby binding to ImageMagick
163
164
  test_files: []