rmagick 6.1.5 → 6.2.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 +4 -4
- data/.github/workflows/ci.yml +74 -8
- data/.rubocop_todo.yml +21 -17
- data/CHANGELOG.md +6 -0
- data/README.md +16 -0
- data/ext/RMagick/extconf.rb +11 -7
- data/lib/rmagick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76f2e11d828e48371aa5ff6b599cebff2e793b3751892cc864cd22015781c324
|
|
4
|
+
data.tar.gz: 65fa64db84769aa12a954bdd57ea7e03b8fcb61c1cebab89b2f9d833e8aab0aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1238aaf7239bf0ae5041682b6941fb52341283d6e8fe73c37d4c914e21c40a565d0f244fb923289647dc44d0f43bfbf2e0cd59e4a8ee99595ea32524b35bbd26
|
|
7
|
+
data.tar.gz: ba83bde0c15f3061ad9e0d656cc79a65985fc55b49ae340f7fa3fd2ef510127610d95d2d8692c2111a97b3f4673badd1a03f18d6b78abbbb169f30020bcbdd4b
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
strategy:
|
|
83
83
|
fail-fast: false
|
|
84
84
|
matrix:
|
|
85
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0
|
|
85
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
86
86
|
imagemagick-version:
|
|
87
87
|
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
88
88
|
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
@@ -116,7 +116,7 @@ jobs:
|
|
|
116
116
|
strategy:
|
|
117
117
|
fail-fast: false
|
|
118
118
|
matrix:
|
|
119
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0
|
|
119
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
120
120
|
imagemagick-version:
|
|
121
121
|
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
122
122
|
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
@@ -149,7 +149,7 @@ jobs:
|
|
|
149
149
|
strategy:
|
|
150
150
|
fail-fast: false
|
|
151
151
|
matrix:
|
|
152
|
-
ruby-version: ['
|
|
152
|
+
ruby-version: ['4.0']
|
|
153
153
|
imagemagick-version:
|
|
154
154
|
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
155
155
|
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
@@ -162,8 +162,8 @@ jobs:
|
|
|
162
162
|
os: { target: windows-11-arm, arch: 'arm64' }
|
|
163
163
|
|
|
164
164
|
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
165
|
install_im_dir: C:\ImageMagick
|
|
166
|
+
install_gs_dir: C:\Ghostscript
|
|
167
167
|
|
|
168
168
|
name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
169
169
|
steps:
|
|
@@ -172,13 +172,46 @@ jobs:
|
|
|
172
172
|
# https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
|
|
173
173
|
run: |
|
|
174
174
|
Add-Content $env:GITHUB_PATH ${{ env.install_im_dir }}
|
|
175
|
+
Add-Content $env:GITHUB_PATH ${{ env.install_gs_dir }}\bin
|
|
176
|
+
- name: Install Ghostscript
|
|
177
|
+
shell: powershell
|
|
178
|
+
run: |
|
|
179
|
+
$url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10060/gs10060w64.exe"
|
|
180
|
+
$installer = "$env:TEMP\gs_installer.exe"
|
|
181
|
+
|
|
182
|
+
Write-Host "Downloading Ghostscript..."
|
|
183
|
+
Invoke-WebRequest -Uri $url -OutFile $installer
|
|
184
|
+
|
|
185
|
+
7z x $installer -o${{ env.install_gs_dir }} -y
|
|
175
186
|
- name: Uninstall bundled ImageMagick
|
|
176
187
|
# Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
|
|
188
|
+
shell: powershell
|
|
177
189
|
run: |
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
190
|
+
$regPaths = @(
|
|
191
|
+
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
|
192
|
+
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# Search for ImageMagick installation entry from registry
|
|
196
|
+
$target = Get-ItemProperty $regPaths -ErrorAction SilentlyContinue |
|
|
197
|
+
Where-Object { $_.DisplayName -like "*ImageMagick*" } |
|
|
198
|
+
Select-Object -First 1
|
|
199
|
+
|
|
200
|
+
if ($target) {
|
|
201
|
+
Write-Host "Found installed ImageMagick: $($target.DisplayName)"
|
|
202
|
+
|
|
203
|
+
$uninstallCommand = $target.UninstallString -replace '"', ''
|
|
204
|
+
|
|
205
|
+
if (Test-Path $uninstallCommand) {
|
|
206
|
+
Write-Host "Running uninstaller: $uninstallCommand"
|
|
207
|
+
Start-Process -FilePath $uninstallCommand -ArgumentList "/VERYSILENT", "/NORESTART" -Wait
|
|
208
|
+
Write-Host "Uninstallation completed."
|
|
209
|
+
} else {
|
|
210
|
+
Write-Error "Uninstaller file not found at: $uninstallCommand"
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
Write-Host "ImageMagick is not installed (Registry check). Skipping."
|
|
214
|
+
}
|
|
182
215
|
- name: Install ImageMagick
|
|
183
216
|
# https://github.com/rmagick/ImageMagick-binaries
|
|
184
217
|
run: |
|
|
@@ -196,3 +229,36 @@ jobs:
|
|
|
196
229
|
- name: Build and test with Rake
|
|
197
230
|
run: |
|
|
198
231
|
cmd.exe /D /S /C "bundle exec rake"
|
|
232
|
+
|
|
233
|
+
test-windows-pkgconfig:
|
|
234
|
+
runs-on: ${{ matrix.os.target }}
|
|
235
|
+
timeout-minutes: 20
|
|
236
|
+
strategy:
|
|
237
|
+
fail-fast: false
|
|
238
|
+
matrix:
|
|
239
|
+
ruby-version: ['4.0']
|
|
240
|
+
os:
|
|
241
|
+
- { target: windows-latest, arch: 'x64' }
|
|
242
|
+
- { target: windows-11-arm, arch: 'arm64' }
|
|
243
|
+
env:
|
|
244
|
+
RMAGICK_SKIP_GHOSTSCRIPT_TEST: "true" # To avoid the tedious Ghostscript setup
|
|
245
|
+
|
|
246
|
+
name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, MSYS2 IM
|
|
247
|
+
steps:
|
|
248
|
+
- uses: actions/checkout@v6
|
|
249
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
250
|
+
uses: ruby/setup-ruby@master
|
|
251
|
+
with:
|
|
252
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
253
|
+
bundler-cache: true
|
|
254
|
+
- name: Install ImageMagick
|
|
255
|
+
run: |
|
|
256
|
+
if ("${{ matrix.os.arch }}" -eq "arm64") {
|
|
257
|
+
$pkg = "mingw-w64-clang-aarch64-imagemagick"
|
|
258
|
+
} else {
|
|
259
|
+
$pkg = "mingw-w64-ucrt-x86_64-imagemagick"
|
|
260
|
+
}
|
|
261
|
+
ridk exec pacman -S $pkg --noconfirm
|
|
262
|
+
- name: Build and test with Rake
|
|
263
|
+
run: |
|
|
264
|
+
cmd.exe /D /S /C "bundle exec rake"
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2026-01-31 06:59:04 UTC using RuboCop version 1.84.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
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
# Configuration parameters:
|
|
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:
|
|
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:
|
|
120
|
+
# Offense count: 5527
|
|
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:
|
|
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: 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:
|
|
@@ -399,7 +403,7 @@ Style/DocumentationMethod:
|
|
|
399
403
|
|
|
400
404
|
# Offense count: 4
|
|
401
405
|
# This cop supports safe autocorrection (--autocorrect).
|
|
402
|
-
# Configuration parameters: AllowedVars.
|
|
406
|
+
# Configuration parameters: AllowedVars, DefaultToNil.
|
|
403
407
|
Style/FetchEnvVar:
|
|
404
408
|
Exclude:
|
|
405
409
|
- 'ext/RMagick/extconf.rb'
|
|
@@ -411,7 +415,7 @@ Style/FetchEnvVar:
|
|
|
411
415
|
Style/FormatStringToken:
|
|
412
416
|
EnforcedStyle: unannotated
|
|
413
417
|
|
|
414
|
-
# Offense count:
|
|
418
|
+
# Offense count: 41
|
|
415
419
|
# Configuration parameters: AllowedVariables.
|
|
416
420
|
Style/GlobalVars:
|
|
417
421
|
Exclude:
|
|
@@ -459,12 +463,12 @@ Style/InvertibleUnlessCondition:
|
|
|
459
463
|
|
|
460
464
|
# Offense count: 4515
|
|
461
465
|
# This cop supports safe autocorrection (--autocorrect).
|
|
462
|
-
# Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
|
|
466
|
+
# Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, IncludedMacroPatterns, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
|
|
463
467
|
# SupportedStyles: require_parentheses, omit_parentheses
|
|
464
468
|
Style/MethodCallWithArgsParentheses:
|
|
465
469
|
Enabled: false
|
|
466
470
|
|
|
467
|
-
# Offense count:
|
|
471
|
+
# Offense count: 58
|
|
468
472
|
# This cop supports safe autocorrection (--autocorrect).
|
|
469
473
|
# Configuration parameters: EnforcedStyle.
|
|
470
474
|
# SupportedStyles: if, case, both
|
|
@@ -562,7 +566,7 @@ Style/StringHashKeys:
|
|
|
562
566
|
- 'lib/rvg/misc.rb'
|
|
563
567
|
- 'spec/rmagick/image/properties_spec.rb'
|
|
564
568
|
|
|
565
|
-
# Offense count:
|
|
569
|
+
# Offense count: 309
|
|
566
570
|
# This cop supports safe autocorrection (--autocorrect).
|
|
567
571
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
568
572
|
# SupportedStyles: single_quotes, double_quotes
|
|
@@ -584,9 +588,9 @@ Style/YodaCondition:
|
|
|
584
588
|
Style/YodaExpression:
|
|
585
589
|
Enabled: false
|
|
586
590
|
|
|
587
|
-
# Offense count:
|
|
591
|
+
# Offense count: 128
|
|
588
592
|
# This cop supports safe autocorrection (--autocorrect).
|
|
589
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes,
|
|
593
|
+
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
590
594
|
# URISchemes: http, https
|
|
591
595
|
Layout/LineLength:
|
|
592
596
|
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.2.0
|
|
7
|
+
|
|
8
|
+
Improvements
|
|
9
|
+
|
|
10
|
+
- Support MSYS2 ImageMagick via pkg-config on Windows (#1730)
|
|
11
|
+
|
|
6
12
|
## RMagick 6.1.5
|
|
7
13
|
|
|
8
14
|
Bug Fixes
|
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
|
|
data/ext/RMagick/extconf.rb
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
data/lib/rmagick/version.rb
CHANGED
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.
|
|
4
|
+
version: 6.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Hunter
|
|
@@ -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.
|
|
161
|
+
rubygems_version: 4.0.6
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Ruby binding to ImageMagick
|
|
164
164
|
test_files: []
|