rmagick 6.1.5 → 6.3.0

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: abd4bb9648eeac55cad07daf192bd139e0310912a97c9511c3a598e87843f586
4
- data.tar.gz: 37d89abbb4e552c8f8c620cee0f52534c6ed340e27497cb63a438145bb9e9e59
3
+ metadata.gz: a7ed79c680b9ea528ef33ba989c37e33c62dc2bd69766a96478826d1f02ad42b
4
+ data.tar.gz: 80315df8a5f0ae2de433e0929e165ed2636b9a451fb93ed3b301888418313685
5
5
  SHA512:
6
- metadata.gz: 0c7f59350e7c28248d76bbdc75546c658ad5dece7c0d5e76fa83bd5dfda6506a511ea11e7573938bb045f8468bd6deb16b0a829bb5ad5e1b4aae25a7381cdbf2
7
- data.tar.gz: 6575a013a6d86aa063b1825dee76d21b6b9e5948e4b680a860f1857f22026d1af8cdd06d54eae38a48e6aa71062b07e558c6df59eb1d470c95c60f5096ee7453
6
+ metadata.gz: fcea3eb1d2d92e3d0a0b658e95be0e6579f37a204823eb7dca6f60f2f867ea888bcc4a70f99163415620d48bb0b585bd74778bc881bef5f3f81089e1490f6bb3
7
+ data.tar.gz: 8e610ec1b43e3758002329a1ab2ffa013c3ce6e2ca233349572c54dd36c0875c09f63e6d9fb529030694f750dfa996f244d56a881a55d80077b149e77c7b894d
@@ -4,7 +4,7 @@
4
4
  "dockerfile": "../Dockerfile",
5
5
  "args": {
6
6
  "RUBY_VERSION": "3.3.3",
7
- "IMAGEMAGICK_VERSION": "6.9.13-33"
7
+ "IMAGEMAGICK_VERSION": "6.9.13-43"
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.2-8"
7
+ "IMAGEMAGICK_VERSION": "7.1.2-18"
8
8
  }
9
9
  },
10
10
  "onCreateCommand": "/setup/setup-repo.sh"
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'monthly'
@@ -16,10 +16,10 @@ jobs:
16
16
  timeout-minutes: 20
17
17
  steps:
18
18
  - uses: actions/checkout@v6
19
- - name: Set up Ruby 3.3
20
- uses: ruby/setup-ruby@master
19
+ - name: Set up Ruby 4.0
20
+ uses: ruby/setup-ruby@v1
21
21
  with:
22
- ruby-version: '3.3'
22
+ ruby-version: '4.0'
23
23
  bundler-cache: true
24
24
  - name: Build and test with Rake
25
25
  run: |
@@ -31,10 +31,10 @@ jobs:
31
31
  timeout-minutes: 20
32
32
  steps:
33
33
  - uses: actions/checkout@v6
34
- - name: Set up Ruby 3.0
35
- uses: ruby/setup-ruby@master
34
+ - name: Set up Ruby 4.0
35
+ uses: ruby/setup-ruby@v1
36
36
  with:
37
- ruby-version: '3.0'
37
+ ruby-version: '4.0'
38
38
  bundler-cache: true
39
39
  - name: Validate RBS signatures
40
40
  run: |
@@ -57,7 +57,7 @@ jobs:
57
57
  steps:
58
58
  - uses: actions/checkout@v6
59
59
  - name: Cache ImageMagick built objects
60
- uses: actions/cache@v4
60
+ uses: actions/cache@v5
61
61
  with:
62
62
  path: ./build-ImageMagick
63
63
  key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
@@ -65,10 +65,9 @@ jobs:
65
65
  v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
66
66
  - name: Update/Install packages
67
67
  run: |
68
- export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
69
- ./before_install_linux.sh
68
+ IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_linux.sh
70
69
  - name: Set up Ruby ${{ matrix.ruby-version }}
71
- uses: ruby/setup-ruby@master
70
+ uses: ruby/setup-ruby@v1
72
71
  with:
73
72
  ruby-version: ${{ matrix.ruby-version }}
74
73
  bundler-cache: true
@@ -76,66 +75,40 @@ jobs:
76
75
  run: |
77
76
  bundle exec rake
78
77
 
79
- test-linux:
80
- runs-on: ubuntu-latest
78
+ test:
79
+ runs-on: ${{ matrix.os }}
81
80
  timeout-minutes: 20
82
81
  strategy:
83
82
  fail-fast: false
84
83
  matrix:
85
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0.0-preview2']
84
+ os:
85
+ - ubuntu-latest
86
+ - macos-latest
87
+ ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
86
88
  imagemagick-version:
87
- - { full: 6.9.13-33, major-minor: '6.9' }
88
- - { full: 7.1.2-8, major-minor: '7.1' }
89
+ - { full: 6.9.13-43, major-minor: '6.9' }
90
+ - { full: 7.1.2-18, major-minor: '7.1' }
89
91
 
90
- name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
92
+ name: ${{ matrix.os }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
91
93
  steps:
92
94
  - uses: actions/checkout@v6
93
95
  - name: Cache ImageMagick built objects
94
- uses: actions/cache@v4
96
+ uses: actions/cache@v5
95
97
  with:
96
98
  path: ./build-ImageMagick
97
99
  key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
98
100
  restore-keys: |
99
101
  v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
100
- - name: Update/Install packages
101
- run: |
102
- export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
103
- ./before_install_linux.sh
104
- - name: Set up Ruby ${{ matrix.ruby-version }}
105
- uses: ruby/setup-ruby@master
106
- with:
107
- ruby-version: ${{ matrix.ruby-version }}
108
- bundler-cache: true
109
- - name: Build and test with Rake
102
+ - name: Update/Install packages (Linux)
103
+ if: runner.os == 'Linux'
110
104
  run: |
111
- bundle exec rake
112
-
113
- test-macos:
114
- runs-on: macos-latest
115
- timeout-minutes: 20
116
- strategy:
117
- fail-fast: false
118
- matrix:
119
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0.0-preview2']
120
- imagemagick-version:
121
- - { full: 6.9.13-33, major-minor: '6.9' }
122
- - { full: 7.1.2-8, major-minor: '7.1' }
123
-
124
- name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
125
- steps:
126
- - uses: actions/checkout@v6
127
- - name: Cache ImageMagick built objects
128
- uses: actions/cache@v4
129
- with:
130
- path: ./build-ImageMagick
131
- key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
132
- restore-keys: |
133
- v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
134
- - name: Update/Install packages
105
+ IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_linux.sh
106
+ - name: Update/Install packages (macOS)
107
+ if: runner.os == 'macOS'
135
108
  run: |
136
109
  IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_osx.sh
137
110
  - name: Set up Ruby ${{ matrix.ruby-version }}
138
- uses: ruby/setup-ruby@master
111
+ uses: ruby/setup-ruby@v1
139
112
  with:
140
113
  ruby-version: ${{ matrix.ruby-version }}
141
114
  bundler-cache: true
@@ -149,21 +122,21 @@ jobs:
149
122
  strategy:
150
123
  fail-fast: false
151
124
  matrix:
152
- ruby-version: ['3.4']
125
+ ruby-version: ['4.0']
153
126
  imagemagick-version:
154
- - { full: 6.9.13-33, major-minor: '6.9' }
155
- - { full: 7.1.2-8, major-minor: '7.1' }
127
+ - { full: 6.9.13-43, major-minor: '6.9' }
128
+ - { full: 7.1.2-18, major-minor: '7.1' }
156
129
  os:
157
130
  - { target: windows-latest, arch: 'x64' }
158
131
  - { target: windows-11-arm, arch: 'arm64' }
159
132
  exclude:
160
133
  # ImageMagick 6 has not provided ARM binary. Ref. https://legacy.imagemagick.org/archive/binaries/
161
- - imagemagick-version: { full: 6.9.13-33, major-minor: '6.9' }
134
+ - imagemagick-version: { full: 6.9.13-43, major-minor: '6.9' }
162
135
  os: { target: windows-11-arm, arch: 'arm64' }
163
136
 
164
137
  env:
165
- bundled_im_dir: ${{ matrix.os.arch == 'x64' && 'C:\Program Files\ImageMagick-7.1.2-Q16-HDRI' || 'C:\Program Files (x86)\ImageMagick-7.1.2-Q16-HDRI' }}
166
138
  install_im_dir: C:\ImageMagick
139
+ install_gs_dir: C:\Ghostscript
167
140
 
168
141
  name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
169
142
  steps:
@@ -172,13 +145,46 @@ jobs:
172
145
  # https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
173
146
  run: |
174
147
  Add-Content $env:GITHUB_PATH ${{ env.install_im_dir }}
148
+ Add-Content $env:GITHUB_PATH ${{ env.install_gs_dir }}\bin
149
+ - name: Install Ghostscript
150
+ shell: powershell
151
+ run: |
152
+ $url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10060/gs10060w64.exe"
153
+ $installer = "$env:TEMP\gs_installer.exe"
154
+
155
+ Write-Host "Downloading Ghostscript..."
156
+ Invoke-WebRequest -Uri $url -OutFile $installer
157
+
158
+ 7z x $installer -o${{ env.install_gs_dir }} -y
175
159
  - name: Uninstall bundled ImageMagick
176
160
  # Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
161
+ shell: powershell
177
162
  run: |
178
- Start-Process -FilePath "${{ env.bundled_im_dir }}\unins000.exe" -ArgumentList "/VERYSILENT /NORESTART"
179
- - name: Install ghostscript
180
- run: |
181
- choco install ghostscript
163
+ $regPaths = @(
164
+ "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
165
+ "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
166
+ )
167
+
168
+ # Search for ImageMagick installation entry from registry
169
+ $target = Get-ItemProperty $regPaths -ErrorAction SilentlyContinue |
170
+ Where-Object { $_.DisplayName -like "*ImageMagick*" } |
171
+ Select-Object -First 1
172
+
173
+ if ($target) {
174
+ Write-Host "Found installed ImageMagick: $($target.DisplayName)"
175
+
176
+ $uninstallCommand = $target.UninstallString -replace '"', ''
177
+
178
+ if (Test-Path $uninstallCommand) {
179
+ Write-Host "Running uninstaller: $uninstallCommand"
180
+ Start-Process -FilePath $uninstallCommand -ArgumentList "/VERYSILENT", "/NORESTART" -Wait
181
+ Write-Host "Uninstallation completed."
182
+ } else {
183
+ Write-Error "Uninstaller file not found at: $uninstallCommand"
184
+ }
185
+ } else {
186
+ Write-Host "ImageMagick is not installed (Registry check). Skipping."
187
+ }
182
188
  - name: Install ImageMagick
183
189
  # https://github.com/rmagick/ImageMagick-binaries
184
190
  run: |
@@ -189,10 +195,43 @@ jobs:
189
195
  Invoke-WebRequest -Uri $url -OutFile $installer_name
190
196
  Start-Process -FilePath $installer_name -ArgumentList "/DIR=${{ env.install_im_dir }} /VERYSILENT /NORESTART /TASKS=install_Devel"
191
197
  - name: Set up Ruby ${{ matrix.ruby-version }}
192
- uses: ruby/setup-ruby@master
198
+ uses: ruby/setup-ruby@v1
193
199
  with:
194
200
  ruby-version: ${{ matrix.ruby-version }}
195
201
  bundler-cache: true
196
202
  - name: Build and test with Rake
197
203
  run: |
198
204
  cmd.exe /D /S /C "bundle exec rake"
205
+
206
+ test-windows-pkgconfig:
207
+ runs-on: ${{ matrix.os.target }}
208
+ timeout-minutes: 20
209
+ strategy:
210
+ fail-fast: false
211
+ matrix:
212
+ ruby-version: ['4.0']
213
+ os:
214
+ - { target: windows-latest, arch: 'x64' }
215
+ - { target: windows-11-arm, arch: 'arm64' }
216
+ env:
217
+ RMAGICK_SKIP_GHOSTSCRIPT_TEST: "true" # To avoid the tedious Ghostscript setup
218
+
219
+ name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, MSYS2 IM
220
+ steps:
221
+ - uses: actions/checkout@v6
222
+ - name: Set up Ruby ${{ matrix.ruby-version }}
223
+ uses: ruby/setup-ruby@v1
224
+ with:
225
+ ruby-version: ${{ matrix.ruby-version }}
226
+ bundler-cache: true
227
+ - name: Install ImageMagick
228
+ run: |
229
+ if ("${{ matrix.os.arch }}" -eq "arm64") {
230
+ $pkg = "mingw-w64-clang-aarch64-imagemagick"
231
+ } else {
232
+ $pkg = "mingw-w64-ucrt-x86_64-imagemagick"
233
+ }
234
+ ridk exec pacman -S $pkg --noconfirm
235
+ - name: Build test
236
+ run: |
237
+ cmd.exe /D /S /C "bundle exec rake compile"
data/.rubocop_todo.yml CHANGED
@@ -1,21 +1,18 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-06-08 04:42:31 UTC using RuboCop version 1.76.0.
3
+ # on 2026-03-06 16:48:22 UTC using RuboCop version 1.85.1.
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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 12
10
- # Configuration parameters: Include, IgnoredGems, OnlyFor.
11
- # Include: **/*.gemfile, **/Gemfile, **/gems.rb
9
+ # Offense count: 13
10
+ # Configuration parameters: IgnoredGems, OnlyFor.
12
11
  Bundler/GemComment:
13
12
  Exclude:
14
13
  - 'Gemfile'
15
14
 
16
15
  # Offense count: 1
17
- # Configuration parameters: Severity, Include.
18
- # Include: **/*.gemspec
19
16
  Gemspec/RequiredRubyVersion:
20
17
  Exclude:
21
18
  - 'rmagick.gemspec'
@@ -79,7 +76,7 @@ Layout/MultilineMethodArgumentLineBreaks:
79
76
  Layout/RedundantLineBreak:
80
77
  Enabled: false
81
78
 
82
- # Offense count: 1912
79
+ # Offense count: 1913
83
80
  # This cop supports safe autocorrection (--autocorrect).
84
81
  Layout/SingleLineBlockChain:
85
82
  Enabled: false
@@ -120,7 +117,7 @@ Lint/ConstantDefinitionInBlock:
120
117
  Exclude:
121
118
  - 'Rakefile'
122
119
 
123
- # Offense count: 5523
120
+ # Offense count: 5528
124
121
  # Configuration parameters: Only, Ignore.
125
122
  Lint/ConstantResolution:
126
123
  Enabled: false
@@ -206,7 +203,7 @@ Metrics/CollectionLiteralLength:
206
203
  Exclude:
207
204
  - 'doc/ex/smile.rb'
208
205
 
209
- # Offense count: 15
206
+ # Offense count: 16
210
207
  # Configuration parameters: AllowedMethods, AllowedPatterns.
211
208
  Metrics/CyclomaticComplexity:
212
209
  Max: 44
@@ -271,8 +268,9 @@ Naming/MethodParameterName:
271
268
  - 'lib/rvg/units.rb'
272
269
 
273
270
  # Offense count: 2
274
- # Configuration parameters: Mode, AllowedMethods.
271
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
275
272
  # AllowedMethods: call
273
+ # WaywardPredicates: infinite?, nonzero?
276
274
  Naming/PredicateMethod:
277
275
  Exclude:
278
276
  - 'lib/rvg/deep_equal.rb'
@@ -308,6 +306,12 @@ RSpec/NoExpectationExample:
308
306
  - 'spec/rmagick/image/import_pixels_spec.rb'
309
307
  - 'spec/rmagick/image_list/write_spec.rb'
310
308
 
309
+ # Offense count: 1
310
+ # This cop supports unsafe autocorrection (--autocorrect-all).
311
+ RSpec/Output:
312
+ Exclude:
313
+ - 'spec/rmagick/image/liquid_rescale_spec.rb'
314
+
311
315
  # Offense count: 4
312
316
  Security/MarshalLoad:
313
317
  Exclude:
@@ -347,15 +351,6 @@ Style/CaseEquality:
347
351
  - 'spec/rmagick/pixel/dup_spec.rb'
348
352
  - 'spec/rmagick/pixel/threequals_spec.rb'
349
353
 
350
- # Offense count: 2
351
- # This cop supports unsafe autocorrection (--autocorrect-all).
352
- # Configuration parameters: AllowedMethods, AllowedPatterns.
353
- # AllowedMethods: ==, equal?, eql?
354
- Style/ClassEqualityComparison:
355
- Exclude:
356
- - 'spec/rmagick/image_list/all_predicate_spec.rb'
357
- - 'spec/rmagick/image_list/any_predicate_spec.rb'
358
-
359
354
  # Offense count: 2
360
355
  # This cop supports safe autocorrection (--autocorrect).
361
356
  # Configuration parameters: EnforcedStyle.
@@ -392,14 +387,14 @@ Style/DocumentDynamicEvalDefinition:
392
387
  Style/Documentation:
393
388
  Enabled: false
394
389
 
395
- # Offense count: 164
390
+ # Offense count: 165
396
391
  # Configuration parameters: AllowedMethods, RequireForNonPublicMethods.
397
392
  Style/DocumentationMethod:
398
393
  Enabled: false
399
394
 
400
395
  # Offense count: 4
401
396
  # This cop supports safe autocorrection (--autocorrect).
402
- # Configuration parameters: AllowedVars.
397
+ # Configuration parameters: AllowedVars, DefaultToNil.
403
398
  Style/FetchEnvVar:
404
399
  Exclude:
405
400
  - 'ext/RMagick/extconf.rb'
@@ -411,7 +406,7 @@ Style/FetchEnvVar:
411
406
  Style/FormatStringToken:
412
407
  EnforcedStyle: unannotated
413
408
 
414
- # Offense count: 40
409
+ # Offense count: 43
415
410
  # Configuration parameters: AllowedVariables.
416
411
  Style/GlobalVars:
417
412
  Exclude:
@@ -436,7 +431,7 @@ Style/HashEachMethods:
436
431
  - 'spec/rmagick/image/info/orientation_spec.rb'
437
432
  - 'spec/rmagick/image/info/units_spec.rb'
438
433
 
439
- # Offense count: 2
434
+ # Offense count: 1
440
435
  # This cop supports safe autocorrection (--autocorrect).
441
436
  Style/IfUnlessModifier:
442
437
  Exclude:
@@ -457,14 +452,14 @@ Style/InvertibleUnlessCondition:
457
452
  - 'lib/rvg/embellishable.rb'
458
453
  - 'lib/rvg/stretchable.rb'
459
454
 
460
- # Offense count: 4515
455
+ # Offense count: 4516
461
456
  # This cop supports safe autocorrection (--autocorrect).
462
- # Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
457
+ # Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, IncludedMacroPatterns, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
463
458
  # SupportedStyles: require_parentheses, omit_parentheses
464
459
  Style/MethodCallWithArgsParentheses:
465
460
  Enabled: false
466
461
 
467
- # Offense count: 57
462
+ # Offense count: 58
468
463
  # This cop supports safe autocorrection (--autocorrect).
469
464
  # Configuration parameters: EnforcedStyle.
470
465
  # SupportedStyles: if, case, both
@@ -508,6 +503,13 @@ Style/NumericPredicate:
508
503
  - 'lib/rvg/embellishable.rb'
509
504
  - 'spec/rmagick/image/destroy_spec.rb'
510
505
 
506
+ # Offense count: 3
507
+ # Configuration parameters: AllowedClasses.
508
+ Style/OneClassPerFile:
509
+ Exclude:
510
+ - 'examples/histogram.rb'
511
+ - 'lib/rvg/misc.rb'
512
+
511
513
  # Offense count: 4
512
514
  # Configuration parameters: AllowedMethods.
513
515
  # AllowedMethods: respond_to_missing?
@@ -562,7 +564,7 @@ Style/StringHashKeys:
562
564
  - 'lib/rvg/misc.rb'
563
565
  - 'spec/rmagick/image/properties_spec.rb'
564
566
 
565
- # Offense count: 308
567
+ # Offense count: 309
566
568
  # This cop supports safe autocorrection (--autocorrect).
567
569
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
568
570
  # SupportedStyles: single_quotes, double_quotes
@@ -584,9 +586,9 @@ Style/YodaCondition:
584
586
  Style/YodaExpression:
585
587
  Enabled: false
586
588
 
587
- # Offense count: 134
589
+ # Offense count: 129
588
590
  # This cop supports safe autocorrection (--autocorrect).
589
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
591
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
590
592
  # URISchemes: http, https
591
593
  Layout/LineLength:
592
594
  Max: 217
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 6.3.0
7
+
8
+ > [!IMPORTANT]
9
+ > This release is the final minor update for the RMagick 6 series.
10
+ >
11
+ > The upcoming RMagick 7.0 will require:
12
+ > * Ruby 3.2 or later
13
+ > * ImageMagick 6.9 or later (for ImageMagick 6 users)
14
+ > * ImageMagick 7.1 or later (for ImageMagick 7 users)
15
+
16
+ Enhancements
17
+
18
+ - Add deprecation warnings for upcoming RMagick 7.0 (#1740)
19
+
20
+ ## RMagick 6.2.0
21
+
22
+ Improvements
23
+
24
+ - Support MSYS2 ImageMagick via pkg-config on Windows (#1730)
25
+
6
26
  ## RMagick 6.1.5
7
27
 
8
28
  Bug Fixes
data/Gemfile CHANGED
@@ -16,9 +16,11 @@ gem 'rubocop', '~> 1.63'
16
16
  gem 'rubocop-performance', '~> 1.21'
17
17
  gem 'rubocop-rspec', '~> 3.5'
18
18
 
19
- gem 'rubocop-on-rbs', '~> 1.5' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2')
20
-
21
- gem 'rbs', '~> 3.4'
22
- gem 'steep', '~> 1.6'
19
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2')
20
+ # TODO: Bump rubocop-on-rbs to >= 2.0 when steep supports rbs 4.0
21
+ gem 'rbs', '~> 3.9'
22
+ gem 'rubocop-on-rbs', '< 2.0'
23
+ gem 'steep', '~> 1.10'
24
+ end
23
25
 
24
26
  gem 'ruby_memcheck', '~> 3.0' if RUBY_PLATFORM.include?('linux')
data/README.md CHANGED
@@ -120,6 +120,22 @@ If you want to install ImageMagick using [Chocolatey](https://chocolatey.org/),
120
120
  choco install imagemagick -PackageParameters InstallDevelopmentHeaders=true
121
121
  ```
122
122
 
123
+ ### Windows (via MSYS2 / RubyInstaller)
124
+
125
+ If you are using RubyInstaller for Windows, you can easily install ImageMagick using MSYS2's `pacman` package manager.
126
+ Open your command prompt and run the appropriate command for your architecture to install ImageMagick:
127
+
128
+ For x64:
129
+
130
+ ```sh
131
+ ridk exec pacman -S mingw-w64-ucrt-x86_64-imagemagick
132
+ ```
133
+ For ARM64:
134
+
135
+ ```
136
+ ridk exec pacman -S mingw-w64-clang-aarch64-imagemagick
137
+ ```
138
+
123
139
  Installing RMagick
124
140
  ------------------
125
141
 
@@ -99,7 +99,7 @@ module RMagick
99
99
 
100
100
  def configure_compile_options
101
101
  # Magick-config is not available on Windows
102
- if RUBY_PLATFORM.include?('mingw') # mingw
102
+ if RUBY_PLATFORM.include?('mingw') && !pkgconfig_exist? # mingw without pkg-config support, likely a manual installation
103
103
 
104
104
  dir_paths = search_paths_for_windows
105
105
  $CPPFLAGS += %( -I"#{dir_paths[:include]}")
@@ -161,6 +161,11 @@ module RMagick
161
161
  @installed_im7_packages ||= detect_imagemagick_packages(IM7_PACKAGES)
162
162
  end
163
163
 
164
+ def pkgconfig_exist?
165
+ $magick_package ||= determine_imagemagick_package
166
+ !!$magick_package
167
+ end
168
+
164
169
  def determine_imagemagick_package
165
170
  packages = [installed_im7_packages, installed_im6_packages].flatten
166
171
  return if packages.empty?
@@ -241,16 +246,15 @@ module RMagick
241
246
  Check the mkmf.log file for more detailed information.
242
247
  END_FAILURE
243
248
 
244
- if RUBY_PLATFORM.include?('mingw')
249
+ if pkgconfig_exist?
250
+ $magick_version = PKGConfig.modversion($magick_package)[/^(\d+\.\d+\.\d+)/]
251
+ exit_failure failure_message unless $magick_version
252
+ elsif RUBY_PLATFORM.include?('mingw')
245
253
  `#{magick_command} -version` =~ /Version: ImageMagick (\d+\.\d+\.\d+)-+\d+ /
246
254
  $magick_version = Regexp.last_match(1)
247
255
  exit_failure failure_message unless $magick_version
248
256
  else
249
- unless ($magick_package = determine_imagemagick_package)
250
- exit_failure failure_message
251
- end
252
-
253
- $magick_version = PKGConfig.modversion($magick_package)[/^(\d+\.\d+\.\d+)/]
257
+ exit_failure failure_message
254
258
  end
255
259
 
256
260
  # Ensure minimum ImageMagick version
@@ -359,6 +363,38 @@ at_exit do
359
363
  msg = "Configured compile options: #{extconf.configured_compile_options}"
360
364
  Logging.message msg
361
365
  message msg + "\n"
366
+
367
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.2.0')
368
+ message <<~"WARNING"
369
+ =======================================================================
370
+ DEPRECATION WARNING
371
+
372
+ RMagick 7.0 will drop support for Ruby #{RUBY_VERSION}.
373
+ Please upgrade to Ruby 3.2 or later.
374
+ =======================================================================
375
+ WARNING
376
+ end
377
+
378
+ if Gem::Version.new($magick_version) < Gem::Version.new('6.9.0')
379
+ message <<~"WARNING"
380
+ =======================================================================
381
+ DEPRECATION WARNING
382
+
383
+ RMagick 7.0 will drop support for ImageMagick #{$magick_version}.
384
+ Please upgrade to ImageMagick 6.9.0 or later.
385
+ =======================================================================
386
+ WARNING
387
+ end
388
+ if Gem::Version.new($magick_version) >= Gem::Version.new('7.0.0') && Gem::Version.new($magick_version) < Gem::Version.new('7.1.0')
389
+ message <<~"WARNING"
390
+ =======================================================================
391
+ DEPRECATION WARNING
392
+
393
+ RMagick 7.0 will drop support for ImageMagick #{$magick_version}.
394
+ Please upgrade to ImageMagick 7.1.0 or later.
395
+ =======================================================================
396
+ WARNING
397
+ end
362
398
  end
363
399
  extconf.create_makefile_file
364
400
  extconf.create_compile_flags_txt
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magick
4
- VERSION = '6.1.5'
4
+ VERSION = '6.3.0'
5
5
  MIN_RUBY_VERSION = '3.0.0'
6
6
  MIN_IM_VERSION = '6.8.9'
7
7
  end
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.5
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -53,8 +53,8 @@ files:
53
53
  - ".devcontainer/setup-repo.sh"
54
54
  - ".devcontainer/setup-user.sh"
55
55
  - ".editorconfig"
56
- - ".github/ISSUE_TEMPLATE.md"
57
56
  - ".github/ISSUE_TEMPLATE/report.yml"
57
+ - ".github/dependabot.yml"
58
58
  - ".github/workflows/ci.yml"
59
59
  - ".gitignore"
60
60
  - ".rspec"
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements:
160
160
  - ImageMagick 6.8.9 or later
161
- rubygems_version: 4.0.3
161
+ rubygems_version: 3.6.9
162
162
  specification_version: 4
163
163
  summary: Ruby binding to ImageMagick
164
164
  test_files: []
@@ -1,17 +0,0 @@
1
- ### Description
2
- <!-- A description of the bug or feature -->
3
-
4
- ### Steps to Reproduce
5
- <!-- List of steps, sample code, failing test or link to a project that reproduces the behavior.
6
- Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues -->
7
-
8
- ### System Configuration
9
- <!-- Tell us about the environment where you are experiencing the bug -->
10
-
11
- - ImageMagick version:
12
- - RMagick version:
13
- - Ruby version:
14
- - Environment (Operating system, version and so on):
15
- - Additional information:
16
-
17
- <!-- Thanks for reporting the issue to RMagick! -->