rmagick 6.0.1 → 6.1.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/.devcontainer/ImageMagick6/devcontainer.json +2 -2
- data/.devcontainer/devcontainer.json +2 -2
- data/.editorconfig +2 -2
- data/.github/workflows/ci.yml +46 -13
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +53 -56
- data/CHANGELOG.md +15 -0
- data/Gemfile +4 -0
- data/README.md +11 -6
- data/Rakefile +10 -2
- data/before_install_linux.sh +3 -1
- data/before_install_osx.sh +1 -1
- data/ext/RMagick/extconf.rb +12 -97
- data/ext/RMagick/rmagick.h +1 -1
- data/ext/RMagick/rmilist.cpp +1 -1
- data/ext/RMagick/rmimage.cpp +2 -0
- data/lib/rmagick/version.rb +1 -1
- data/lib/rmagick_internal.rb +2 -2
- data/lib/rvg/clippath.rb +2 -0
- data/lib/rvg/container.rb +2 -0
- data/lib/rvg/deep_equal.rb +2 -0
- data/lib/rvg/describable.rb +2 -0
- data/lib/rvg/embellishable.rb +2 -0
- data/lib/rvg/misc.rb +2 -0
- data/lib/rvg/paint.rb +2 -0
- data/lib/rvg/pathdata.rb +2 -0
- data/lib/rvg/rvg.rb +2 -0
- data/lib/rvg/stretchable.rb +2 -0
- data/lib/rvg/stylable.rb +2 -0
- data/lib/rvg/text.rb +2 -0
- data/lib/rvg/transformable.rb +2 -0
- data/lib/rvg/units.rb +2 -0
- data/rmagick.gemspec +5 -3
- data/sig/rmagick/_draw_common_methods.rbs +2 -0
- data/sig/rmagick/_image_common_methods.rbs +4 -2
- data/sig/rmagick/draw.rbs +2 -0
- data/sig/rmagick/draw_attribute.rbs +2 -0
- data/sig/rmagick/enum.rbs +6 -4
- data/sig/rmagick/error.rbs +2 -0
- data/sig/rmagick/fill.rbs +2 -0
- data/sig/rmagick/geometry.rbs +3 -1
- data/sig/rmagick/image.rbs +5 -3
- data/sig/rmagick/image_list.rbs +23 -21
- data/sig/rmagick/iptc.rbs +2 -0
- data/sig/rmagick/kernel_info.rbs +2 -0
- data/sig/rmagick/optional_method_arguments.rbs +2 -0
- data/sig/rmagick/pixel.rbs +2 -0
- data/sig/rmagick/struct.rbs +2 -0
- data/sig/rvg/embellishable.rbs +1 -1
- data/sig/rvg/pathdata.rbs +1 -1
- data/sig/rvg/rvg.rbs +1 -1
- data/sig/rvg/stylable.rbs +1 -1
- data/sig/rvg/text.rbs +1 -1
- data/sig/rvg/transformable.rbs +1 -1
- metadata +4 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddc973bb97e260ec61a7407c9c64fed8d0c6bca941bd385f742c8588891e3a25
|
4
|
+
data.tar.gz: 188883dc8d411a58201c93a416745d4d86fe9a8f0fa5690c9b6d7fe70d8cf476
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88a245f163102c30c3499ee0f002ab725f5c8d1dba4c622597a5e73cf2551e66a587bca14b2388b1889a56228aee7894329671be2be168d8d4edd49ec7fad4e
|
7
|
+
data.tar.gz: fd34f82a3d1baf9acb3b733aef09d17e4b1e42eb4c32b3e192091c7785d2205c632f5d743d6c80f77c023f467af445ad81d85eb56665354a4c1f2f7f0dac0cf1
|
data/.editorconfig
CHANGED
data/.github/workflows/ci.yml
CHANGED
@@ -16,10 +16,10 @@ jobs:
|
|
16
16
|
timeout-minutes: 20
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v4
|
19
|
-
- name: Set up Ruby 3.
|
19
|
+
- name: Set up Ruby 3.3
|
20
20
|
uses: ruby/setup-ruby@master
|
21
21
|
with:
|
22
|
-
ruby-version: '3.
|
22
|
+
ruby-version: '3.3'
|
23
23
|
bundler-cache: true
|
24
24
|
- name: Build and test with Rake
|
25
25
|
run: |
|
@@ -40,17 +40,50 @@ jobs:
|
|
40
40
|
run: |
|
41
41
|
bundle exec rake rbs:validate && bundle exec steep check
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
# Seems that old imagemagick depend on ghostscript 9.x for handling fonts.
|
44
|
+
# However, ubuntu 24.04 has ghostscript 10.x, which is too new for old imagemagick.
|
45
|
+
test-linux-for-old-imagemagick:
|
46
|
+
runs-on: ubuntu-22.04
|
45
47
|
timeout-minutes: 20
|
46
48
|
strategy:
|
47
49
|
matrix:
|
48
|
-
ruby-version: ['3.0'
|
50
|
+
ruby-version: ['3.0']
|
49
51
|
imagemagick-version:
|
50
52
|
- { full: 6.8.9-10, major-minor: '6.8' }
|
51
|
-
- { full: 6.9.13-9, major-minor: '6.9' }
|
52
53
|
- { full: 7.0.11-14, major-minor: '7.0' }
|
53
|
-
|
54
|
+
|
55
|
+
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
56
|
+
steps:
|
57
|
+
- uses: actions/checkout@v4
|
58
|
+
- name: Cache ImageMagick built objects
|
59
|
+
uses: actions/cache@v4
|
60
|
+
with:
|
61
|
+
path: ./build-ImageMagick
|
62
|
+
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
63
|
+
restore-keys: |
|
64
|
+
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
65
|
+
- name: Update/Install packages
|
66
|
+
run: |
|
67
|
+
export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
|
68
|
+
./before_install_linux.sh
|
69
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
70
|
+
uses: ruby/setup-ruby@master
|
71
|
+
with:
|
72
|
+
ruby-version: ${{ matrix.ruby-version }}
|
73
|
+
bundler-cache: true
|
74
|
+
- name: Build and test with Rake
|
75
|
+
run: |
|
76
|
+
bundle exec rake
|
77
|
+
|
78
|
+
test-linux:
|
79
|
+
runs-on: ubuntu-latest
|
80
|
+
timeout-minutes: 20
|
81
|
+
strategy:
|
82
|
+
matrix:
|
83
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
84
|
+
imagemagick-version:
|
85
|
+
- { full: 6.9.13-17, major-minor: '6.9' }
|
86
|
+
- { full: 7.1.1-39, major-minor: '7.1' }
|
54
87
|
|
55
88
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
56
89
|
steps:
|
@@ -80,10 +113,10 @@ jobs:
|
|
80
113
|
timeout-minutes: 20
|
81
114
|
strategy:
|
82
115
|
matrix:
|
83
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
116
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
84
117
|
imagemagick-version:
|
85
|
-
- { full: 6.9.13-
|
86
|
-
- { full: 7.1.1-
|
118
|
+
- { full: 6.9.13-17, major-minor: '6.9' }
|
119
|
+
- { full: 7.1.1-39, major-minor: '7.1' }
|
87
120
|
|
88
121
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
89
122
|
steps:
|
@@ -112,10 +145,10 @@ jobs:
|
|
112
145
|
timeout-minutes: 20
|
113
146
|
strategy:
|
114
147
|
matrix:
|
115
|
-
ruby-version: ['3.
|
148
|
+
ruby-version: ['3.4']
|
116
149
|
imagemagick-version:
|
117
|
-
- { full: 6.9.13-
|
118
|
-
- { full: 7.1.1-
|
150
|
+
- { full: 6.9.13-17, major-minor: '6.9' }
|
151
|
+
- { full: 7.1.1-39, major-minor: '7.1' }
|
119
152
|
env:
|
120
153
|
bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
|
121
154
|
install_im_dir: D:\ImageMagick
|
data/.rubocop.yml
CHANGED
@@ -4,6 +4,7 @@ inherit_from:
|
|
4
4
|
require:
|
5
5
|
- rubocop-rspec
|
6
6
|
- rubocop-performance
|
7
|
+
- rubocop-on-rbs
|
7
8
|
|
8
9
|
AllCops:
|
9
10
|
DefaultFormatter: fuubar
|
@@ -65,3 +66,6 @@ Style/Copyright:
|
|
65
66
|
|
66
67
|
Style/DisableCopsWithinSourceCodeDirective:
|
67
68
|
Enabled: false
|
69
|
+
|
70
|
+
Style/AccessorGrouping:
|
71
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,26 +1,18 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-04
|
3
|
+
# on 2024-11-04 02:41:41 UTC using RuboCop version 1.68.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:
|
9
|
+
# Offense count: 12
|
10
10
|
# Configuration parameters: Include, IgnoredGems, OnlyFor.
|
11
11
|
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
12
12
|
Bundler/GemComment:
|
13
13
|
Exclude:
|
14
14
|
- 'Gemfile'
|
15
15
|
|
16
|
-
# Offense count: 1
|
17
|
-
# This cop supports safe autocorrection (--autocorrect).
|
18
|
-
# Configuration parameters: Severity, Include.
|
19
|
-
# Include: **/*.gemspec
|
20
|
-
Gemspec/RequireMFA:
|
21
|
-
Exclude:
|
22
|
-
- 'rmagick.gemspec'
|
23
|
-
|
24
16
|
# Offense count: 1
|
25
17
|
# Configuration parameters: Severity, Include.
|
26
18
|
# Include: **/*.gemspec
|
@@ -43,7 +35,7 @@ Layout/ClassStructure:
|
|
43
35
|
|
44
36
|
# Offense count: 6
|
45
37
|
# This cop supports safe autocorrection (--autocorrect).
|
46
|
-
# Configuration parameters: AllowMultilineFinalElement.
|
38
|
+
# Configuration parameters: AllowMultilineFinalElement, AllowedMethods.
|
47
39
|
Layout/FirstMethodArgumentLineBreak:
|
48
40
|
Exclude:
|
49
41
|
- 'doc/ex/arcpath.rb'
|
@@ -81,13 +73,13 @@ Layout/MultilineMethodArgumentLineBreaks:
|
|
81
73
|
- 'examples/vignette.rb'
|
82
74
|
- 'lib/rmagick_internal.rb'
|
83
75
|
|
84
|
-
# Offense count:
|
76
|
+
# Offense count: 83
|
85
77
|
# This cop supports safe autocorrection (--autocorrect).
|
86
78
|
# Configuration parameters: InspectBlocks.
|
87
79
|
Layout/RedundantLineBreak:
|
88
80
|
Enabled: false
|
89
81
|
|
90
|
-
# Offense count:
|
82
|
+
# Offense count: 1911
|
91
83
|
# This cop supports safe autocorrection (--autocorrect).
|
92
84
|
Layout/SingleLineBlockChain:
|
93
85
|
Enabled: false
|
@@ -101,12 +93,6 @@ Layout/SpaceAroundOperators:
|
|
101
93
|
Exclude:
|
102
94
|
- 'lib/rvg/misc.rb'
|
103
95
|
|
104
|
-
# Offense count: 1
|
105
|
-
# This cop supports safe autocorrection (--autocorrect).
|
106
|
-
Layout/SpaceBeforeBrackets:
|
107
|
-
Exclude:
|
108
|
-
- 'lib/rmagick_internal.rb'
|
109
|
-
|
110
96
|
# Offense count: 39
|
111
97
|
# This cop supports safe autocorrection (--autocorrect).
|
112
98
|
Lint/AmbiguousOperatorPrecedence:
|
@@ -134,13 +120,13 @@ Lint/ConstantDefinitionInBlock:
|
|
134
120
|
Exclude:
|
135
121
|
- 'Rakefile'
|
136
122
|
|
137
|
-
# Offense count:
|
123
|
+
# Offense count: 5522
|
138
124
|
# Configuration parameters: Only, Ignore.
|
139
125
|
Lint/ConstantResolution:
|
140
126
|
Enabled: false
|
141
127
|
|
142
128
|
# Offense count: 3
|
143
|
-
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
129
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
144
130
|
Lint/DuplicateBranch:
|
145
131
|
Exclude:
|
146
132
|
- 'lib/rvg/embellishable.rb'
|
@@ -193,7 +179,7 @@ Lint/RescueException:
|
|
193
179
|
Exclude:
|
194
180
|
- 'lib/rmagick_internal.rb'
|
195
181
|
|
196
|
-
# Offense count:
|
182
|
+
# Offense count: 36
|
197
183
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
198
184
|
Metrics/AbcSize:
|
199
185
|
Max: 537
|
@@ -205,14 +191,14 @@ Metrics/BlockLength:
|
|
205
191
|
Max: 155
|
206
192
|
|
207
193
|
# Offense count: 1
|
208
|
-
# Configuration parameters: CountBlocks.
|
194
|
+
# Configuration parameters: CountBlocks, CountModifierForms.
|
209
195
|
Metrics/BlockNesting:
|
210
196
|
Max: 4
|
211
197
|
|
212
198
|
# Offense count: 9
|
213
199
|
# Configuration parameters: CountComments, CountAsOne.
|
214
200
|
Metrics/ClassLength:
|
215
|
-
Max:
|
201
|
+
Max: 467
|
216
202
|
|
217
203
|
# Offense count: 1
|
218
204
|
# Configuration parameters: LengthThreshold.
|
@@ -220,12 +206,12 @@ Metrics/CollectionLiteralLength:
|
|
220
206
|
Exclude:
|
221
207
|
- 'doc/ex/smile.rb'
|
222
208
|
|
223
|
-
# Offense count:
|
209
|
+
# Offense count: 15
|
224
210
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
225
211
|
Metrics/CyclomaticComplexity:
|
226
212
|
Max: 44
|
227
213
|
|
228
|
-
# Offense count:
|
214
|
+
# Offense count: 57
|
229
215
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
230
216
|
Metrics/MethodLength:
|
231
217
|
Max: 146
|
@@ -236,7 +222,7 @@ Metrics/ParameterLists:
|
|
236
222
|
MaxOptionalParameters: 5
|
237
223
|
Max: 8
|
238
224
|
|
239
|
-
# Offense count:
|
225
|
+
# Offense count: 12
|
240
226
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
241
227
|
Metrics/PerceivedComplexity:
|
242
228
|
Max: 42
|
@@ -283,12 +269,12 @@ Naming/MethodParameterName:
|
|
283
269
|
- 'lib/rvg/transformable.rb'
|
284
270
|
- 'lib/rvg/units.rb'
|
285
271
|
|
286
|
-
# Offense count:
|
272
|
+
# Offense count: 432
|
287
273
|
# Configuration parameters: CountAsOne.
|
288
274
|
RSpec/ExampleLength:
|
289
275
|
Max: 126
|
290
276
|
|
291
|
-
# Offense count:
|
277
|
+
# Offense count: 540
|
292
278
|
# This cop supports safe autocorrection (--autocorrect).
|
293
279
|
# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
|
294
280
|
# DisallowedExamples: works
|
@@ -307,7 +293,7 @@ RSpec/IdenticalEqualityAssertion:
|
|
307
293
|
Exclude:
|
308
294
|
- 'spec/rmagick/image/spaceship_spec.rb'
|
309
295
|
|
310
|
-
# Offense count:
|
296
|
+
# Offense count: 544
|
311
297
|
RSpec/MultipleExpectations:
|
312
298
|
Max: 72
|
313
299
|
|
@@ -345,6 +331,12 @@ Style/ArgumentsForwarding:
|
|
345
331
|
Style/ArrayFirstLast:
|
346
332
|
Enabled: false
|
347
333
|
|
334
|
+
# Offense count: 1
|
335
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
336
|
+
Style/BitwisePredicate:
|
337
|
+
Exclude:
|
338
|
+
- 'spec/rmagick/image_list/partition_spec.rb'
|
339
|
+
|
348
340
|
# Offense count: 7
|
349
341
|
# This cop supports safe autocorrection (--autocorrect).
|
350
342
|
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
|
@@ -377,7 +369,7 @@ Style/ClassMethodsDefinitions:
|
|
377
369
|
Style/CommentedKeyword:
|
378
370
|
Enabled: false
|
379
371
|
|
380
|
-
# Offense count:
|
372
|
+
# Offense count: 128
|
381
373
|
# Configuration parameters: IgnoreModules.
|
382
374
|
Style/ConstantVisibility:
|
383
375
|
Exclude:
|
@@ -395,13 +387,13 @@ Style/DocumentDynamicEvalDefinition:
|
|
395
387
|
Exclude:
|
396
388
|
- 'lib/rmagick_internal.rb'
|
397
389
|
|
398
|
-
# Offense count:
|
390
|
+
# Offense count: 37
|
399
391
|
# Configuration parameters: AllowedConstants.
|
400
392
|
Style/Documentation:
|
401
393
|
Enabled: false
|
402
394
|
|
403
|
-
# Offense count:
|
404
|
-
# Configuration parameters: RequireForNonPublicMethods.
|
395
|
+
# Offense count: 164
|
396
|
+
# Configuration parameters: AllowedMethods, RequireForNonPublicMethods.
|
405
397
|
Style/DocumentationMethod:
|
406
398
|
Enabled: false
|
407
399
|
|
@@ -419,14 +411,7 @@ Style/FetchEnvVar:
|
|
419
411
|
Style/FormatStringToken:
|
420
412
|
EnforcedStyle: unannotated
|
421
413
|
|
422
|
-
# Offense count:
|
423
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
424
|
-
# Configuration parameters: EnforcedStyle.
|
425
|
-
# SupportedStyles: always, always_true, never
|
426
|
-
Style/FrozenStringLiteralComment:
|
427
|
-
Enabled: false
|
428
|
-
|
429
|
-
# Offense count: 46
|
414
|
+
# Offense count: 40
|
430
415
|
# Configuration parameters: AllowedVariables.
|
431
416
|
Style/GlobalVars:
|
432
417
|
Exclude:
|
@@ -451,29 +436,28 @@ Style/HashEachMethods:
|
|
451
436
|
- 'spec/rmagick/image/info/orientation_spec.rb'
|
452
437
|
- 'spec/rmagick/image/info/units_spec.rb'
|
453
438
|
|
454
|
-
# Offense count:
|
439
|
+
# Offense count: 2
|
455
440
|
# This cop supports safe autocorrection (--autocorrect).
|
456
441
|
Style/IfUnlessModifier:
|
457
442
|
Exclude:
|
458
443
|
- 'ext/RMagick/extconf.rb'
|
459
444
|
|
460
|
-
# Offense count:
|
445
|
+
# Offense count: 145
|
461
446
|
Style/InlineComment:
|
462
447
|
Enabled: false
|
463
448
|
|
464
|
-
# Offense count:
|
449
|
+
# Offense count: 8
|
465
450
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
466
451
|
# Configuration parameters: InverseMethods.
|
467
452
|
Style/InvertibleUnlessCondition:
|
468
453
|
Exclude:
|
469
454
|
- 'doc/ex/get_type_metrics.rb'
|
470
455
|
- 'examples/identify.rb'
|
471
|
-
- 'ext/RMagick/extconf.rb'
|
472
456
|
- 'lib/rmagick_internal.rb'
|
473
457
|
- 'lib/rvg/embellishable.rb'
|
474
458
|
- 'lib/rvg/stretchable.rb'
|
475
459
|
|
476
|
-
# Offense count:
|
460
|
+
# Offense count: 4514
|
477
461
|
# This cop supports safe autocorrection (--autocorrect).
|
478
462
|
# Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
|
479
463
|
# SupportedStyles: require_parentheses, omit_parentheses
|
@@ -493,12 +477,26 @@ Style/MissingRespondToMissing:
|
|
493
477
|
- 'lib/rmagick_internal.rb'
|
494
478
|
- 'lib/rvg/misc.rb'
|
495
479
|
|
496
|
-
# Offense count:
|
480
|
+
# Offense count: 46
|
497
481
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
498
482
|
# Configuration parameters: EnforcedStyle.
|
499
483
|
# SupportedStyles: literals, strict
|
500
484
|
Style/MutableConstant:
|
501
|
-
|
485
|
+
Exclude:
|
486
|
+
- 'doc/ex/add_noise.rb'
|
487
|
+
- 'doc/ex/arcs02.rb'
|
488
|
+
- 'doc/ex/cubic01.rb'
|
489
|
+
- 'doc/ex/cubic02.rb'
|
490
|
+
- 'doc/ex/rvg_linecap.rb'
|
491
|
+
- 'doc/ex/rvg_linejoin.rb'
|
492
|
+
- 'doc/ex/rvg_opacity.rb'
|
493
|
+
- 'doc/ex/smile.rb'
|
494
|
+
- 'doc/ex/tref01.rb'
|
495
|
+
- 'doc/ex/writing_mode01.rb'
|
496
|
+
- 'doc/ex/writing_mode02.rb'
|
497
|
+
- 'lib/rvg/misc.rb'
|
498
|
+
- 'lib/rvg/stylable.rb'
|
499
|
+
- 'spec/support/helpers.rb'
|
502
500
|
|
503
501
|
# Offense count: 32
|
504
502
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
@@ -506,9 +504,9 @@ Style/MutableConstant:
|
|
506
504
|
# SupportedStyles: predicate, comparison
|
507
505
|
Style/NumericPredicate:
|
508
506
|
Exclude:
|
509
|
-
- 'spec/**/*'
|
510
507
|
- 'lib/rmagick_internal.rb'
|
511
508
|
- 'lib/rvg/embellishable.rb'
|
509
|
+
- 'spec/rmagick/image/destroy_spec.rb'
|
512
510
|
|
513
511
|
# Offense count: 4
|
514
512
|
# Configuration parameters: AllowedMethods.
|
@@ -519,7 +517,7 @@ Style/OptionalBooleanParameter:
|
|
519
517
|
- 'lib/rmagick_internal.rb'
|
520
518
|
- 'lib/rvg/pathdata.rb'
|
521
519
|
|
522
|
-
# Offense count:
|
520
|
+
# Offense count: 94
|
523
521
|
# This cop supports safe autocorrection (--autocorrect).
|
524
522
|
# Configuration parameters: .
|
525
523
|
# SupportedStyles: same_as_string_literals, single_quotes, double_quotes
|
@@ -538,7 +536,6 @@ Style/RequireOrder:
|
|
538
536
|
Exclude:
|
539
537
|
- 'Rakefile'
|
540
538
|
- 'doc/ex/polaroid.rb'
|
541
|
-
- 'ext/RMagick/extconf.rb'
|
542
539
|
- 'lib/rmagick_internal.rb'
|
543
540
|
- 'lib/rvg/rvg.rb'
|
544
541
|
- 'rmagick.gemspec'
|
@@ -550,7 +547,7 @@ Style/StaticClass:
|
|
550
547
|
Exclude:
|
551
548
|
- 'spec/rmagick/draw/class_methods/_dummy_img__spec.rb'
|
552
549
|
|
553
|
-
# Offense count:
|
550
|
+
# Offense count: 186
|
554
551
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
555
552
|
# Configuration parameters: Mode.
|
556
553
|
Style/StringConcatenation:
|
@@ -565,7 +562,7 @@ Style/StringHashKeys:
|
|
565
562
|
- 'lib/rvg/misc.rb'
|
566
563
|
- 'spec/rmagick/image/properties_spec.rb'
|
567
564
|
|
568
|
-
# Offense count:
|
565
|
+
# Offense count: 308
|
569
566
|
# This cop supports safe autocorrection (--autocorrect).
|
570
567
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
571
568
|
# SupportedStyles: single_quotes, double_quotes
|
@@ -580,14 +577,14 @@ Style/YodaCondition:
|
|
580
577
|
Exclude:
|
581
578
|
- 'spec/rmagick/image/destroy_spec.rb'
|
582
579
|
|
583
|
-
# Offense count:
|
580
|
+
# Offense count: 113
|
584
581
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
585
582
|
# Configuration parameters: .
|
586
583
|
# SupportedOperators: *, +, &, |, ^
|
587
584
|
Style/YodaExpression:
|
588
585
|
Enabled: false
|
589
586
|
|
590
|
-
# Offense count:
|
587
|
+
# Offense count: 134
|
591
588
|
# This cop supports safe autocorrection (--autocorrect).
|
592
589
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
593
590
|
# URISchemes: http, https
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,21 @@
|
|
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.0
|
7
|
+
|
8
|
+
Bug Fixes
|
9
|
+
|
10
|
+
- Fix SEGV if read incorrect PDF file (#1671)
|
11
|
+
|
12
|
+
Improvements
|
13
|
+
|
14
|
+
- Remove multiple imagemagick version checks (#1650)
|
15
|
+
- Suppress exception at installation if ImageMagick is not installed (#1647)
|
16
|
+
- Remove unnecessary `require` (#1639)
|
17
|
+
- Remove unnecessary minimum ruby version check (#1637)
|
18
|
+
- Remove universal build configuration for system bundled ruby in macOS (#1633)
|
19
|
+
- Add `frozen_string_literal: true` magic comment (#1631)
|
20
|
+
|
6
21
|
## RMagick 6.0.1
|
7
22
|
|
8
23
|
Bug Fixes
|
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in rmagick.gemspec
|
@@ -14,5 +16,7 @@ gem 'rubocop', '~> 1.63'
|
|
14
16
|
gem 'rubocop-performance', '~> 1.21'
|
15
17
|
gem 'rubocop-rspec', '~> 2.29'
|
16
18
|
|
19
|
+
gem 'rubocop-on-rbs', '~> 0.5' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1')
|
20
|
+
|
17
21
|
gem 'rbs', '~> 3.4'
|
18
22
|
gem 'steep', '~> 1.6'
|
data/README.md
CHANGED
@@ -110,6 +110,12 @@ brew install imagemagick@6
|
|
110
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.
|
111
111
|
<img width="75%" src="https://github.com/rmagick/rmagick/assets/199156/494e7963-cca5-4cb5-b28a-6c4d76adce5d" />
|
112
112
|
|
113
|
+
If you want to install ImageMagick using [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), run the following command:
|
114
|
+
|
115
|
+
```sh
|
116
|
+
winget install ImageMagick.ImageMagick --custom /TASKS=modifypath,install_Devel
|
117
|
+
```
|
118
|
+
|
113
119
|
Installing RMagick
|
114
120
|
------------------
|
115
121
|
|
@@ -158,7 +164,7 @@ Things that can go wrong
|
|
158
164
|
The [RMagick installation FAQ][faq] has answers to the most commonly reported
|
159
165
|
problems, though may be out of date.
|
160
166
|
|
161
|
-
### Can't install RMagick. Can't find
|
167
|
+
### Can't install RMagick. Can't find libMagickCore-XXXX.so or one of the dependent libraries. Check the mkmf.log file for more detailed information
|
162
168
|
|
163
169
|
Typically this message means that one or more of the libraries that ImageMagick
|
164
170
|
depends on hasn't been installed. Examine the mkmf.log file in the ext/RMagick
|
@@ -171,15 +177,14 @@ diagnose the problem. Also see [this FAQ][libmagick-faq].
|
|
171
177
|
If you get a message like this:
|
172
178
|
|
173
179
|
```sh
|
174
|
-
|
175
|
-
|
176
|
-
$DIR/RMagick2.so (LoadError)
|
180
|
+
... /core_ext/kernel_require.rb>:136:in `require': cannot load such file -- RMagick2.so (LoadError)
|
181
|
+
(snip)
|
177
182
|
```
|
178
183
|
|
179
184
|
you probably do not have the directory in which the ImageMagick library
|
180
185
|
is installed in your load path. An easy way to fix this is to define
|
181
186
|
the directory in the `LD_LIBRARY_PATH` environment variable. For
|
182
|
-
example, suppose you installed the ImageMagick library `
|
187
|
+
example, suppose you installed the ImageMagick library `libMagickCore-XXXX.so` in
|
183
188
|
`/usr/local/lib`. (By default this is where it is installed.) Create the
|
184
189
|
`LD_LIBRARY_PATH` variable like this:
|
185
190
|
|
@@ -211,7 +216,7 @@ release of RMagick over an earlier release.
|
|
211
216
|
More samples
|
212
217
|
------------
|
213
218
|
|
214
|
-
You can find more sample RMagick programs in the
|
219
|
+
You can find more sample RMagick programs in the [/examples](https://github.com/rmagick/rmagick/tree/main/examples) and [/doc/ex](https://github.com/rmagick/rmagick/tree/main/doc/ex) directories. These
|
215
220
|
programs are not installed in the RMagick documentation tree.
|
216
221
|
|
217
222
|
Reporting bugs
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simplecov'
|
2
4
|
require './lib/rmagick/version'
|
3
5
|
require 'fileutils'
|
@@ -93,18 +95,24 @@ namespace :website do
|
|
93
95
|
File.open(File.join(output_dir, output_file_name), 'w') do |dest|
|
94
96
|
dest.puts <<~END_EXHTMLHEAD
|
95
97
|
<!DOCTYPE public PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
96
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
98
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
97
99
|
<head>
|
98
100
|
<meta name="generator" content="ex2html.rb" />
|
99
101
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
100
102
|
<link rel="stylesheet" type="text/css" href="css/popup.css" />
|
103
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css" />
|
104
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
105
|
+
<script>
|
106
|
+
hljs.configure({ cssSelector: "pre" });
|
107
|
+
hljs.highlightAll();
|
108
|
+
</script>
|
101
109
|
<title>RMagick example: #{input_file_name}</title>
|
102
110
|
</head>
|
103
111
|
<body>
|
104
112
|
<h1>#{input_file_name}</h1>
|
105
113
|
<div class="bodybox">
|
106
114
|
<div class="bodyfloat">
|
107
|
-
<pre>
|
115
|
+
<pre class="language-ruby">
|
108
116
|
END_EXHTMLHEAD
|
109
117
|
|
110
118
|
src.each do |line|
|
data/before_install_linux.sh
CHANGED
@@ -13,13 +13,15 @@ if [ ! -v IMAGEMAGICK_VERSION ]; then
|
|
13
13
|
exit 1
|
14
14
|
fi
|
15
15
|
|
16
|
+
sudo apt-get update
|
17
|
+
|
16
18
|
# remove all existing imagemagick related packages
|
17
19
|
sudo apt-get autoremove -y imagemagick* libmagick* --purge
|
18
20
|
|
19
21
|
# install build tools, ImageMagick delegates
|
20
22
|
sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
|
21
23
|
liblcms2-dev libpng-dev libjpeg-dev libfreetype6-dev \
|
22
|
-
libtiff5-dev libwebp-dev liblqr-1-0-dev
|
24
|
+
libtiff5-dev libwebp-dev liblqr-1-0-dev libglib2.0-dev gsfonts ghostscript
|
23
25
|
|
24
26
|
project_dir=$(pwd)
|
25
27
|
build_dir="${project_dir}/build-ImageMagick/ImageMagick-${IMAGEMAGICK_VERSION}"
|
data/before_install_osx.sh
CHANGED
@@ -15,7 +15,7 @@ fi
|
|
15
15
|
|
16
16
|
export HOMEBREW_NO_AUTO_UPDATE=true
|
17
17
|
brew uninstall --force imagemagick imagemagick@6
|
18
|
-
brew install wget ghostscript freetype libtool jpeg jpeg-xl little-cms2 openexr libomp libpng libtiff liblqr zlib webp zstd
|
18
|
+
brew install wget ghostscript freetype libtool jpeg jpeg-xl little-cms2 openexr libomp libpng libtiff liblqr zlib webp zstd glib
|
19
19
|
|
20
20
|
export LDFLAGS="-L$(brew --prefix jpeg)/lib -I$(brew --prefix jpeg-xl)/lib -L$(brew --prefix little-cms2)/lib -L$(brew --prefix openexr)/lib -L$(brew --prefix libomp)/lib -L$(brew --prefix libpng)/lib -L$(brew --prefix libtiff)/lib -L$(brew --prefix liblqr)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix webp)/lib -L$(brew --prefix zstd)/lib"
|
21
21
|
export CPPFLAGS="-I$(brew --prefix jpeg)/include -I$(brew --prefix jpeg-xl)/include -I$(brew --prefix openexr)/include/OpenEXR -I$(brew --prefix libtiff)/include -I$(brew --prefix zlib)/include -I$(brew --prefix zstd)/include -I$(brew --prefix glib)/include/glib-2.0 -I$(brew --prefix glib)/lib/glib-2.0/include"
|